Skip to main content


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 10:15 Go to next message
Ellis Yu is currently offline Ellis YuFriend
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 10:26 Go to previous messageGo to next message
Christian Campo is currently offline Christian CampoFriend
Messages: 597
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] Wed, 09 November 2011 02:50 Go to previous message
Ellis Yu is currently offline Ellis YuFriend
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 Apr 26 21:13:39 GMT 2024

Powered by FUDForum. Page generated in 0.02799 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top