PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Jean-Pierre LEROY on June 20, 2005, 05:56:51 PM

Title: BackColor of Multi-Line TEXTBOX
Post by: Jean-Pierre LEROY on June 20, 2005, 05:56:51 PM
Hi Paul,

The BackColor that I set in the properties of a MULTILINE TEXTBOX disappear as soon as I write some text to the textbox.

Even when I just launch my program (and before I write any text to the textbox) the first line of the MULTILINE TEXTBOX doesn't take the BackColor setting.

To test, just add a TEXTBOX to a form, check the ES_MULTILINE in the WindowsStyle properties and choose a BackColor.

I hope you can fix this minor problem.
Jean-Pierre LEROY
Title: BackColor of Multi-Line TEXTBOX
Post by: Jean-Pierre LEROY on June 22, 2005, 08:06:34 AM
Hi Paul,

Tell me if I can be of more help on this subject.

I've to deliver a software made with FF to one of my customer next week, and I need this minor problem to be solved.

Thank you.
Jean-Pierre
Title: BackColor of Multi-Line TEXTBOX
Post by: TechSupport on June 22, 2005, 08:26:59 AM
Hi Jean-Pierre,

I have not had time to look at it yet but I will do my very best to do so today. I will post again as soon as possible.
Title: BackColor of Multi-Line TEXTBOX
Post by: TechSupport on June 22, 2005, 03:42:15 PM
Jean-Pierre,

There are issues with using a multiline textbox that require FireFly to set the background mode to OPAQUE. This is because characters will get garbled when the control is scrolled or characters are deleted. The only acceptable solution that I could find to solve those problems was to ensure that the background mode is set to OPAQUE. Of course doing so now appears to screw up the background color of the control. :?

A "quick" solution would be to change your multiline TextBox control to a multiline RichEdit and issue a %EM_SETBKGNDCOLOR message in your WM_CREATE message handler. Not the best solution, but at least it would work correctly for you. Multiline RichEdit controls do not suffer from the same problem as the normal TextBox controls.
Title: BackColor of Multi-Line TEXTBOX
Post by: Jean-Pierre LEROY on June 22, 2005, 05:09:22 PM
Hi Paul,

Thank you for your answer and the workaround with the RichEdit control.

Nevertheless, keep me in touch if you find a solution in the near future for the multiline textbox; when the textbox is not multiline everything work fine with the BakColor.

Have a good day.
Jean-Pierre.
Title: BackColor of Multi-Line TEXTBOX
Post by: Jean-Pierre LEROY on July 17, 2005, 12:32:19 PM
Hi Paul,

I have read that you are working on a new version of FireFly this week-end  :D

Do you plan to include a fix to solve the problem of the BackColor for Multi-Line TextBox ?

Thank you
Jean-Pierre.
Title: BackColor of Multi-Line TEXTBOX
Post by: TechSupport on July 17, 2005, 12:37:31 PM
Hi Jean-Pierre,

I don't know if this problem can be fixed given the way that FireFly works. I know that it won't be in the upcoming update. Maybe I can figure it out for a subsequent update. Sorry about that.
Title: BackColor of Multi-Line TEXTBOX
Post by: TechSupport on July 19, 2005, 09:48:34 AM
I guess that I spoke too soon. I have now fixed this problem. I reviewed the generated code and it looks like I had forgot to set the color. I returned the correct brush handle but I never set the color via SetBkColor.

The fix will be in the upcoming update.
Title: BackColor of Multi-Line TEXTBOX
Post by: Jean-Pierre LEROY on July 19, 2005, 12:19:24 PM
Hi Paul,

Thank you very much; I'm very happy you were able to fix this problem.

Jean-Pierre.