lxn / walk

A Windows GUI toolkit for the Go Programming Language
Other
6.8k stars 885 forks source link

Cannot set TextColor in ownerdrawn listbox #669

Open ktye opened 4 years ago

ktye commented 4 years ago

I'm trying to set different text colors for each line in a listbox by implementing the ListItemStyler.

I can set the TextColor in the StyleItem method, but it takes no effect. If the unexported hTheme property is set (which it is), default values are used: https://github.com/lxn/walk/blob/master/models.go#L472

Am I missing something? Can I unset the default theme for the StyleItem?

Setting individal row BackgroundColors works ok.

lxn commented 3 years ago

Fixed in https://github.com/lxn/walk/commit/5d9132a89763dee9c0664a599da7a8a733a7dd31.