Skip to main content



      Home
Home » Archived » 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
Eclipse UserFriend
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
Eclipse UserFriend
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
Eclipse UserFriend
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: Thu Jul 03 16:10:36 EDT 2025

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

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

Back to the top