Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » SWT problem: unable to change size when gridlayout is used
SWT problem: unable to change size when gridlayout is used [message #134997] Thu, 18 January 2007 01:06 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 #135031 is a reply to message #135021] Thu, 18 January 2007 22:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

You need to understand what a GridLayout is before you can go any further.

See:

http://www.eclipse.org/articles/Article-Understanding-Layout s/Understanding-Layouts.htm

After you get a grasp of that, then you can look at this tutorial to see
how it is used in VE:

http://www.eclipse.org/vep/WebContent/docs/v1.1/VE11grid.htm l

dan2000 wrote:
> 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?

--
Thanks,
Rich Kulp
Re: SWT problem: unable to change size when gridlayout is used [message #135043 is a reply to message #135031] Fri, 19 January 2007 01:11 Go to previous message
Eclipse UserFriend
Originally posted by: liudan.ntlworld.com

Great links. solved my problem. Thanks a lot. I have just realized VE is so powerful.
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 Go to previous message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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 #615006 is a reply to message #135021] Thu, 18 January 2007 22:34 Go to previous message
Eclipse UserFriend
Originally posted by: richkulp.us.NO_SPAM.ibm.com

You need to understand what a GridLayout is before you can go any further.

See:

http://www.eclipse.org/articles/Article-Understanding-Layout s/Understanding-Layouts.htm

After you get a grasp of that, then you can look at this tutorial to see
how it is used in VE:

http://www.eclipse.org/vep/WebContent/docs/v1.1/VE11grid.htm l

dan2000 wrote:
> 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?

--
Thanks,
Rich Kulp
Re: SWT problem: unable to change size when gridlayout is used [message #615007 is a reply to message #135031] Fri, 19 January 2007 01:11 Go to previous message
Eclipse UserFriend
Originally posted by: liudan.ntlworld.com

Great links. solved my problem. Thanks a lot. I have just realized VE is so powerful.
Previous Topic:SWT problem: unable to change size when gridlayout is used
Next Topic:Extending and adding a SWT Button as a new control in Visual Editor
Goto Forum:
  


Current Time: Wed Apr 24 16:36:27 GMT 2024

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

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

Back to the top