Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Style bits for widgets
Style bits for widgets [message #448315] Fri, 07 January 2005 02:04 Go to next message
Avneesh Jain is currently offline Avneesh JainFriend
Messages: 11
Registered: July 2009
Junior Member
Given a widget I want to find the style bits associated with the widget. Is
there a convenient way to do it? Every widget has a getStyle() method which
returns an integer. But how do i convert this integer into something like
"SWT.BORDER|SWT.V_SCROLL|SWT.H_SCROLL", essentially all the style bits that
were used to create this widget.

This will be a useful convenience method to find out the default style with
which a widget is created.

Thanks
Avneesh
Re: Style bits for widgets [message #448404 is a reply to message #448315] Fri, 07 January 2005 22:45 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
There isn't a way. You can create a temporary widget, use Widget.getStyle()
and then dispose() it.

"Avneesh Jain" <avneesh.jain@epiphany.com> wrote in message
news:crkqlt$dh$1@www.eclipse.org...
> Given a widget I want to find the style bits associated with the widget.
Is
> there a convenient way to do it? Every widget has a getStyle() method
which
> returns an integer. But how do i convert this integer into something like
> "SWT.BORDER|SWT.V_SCROLL|SWT.H_SCROLL", essentially all the style bits
that
> were used to create this widget.
>
> This will be a useful convenience method to find out the default style
with
> which a widget is created.
>
> Thanks
> Avneesh
>
>
Previous Topic:GridLayout - strange behaviour
Next Topic:Border width and color
Goto Forum:
  


Current Time: Wed Oct 28 20:46:39 GMT 2020

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

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

Back to the top