I tried to use a custom renderer for a combobox, to set the combobox
entries icon.

But i discovered the renderer method is called with a invalid row value
(-1). That call seems to be needed to render the selected combobox item
(once).

Why that? Why my entries have icons on combobox popup but none when
selected on the combobox? This is my renderer:

public IRendererComponent getComboBoxCellRendererComponent(ULCComboBox
combo, Object value, boolean selected, int index) {
        ret.setIcon(index==-1? null : modelIcons[index]));
        return ret ;
}

How can i fix it? The only workaround i could imagine is to use a
"decorated" value field instead of the index one to get current index
instead of the -1 value.

What can i do?

Paolo Scaffardi
GFP Lab s.r.l.
http://www.gfplab.com
fax 178 2258454
_______________________________________________
ULC-developer mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/ulc-developer

Reply via email to