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 12:54 Go to next message
Song David is currently offline Song DavidFriend
Messages: 190
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 04:46 Go to previous messageGo to next message
Vijay RajFriend
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] Sun, 02 October 2011 01:13 Go to previous messageGo to next message
Song David is currently offline Song DavidFriend
Messages: 190
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 11:40 Go to previous messageGo to next message
Thomas Singer is currently offline Thomas SingerFriend
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 13:30 Go to previous messageGo to next message
Song David is currently offline Song DavidFriend
Messages: 190
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 09:24 Go to previous message
Lakshmi ShanmugamFriend
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: Fri Nov 28 23:18:24 GMT 2014

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

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