Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » KTable Combo renderer
KTable Combo renderer [message #467224] Thu, 26 January 2006 17:39 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Lorenz Maierhofer is currently offline Lorenz MaierhoferFriend
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
Re: KTable Combo renderer [message #467428 is a reply to message #467224] Tue, 31 January 2006 08:55 Go to previous message
Eclipse UserFriend
Originally posted by: remax_ren.yahoo.fr

Thanks a lot !
Previous Topic:Styles in Groups.
Next Topic:Can I remove a control from a Composite?
Goto Forum:
  


Current Time: Fri Apr 19 15:38:43 GMT 2024

Powered by FUDForum. Page generated in 0.02058 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top