BackColor of Multi-Line TEXTBOX

Started by Jean-Pierre LEROY, June 20, 2005, 05:56:51 PM

Previous topic - Next topic

Jean-Pierre LEROY

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

Jean-Pierre LEROY

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

TechSupport

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.

TechSupport

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.

Jean-Pierre LEROY

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.

Jean-Pierre LEROY

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.

TechSupport

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.

TechSupport

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.

Jean-Pierre LEROY

Hi Paul,

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

Jean-Pierre.