|
|
Re: SWT.ICON_SEARCH and SWT.ICON_CANCEL not work in the dialog [message #1061857 is a reply to message #1046680] |
Tue, 04 June 2013 11:55 |
David Lee Messages: 78 Registered: May 2013 |
Member |
|
|
[quote title=Ralf Sternberg wrote on Mon, 22 April 2013 04:17]worksforme
Sir,
I am using Windows XP, RAP2.1M2 , Eclipse 4.2.2
--------------
Text text = new Text(compName, SWT.BORDER | SWT.SEARCH | SWT.ICON_SEARCH | SWT.ICON_CANCEL);
text.addSelectionListener(new SelectionListener() {
private static final long serialVersionUID = 1L;
public void widgetDefaultSelected(SelectionEvent e) {
if ( e.detail == SWT.ICON_SEARCH )
MessageDialog.openInformation(null,"message", "clicked ICON_SEARCH");
}
});
--------------
It doesn't work! Also, I tried using "new SelectionAdapter()" instead, doesn't work either! seems the SelectionAdapter or SelectionListener Event cannot be trigged!
This is a usful function for the user to select his desired data to the Text!
Can you please show me some working sample code? Appreciate you in advance!
|
|
|
Re: SWT.ICON_SEARCH and SWT.ICON_CANCEL not work in the dialog [message #1061874 is a reply to message #1061857] |
Tue, 04 June 2013 13:09 |
Ivan Furnadjiev Messages: 2426 Registered: July 2009 Location: Sofia, Bulgaria |
Senior Member |
|
|
Hi,
it's working for me too. See
http://rap.eclipsesource.com/controlsdemo/controls#Text
Select SEARCH, ICON_SEARCH, ICON_CANCEL and SelectionListener checkboxes
and click on the search/cancel icons.
Which browser are you using?
Best,
Ivan
On 6/4/2013 3:03 PM, David Lee wrote:
> [quote title=Ralf Sternberg wrote on Mon, 22 April 2013 04:17]worksforme
>
> Sir,
>
> I am using Windows XP, RAP2.1M2 , Eclipse 4.2.2
>
> --------------
> Text text = new Text(compName, SWT.BORDER | SWT.SEARCH |
> SWT.ICON_SEARCH | SWT.ICON_CANCEL);
>
> text.addSelectionListener(new SelectionListener() {
> private static final long serialVersionUID = 1L;
> public void widgetDefaultSelected(SelectionEvent e) {
> if ( e.detail == SWT.ICON_SEARCH )
> MessageDialog.openInformation(null,"message", "clicked ICON_SEARCH");
> }
> });
> --------------
>
> It doesn't work! Also, I tried using "new SelectionAdapter()" instead,
> doesn't work either! seems the SelectionAdapter or SelectionListener
> Event cannot be trigged!
> This is a usful function for the user to select his desired data to
> the Text!
>
> Can you please show me some working sample code? Appreciate you in
> advance!
--
Ivan Furnadjiev
Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/
Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
|
|
|
|
Powered by
FUDForum. Page generated in 0.03363 seconds