ghiboz
ghiboz

Reputation: 8003

win 7 can't paint combobox

I have my program that paint the backcolor of a combobox column in a datagridview. I win xp everything works fine, but in win 7 the comboboxes have the gray color: enter image description here

if you look the shot, you see that the combobox columns are grayed, but they must be yellow like the other columns.

if I use the old windows theme the grid is ok, but I wish use the new themes of win 7.

(i'm the developer, so I can change the code to paint the cell)

Upvotes: 2

Views: 1213

Answers (2)

ghiboz
ghiboz

Reputation: 8003

solved, use flat style for the combobox and the color is shown correctly

Upvotes: 1

Paul C
Paul C

Reputation: 4776

Hm, I hope someone comes up with a better solution, surely companies creating custom skins have this problem. There are the two solutions I found, either change the visual style or changing the FlatSyle;

Possible to use XP Visual Style in Vista/Win7?

Need to change DatagridviewCombobox cell background color in Windows7

Although this talks about the ForeColor, it may be also provide a fix for the backcolor;

How to change ForeColor of ComboBox's Selected Item? @Cody Gray

Upvotes: 1

Related Questions