KTable Combo renderer [message #467224] |
Thu, 26 January 2006 17:39 |
Eclipse User |
|
|
|
Originally posted by: remax_ren.yahoo.fr
Hi,
I've created a comboBox cell using KTableCellEditorCombo.
For the moment, I use a simple TextCellRenderer for the renderer part for this cell, but i want a renderer that make visible the "down-arrow" icon on the right that appears when a do a double clik on it.
Is it possible to do that with KTable?
And, another question. How can I configure my KTableCellEditorCombo to be editable on a single click, and not on a double click. The constructor of KTableCellEditorCombo doesn't take any parameters and i can't find any configuration function to do it, even if the KTable doc mention a SINGLECLICK possible configuration.
I hope someone will be able to help me.
Thanks.
Renaud
|
|
|
Re: KTable Combo renderer [message #467313 is a reply to message #467224] |
Sat, 28 January 2006 21:40 |
Lorenz Maierhofer Messages: 88 Registered: July 2009 |
Member |
|
|
Hi,
both things are possible, but you will have to subclass the appropriate
classes.
To render the button, extend the TextCellRenderer and overwrite the
method drawContent (or something similar). You get the GC and can paint
the desired arrow...
About the KTableCellEditorCombo:
Extend it and overwrite the following method with a code like:
public int getActivationSignals() {
return DOUBLECLICK | KEY_ANY | SINGLECLICK;
}
regards,
Lorenz
Renaud wrote:
> Hi,
> I've created a comboBox cell using KTableCellEditorCombo.
> For the moment, I use a simple TextCellRenderer for the renderer part for this cell, but i want a renderer that make visible the "down-arrow" icon on the right that appears when a do a double clik on it.
> Is it possible to do that with KTable?
>
> And, another question. How can I configure my KTableCellEditorCombo to be editable on a single click, and not on a double click. The constructor of KTableCellEditorCombo doesn't take any parameters and i can't find any configuration function to do it, even if the KTable doc mention a SINGLECLICK possible configuration.
>
> I hope someone will be able to help me.
> Thanks.
> Renaud
|
|
|
|
Powered by
FUDForum. Page generated in 0.02058 seconds