Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » help to get the size of widgets layouted in GridLayout?
help to get the size of widgets layouted in GridLayout? [message #730458] Wed, 28 September 2011 08:54 Go to next message
Song David is currently offline Song David
Messages: 180
Registered: April 2011
Senior Member
Hi,

How to get the size of widgets layouted in GridLayout?

thanks a lot
David
Re: help to get the size of widgets layouted in GridLayout? [message #730755 is a reply to message #730458] Thu, 29 September 2011 00:46 Go to previous messageGo to next message
Vijay Raj
Messages: 608
Registered: July 2009
Senior Member
why do u need the wodget size?

---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: help to get the size of widgets layouted in GridLayout? [message #731605 is a reply to message #730755] Sat, 01 October 2011 21:13 Go to previous messageGo to next message
Song David is currently offline Song David
Messages: 180
Registered: April 2011
Senior Member
I want to generate a jfree chart as png to display in the widget in RAP application and want to let the png image to fill the widget. How to do with it? Would you please to give me a tip?

Thanks
Re: help to get the size of widgets layouted in GridLayout? [message #734289 is a reply to message #730458] Fri, 07 October 2011 07:40 Go to previous messageGo to next message
Thomas Singer is currently offline Thomas Singer
Messages: 75
Registered: July 2009
Member
micromms wrote on Wed, 28 September 2011 08:54
Hi,

How to get the size of widgets layouted in GridLayout?

You can get the current size of any control by invoking getSize(). To get its preferred (/minimum size), invoke computeSize(SWT.DEFAULT, SWT.DEFAULT).
Re: help to get the size of widgets layouted in GridLayout? [message #734536 is a reply to message #734289] Sat, 08 October 2011 09:30 Go to previous messageGo to next message
Song David is currently offline Song David
Messages: 180
Registered: April 2011
Senior Member
Thanks for your message, but I get a {0,0} with the method
getSize()
!

Thomas Singer wrote on Fri, 07 October 2011 07:40
micromms wrote on Wed, 28 September 2011 08:54
Hi,

How to get the size of widgets layouted in GridLayout?

You can get the current size of any control by invoking getSize(). To get its preferred (/minimum size), invoke computeSize(SWT.DEFAULT, SWT.DEFAULT).

Re: help to get the size of widgets layouted in GridLayout? [message #735216 is a reply to message #734536] Tue, 11 October 2011 05:24 Go to previous message
Lakshmi Shanmugam
Messages: 274
Registered: July 2009
Location: India
Senior Member
You should call getSize() after the controls have been 'layouted' in the composite.(after Composite.layout())

Lakshmi P Shanmugam
Previous Topic:SWT GTK 64 bit and UBUNTU 11.04 NPE
Next Topic:Background color of a deselected table/tree item
Goto Forum:
  


Current Time: Mon Apr 21 08:59:25 EDT 2014

Powered by FUDForum. Page generated in 0.01917 seconds