I have a weblistbox where the user can select any given row and assign it a “type”. I am using a WebListBoxStyleRenderer to style the row with a particular foreground color / background color / bold combination depending on the type.
The user can change the row type any number of times, and the newly assigned style works fine except setting Bold = False doesn’t seem to do anything. That is, if the previous style was bold, and the new style isn’t, the text remains bold. I also noticed that if I don’t explicitly assign a background color in a style, then the previous style’s background color remains.
Does this mean that every time a new style is applied, it just stacks on top of the previous styles?
Also, as an aside, is there any way to clear a renderer after it’s been applied? I have tried setting it to Nil, but that doesn’t seem to do anything.
Can you share a small sample project? You can zip it and upload here.
I remember some fixes for r3 but not sure if that will fix your problem.
Maybe you can test that version (or r3.1) and see if that helps.
Turns out setting a CellRenderer to Nil pops an exception, so is there any way to clear a renderer? or do I need to define a “no-style” style and apply that instead?