Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Dynamically change theb SWT style of the Control object
Dynamically change theb SWT style of the Control object [message #489868] Tue, 06 October 2009 10:41 Go to next message
jayant  is currently offline jayant Friend
Messages: 4
Registered: October 2009
Junior Member
Hi All,
I have a SWT Text with a style as SWT.NONE.i.e.
txtName = new Text(parentComposite,SWT.NONE);
In my class which checks what values are inside the Text, on the basis of the value validation , wants to change the style of the Text to SWT.BORDER.There is getStyle() method available for Text Control object but we don't have setStyle() similarly we have getBorderWidth() but no setter method .So how do we go about it.
Thanks in advance,#Jayant
Re: Dynamically change theb SWT style of the Control object [message #489945 is a reply to message #489868] Tue, 06 October 2009 14:48 Go to previous message
Grant Gayed is currently offline Grant GayedFriend
Messages: 2150
Registered: July 2009
Senior Member
Hi Jayant,

Control styles cannot be changed after creation time, so the only way to do
this is to draw the border yourself. I was going to point you at the other
recent thread about drawing borders but I think you're aware of it ;-).

Grant


"jayant" <jayant.chaudhury@deutschebahn.com> wrote in message
news:haf6su$ceg$1@build.eclipse.org...
> Hi All,
> I have a SWT Text with a style as SWT.NONE.i.e.
> txtName = new Text(parentComposite,SWT.NONE);
> In my class which checks what values are inside the Text, on the basis of
the value validation , wants to change the style of the Text to
SWT.BORDER.There is getStyle() method available for Text Control object but
we don't have setStyle() similarly we have getBorderWidth() but no setter
method .So how do we go about it.
> Thanks in advance,#Jayant
Previous Topic:Drag & Drop Behavior Different on Mac?
Next Topic:DND + Table Selection: ordering of Events
Goto Forum:
  


Current Time: Tue Apr 23 06:45:43 GMT 2024

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

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

Back to the top