Backcolor in Combobox

Started by Rolf Brandt, December 08, 2010, 07:34:18 AM

Previous topic - Next topic

Rolf Brandt

I replaced some textboxes in an input form with comboboxes (Style: CBS_Dropdown).

Unfortunately the text area is a light blue, which does not look very nice. How can I change it to white like the textboxes.
Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

Rolf Brandt

Just noticed that the problem is a little more complex.

If you have textboxes with several backcolors and comboboxes with Style set to CBS_DROPDOWN the textbox part of the combo takes the backcolor of the textbox that has the focus.

I added a little example. Try the following: Click an any textbox and then move the mouse over the comboboxes. The comboboxes will take the backcolor of the textbox.
Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

Paul Squires

Strange. I'll download your sample program and investigate a fix.
Paul Squires
PlanetSquires Software

Rolf Brandt

Rolf Brandt
http://www.rbsoft.eu
http://www.taxifreeware.com
I cook with wine, sometimes I even add it to the food.
(W. C. Fields)

Paul Squires

I'll log this problem into the bug tracker. Appears that it may be a code generation error.
Paul Squires
PlanetSquires Software

Roger Garstang

#5
Did we ever get FF to color Combos?  I must have missed that as one of the things improved in the recent builds. I had to do it with some manual code before, but it only worked with the main two combo styles and failed with the weird one that has them as two controls.  I had sent the code before.  Testing now looks like it still doesn't color the combo when it has an edit box (Text area and List both stay white)  I also built a list of two values to test with and keeping the initial set to -1 gave me a blank list during run time 3 times in a row, then when I changed the dropdown type it seems to have fixed itself.

Been a while, but it had to do with how FF pulls the brushes and doesn't make sure the textbox and listview it colors is a control with the FF Prop storing it and it uses the previous or null/black. Themes mask it too at times.  My code checked the Parent control, but would be better to keep track of the FF Prop or set a Prop for the child controls or something.

Pete Totushek

I just had this issue pop up in my current project.  I searched the forum and found this post.  I also compiled Rolf's example and can Confirmed that this is still an issue in v3.61

-Pete
-Pete
www.totusoft.com -- Home of LAN Speed Test