[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.platform.swt] Re: ComboBoxCellEditor ComboBox always on???

Hi,

I think you are talking about TableViewer/TreeViewer what you are trying
to achieve is not supported by the underlying Viewer code. The reason is
fairly simply.

There's only one instance of an Editor per Column what you are trying to
achieve is to have an Editor per Column per Row.

This has performance impacts in great tables/trees (3 CCombo-Columns *
1000 Rows => 3000 CCombo-Controls!!!). Having told you all those reasons
now the good thing ;-). You can put yourself arbitary controls in
Tables/Trees like shown in the following snippet:

http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.snippets/src/org/eclipse/swt/snippets/Snippet126.java

The only thing you need to to make this work together with
ComboBoxCellEditor is that you need to hide the CCombo before the
CellEditor is displayed to the user. I think in some of the newsgroups
there's a thread where I outlined how this can be done and the one I
supported reported back that it worked the way I told he to do it but I
can't remember how it was done.

Finally there already exists a request for JFace to provide this kind of
feature (https://bugs.eclipse.org/bugs/show_bug.cgi?id=36977). It's on
my radar but on my priority list there are other more important things
to work on currently (widget-independency, tabing support,
keyboard-navigation, ...).

And last but not least I can also point you to a new nebula control
named CompositeTable. I think this is what you are really looking for
because it's made up of real swt-widgets:

http://dev.eclipse.org/viewcvs/index.cgi/%7Echeckout%7E/org.eclipse.swt.nebula/org.eclipse.swt.nebula.widgets/src/org/eclipse/swt/nebula/widgets/compositetable/?cvsroot=Technology_Project

Tom

Chris schrieb:
> Hi:
> 
> Our company is trying to make the ComboBoxCellEditor more intuitive.  We
> would like to make it so the combo box always shows so that the user
> KNOWS there is a comb box there and the be able to click it once instead
> of this default behavior of displaying like a Text field and then
> showing up as a combo box when it is double clicked.  The documentation
> is poor on this. 
> Any ideas?  Someone must have had the same thoughts on this.
> 
> Thanks
>