Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Riena » Is SWT.SEARCH style applicatable in Riena?
Is SWT.SEARCH style applicatable in Riena? [message #755376] Tue, 08 November 2011 05:15 Go to next message
Ellis Yu is currently offline Ellis Yu
Messages: 15
Registered: July 2009
Junior Member
Dear All,

I create a text field with search style and below is my coding to create the text field.

final Text user = UIControlsFactory.createText(content,SWT.SEARCH | SWT.ICON_SEARCH | SWT.ICON_CANCEL);


But it only display as ordinary text field and there's no search icon or cancel icon in the field. Does search style apply in Riena? In my application, I'm using Riena 3.0 and Eclipse 3.7.1. Thanks

Best Rdgs
Ellis
Re: Is SWT.SEARCH style applicatable in Riena? [message #755379 is a reply to message #755376] Tue, 08 November 2011 05:26 Go to previous messageGo to next message
Christian Campo is currently offline Christian Campo
Messages: 590
Registered: July 2009
Senior Member
I really think that should work. You can look at the code of the UIControlsFactory it takes your style and transforms it into

new Text(parent, style | SWT.BORDER);

I am really wondering why you use the UIControlsFactory if you dont set the binding id ? Are you sure you are looking at the correct field

You should rather be writing something like:

final Text user = UIControlsFactory.createText(content,SWT.SEARCH | SWT.ICON_SEARCH | SWT.ICON_CANCEL,"user"); // "user" is the ridgetid

which is an equivalent to.....

final Text user = new Text(content, SWT.SEARCH | SWT..ICON_SEARCH | SWT.ICON_CANCEL);
addUIControl(user, "user");

Maybe the Search icon is not possible on your platform. The SWT javadoc says its a HINT only Smile.

hope that helps. If not please open a bug.

christian campo
Re: Is SWT.SEARCH style applicatable in Riena? [message #755619 is a reply to message #755379] Tue, 08 November 2011 21:50 Go to previous message
Ellis Yu is currently offline Ellis Yu
Messages: 15
Registered: July 2009
Junior Member
Thanks Christian Campo for your reply. I also think it should work because it's quite straight forward, but it's strange that the magnify glass icon and the cancel icon didn't appear. Thus I'm curious is there anyone use search style text field in Riena and has same problem.

Actually I have assign the binding id in next coding line by using addUIControl. Thanks for your kind reminder Smile .

Ellis
Previous Topic:uiFilters extension
Next Topic:Error when setting up target platform
Goto Forum:
  


Current Time: Fri Aug 01 12:02:53 EDT 2014

Powered by FUDForum. Page generated in 0.01873 seconds