SWT problem: unable to change size when gridlayout is used [message #134997] |
Thu, 18 January 2007 01:06 |
Eclipse User |
|
|
|
Originally posted by: liudan.ntlworld.com
I'm new to SWT and I'm trying to use VE to create a simple application. I'm using gridlayout at moment. My problem is when I put a new component (e.g. Table,TextArea) into my Composite panel, I can't change its size at all. I've tried to change its size in my code (e.g. myTable.setSize(new Point(300, 200)), but it doesn't seem to work. Can someone explain how gridlayout works and how to resize my components? Thanks
|
|
|
Re: SWT problem: unable to change size when gridlayout is used [message #135008 is a reply to message #134997] |
Thu, 18 January 2007 15:41 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
You don't change sizes when you have a layout manager. That is the
purpose of the layout manager, to let it control the size and position
of your components.
Look in the Eclipse VE help. Search for "using gridlayout (SWT)" This
will explain how to work with the SWT GridLayout and the Ve.
--
Thanks,
Rich Kulp
|
|
|
Re: SWT problem: unable to change size when gridlayout is used [message #135021 is a reply to message #135008] |
Thu, 18 January 2007 19:21 |
Eclipse User |
|
|
|
Originally posted by: liudan.ntlworld.com
Thanks for your help Rich. I've had a look at the help file but it doesn't seem to help much.
I have a Table that has 0 rows at design time. It would have about 10 rows at runtime, How do I make it a fixed size at 10 rows at time without adding 10 rows at design time ?
also, I have a Text that spans 3 columns. It's empty at design but would display 5 words at runtime. However, it only shows 1.5 words at runtime and it doesn't use another 2 columns. I don't understand it.
Does gridlayout provide a way to resize things at runtime instead of design time?
|
|
|
|
|
Re: SWT problem: unable to change size when gridlayout is used [message #615004 is a reply to message #134997] |
Thu, 18 January 2007 15:41 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
You don't change sizes when you have a layout manager. That is the
purpose of the layout manager, to let it control the size and position
of your components.
Look in the Eclipse VE help. Search for "using gridlayout (SWT)" This
will explain how to work with the SWT GridLayout and the Ve.
--
Thanks,
Rich Kulp
|
|
|
Re: SWT problem: unable to change size when gridlayout is used [message #615005 is a reply to message #135008] |
Thu, 18 January 2007 19:21 |
Eclipse User |
|
|
|
Originally posted by: liudan.ntlworld.com
Thanks for your help Rich. I've had a look at the help file but it doesn't seem to help much.
I have a Table that has 0 rows at design time. It would have about 10 rows at runtime, How do I make it a fixed size at 10 rows at time without adding 10 rows at design time ?
also, I have a Text that spans 3 columns. It's empty at design but would display 5 words at runtime. However, it only shows 1.5 words at runtime and it doesn't use another 2 columns. I don't understand it.
Does gridlayout provide a way to resize things at runtime instead of design time?
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03781 seconds