[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] Re: Selection event for SWT Combo text

1) CCombo is recomended when you are using a combo box in a table or tree
editor because it is more flexible with regard to resizing than the native
Windows combo box.  However, apart from the editor case, you should really
use the SWT Combo widget because this will give you the native look and
feel.

2) CCombo will not give you a selection event when you select text in the
text widget (same as Combo).  In addition both Combo
and CCombo do not have API to get the text selected in the text widget.  In
the context of a combo box, selection refers to the selection of an item
from the list and does not refer to the selection of text in the text
widget.  There is no direct access to the underlying text widget.

The SWT Combo widget provides cut, copy and paste behaviour by default if
the application does not already handle these accelerators.


"Randy Hudson" <none@xxxxxxx> wrote in message
news:9no306$6s1$1@xxxxxxxxxxxxxxxx
> Most users are using CCombo instead.  This Custom Control is built from
> (among other things) a text field, whose behavior is probably more
familiar
> to you.
>
> "Tim deBoer" <deboer@xxxxxxxxxx> wrote in message
> news:9no0m5$5mk$1@xxxxxxxxxxxxxxxx
> > I'm trying to write cut, copy, and paste actions for an SWT Combo
widget.
> > It is a dropdown list where the text field is still edittable by the
user.
> > I've been able to create and run the actions okay, but I've having
trouble
> > finding the correctly events so that I can disable/enable the actions
when
> > appropriate. (for instance, when nothing is selected in the text part of
> > the widget, the cut should be disabled)
> >
> > In other text widgets the SelectionEvent is fired when the textual
> > selection has changed, but in the Combo this is only fired when an item
> > from the dropdown list is selected. Is there another event fired to tell
> > when the user modifies the selection in the text part of the Combo?
> > (either using the keyboard or the mouse)
> >
>
>