Janak Mulani ha scritto:
> Hi Paolo,
> 
> You can choose renderers based on the value. In this case you need not worry
> about indices including -1.

I didnt think so, because i tried using the value, but i always have a
call with row=-1 and value=null. The selected item on combobox is always
based on that returned template!! :-(

What does value==null and row=-1 means? I need to let the user select
items with different icons and styles from the combobox that, when
selected, looks identical on the combobox cell.

Is it possibile? :-o

> 
> 
>> -----Original Message-----
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] Behalf Of Paolo Scaffardi
>> Sent: Tuesday, August 08, 2006 10:54 PM
>> To: [email protected]
>> Subject: [ULC-developer] ULC6.1: ULCComboBox renderer issue...
>>
>>
>> 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

Best regards,
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