problem with grid layout [message #70355] |
Mon, 08 November 2004 13:50  |
Eclipse User |
|
|
|
Originally posted by: pk.srivastava.google.com
am using 3.1, VE 1.0.1 .
when I set the layout of a panel to gridlayout (3,2) and then add a
component to the panel (drag and drop or add(component) ) it takes up an
entire row ie. it shows just one column. tried to manually code in the
gridlayout in the generated source but to no avail.
help.
am I doing something wrong or is VE plain stupid?
|
|
|
Re: problem with grid layout [message #70378 is a reply to message #70355] |
Mon, 08 November 2004 13:58  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
I presume you are talking AWT GridLayout and not SWT. You can't set both
rows and columns in a grid layout. Setting rows causes columns to be
ignored. From the grid layout comments:
When both the number of rows and the number of columns have
* been set to non-zero values, either by a constructor or
* by the <tt>setRows</tt> and <tt>setColumns</tt> methods, the number of
* columns specified is ignored. Instead, the number of
* columns is determined from the specified number or rows
* and the total number of components in the layout. So, for
* example, if three rows and two columns have been specified
* and nine components are added to the layout, they will
* be displayed as three rows of three columns. Specifying
* the number of columns affects the layout only when the
* number of rows is set to zero.
--
Thanks,
Rich Kulp
|
|
|
Re: problem with grid layout [message #602728 is a reply to message #70355] |
Mon, 08 November 2004 13:58  |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
I presume you are talking AWT GridLayout and not SWT. You can't set both
rows and columns in a grid layout. Setting rows causes columns to be
ignored. From the grid layout comments:
When both the number of rows and the number of columns have
* been set to non-zero values, either by a constructor or
* by the <tt>setRows</tt> and <tt>setColumns</tt> methods, the number of
* columns specified is ignored. Instead, the number of
* columns is determined from the specified number or rows
* and the total number of components in the layout. So, for
* example, if three rows and two columns have been specified
* and nine components are added to the layout, they will
* be displayed as three rows of three columns. Specifying
* the number of columns affects the layout only when the
* number of rows is set to zero.
--
Thanks,
Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.04158 seconds