Dynamically change theb SWT style of the Control object [message #489868] |
Tue, 06 October 2009 06:41  |
Eclipse User |
|
|
|
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 10:48  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03875 seconds