[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.platform.swt] Re: Cut/Copy/Paste in a Combo

The methods copy, cut and paste were added to Combo in 2.1.

getEditable can be derived from the style of the widget ((combo.getStyle() &
SWT.READ_ONLY) == 0).

getSelectionCount can be derived from the result of Combo.getSelection

getCharCount can be derived from Combo.getText



"G. Filicetti" <gino@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:bekdak$qk6$1@xxxxxxxxxxxxxx
> Hey guys,
>
> The task at hand is being able to connect a Combo widget that is in an
> editor to the global cut/copy/paste actions.
>
> We've been successful in modifying the code in TextActionHandler and
> creating an action handler for the StyledText widget which works like a
> charm.
>
> Now we'd like to do the same thing in the Combo widget, however, we're
> running into some hefty roadblocks such as:
>
> - missing getEditable, getSelectionCount, getCaretOffset, getCharCount and
> others that the text action handler uses...
> - also doesn't have cut() and paste()
>
> I recall reading about someone trying to use Action Handlers in a combo in
> this newsgroup but I can't find the posting for the life of me.
>
> If anyone has some guidance, I'd greatly appreciate it.
>
> G
>
>