Home » Archived » Visual Editor (VE) » GridbagLayout problems
GridbagLayout problems [message #54371] |
Wed, 04 August 2004 07:04 ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eric Camden![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=adampauls%40yahoo.ca) Messages: 19 Registered: July 2009 |
Junior Member |
|
|
I am having trouble getting the visual editor to layout components in a
gridbaglayout the way they should. All I want is a grid with 4 components:
2 of equal height on the left, and on the right, one small component
followed by one large component. In ascii:
------------------------|-----------------
|
| comp 1 comp 2
| |-----------------
| |
| |
| |
------------------------|
| |
|
| comp 3
| comp 4
|
|
------------------------|
Currently, I have comp1 with grid height 2, comp 2 with grid height 1,
comp 4 with grid height 1, and comp 3 with grid height 2. But no matter
how I adjust sizes, comp 1 and comp 2 are always identically sized, as are
comp 4 and comp 3. Is this something wrong with the VE, or something I
don't understand about GridBagLayout?
Oh, and I also just switched to M2, and I've noticed that you can no
longer double click a label/button to set its text. Is this a bug or a
feature?
|
|
|
Re: GridbagLayout problems [message #54454 is a reply to message #54371] |
Wed, 04 August 2004 14:01 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) ![Go to next message Go to next message](theme/Solstice/images/down.png) |
Eclipse User![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=) |
|
|
|
Originally posted by: myersj.nospam.us.ibm.com
Hi Eric,
This is a fairly odd situation. The reason you're not getting the
behavior you're expecting is that there's nothing in the second row to
define its height, so the row has a height of 0. After a little fooling
around I came up with a way to get what I think you want.
Set the constraints of the components as follows:
1: x: 0, y: 0, grid height: 2, weight y: 1, fill: vertical
2: x: 1, y: 0, grid height: 1, weight y: 0, fill: none
3: x: 1, y: 1, grid height: 3, weight y: 1, fill: vertical
4: x: 0, y: 2, grid height: 2, weight y: 1, fill: vertical
Direct editing should still work, but the activation is by selecting
something twice, not double clicking. If you double click it may happen
too quickly for it to register as double selection. (it's supposed to
work the same way you can rename a file in Windows Explorer by double
selecting the file)
Hope this helps,
- Jeff
Eric Camden wrote:
> I am having trouble getting the visual editor to layout components in a
> gridbaglayout the way they should. All I want is a grid with 4 components:
> 2 of equal height on the left, and on the right, one small component
> followed by one large component. In ascii:
>
> ------------------------|-----------------
> |
> | comp 1 comp 2
> | |-----------------
> | |
> | |
> | |
> ------------------------|
> | |
> |
> | comp 3
> | comp 4
> |
> |
> ------------------------|
>
> Currently, I have comp1 with grid height 2, comp 2 with grid height 1,
> comp 4 with grid height 1, and comp 3 with grid height 2. But no matter
> how I adjust sizes, comp 1 and comp 2 are always identically sized, as are
> comp 4 and comp 3. Is this something wrong with the VE, or something I
> don't understand about GridBagLayout?
>
> Oh, and I also just switched to M2, and I've noticed that you can no
> longer double click a label/button to set its text. Is this a bug or a
> feature?
>
|
|
|
Re: GridbagLayout problems [message #54677 is a reply to message #54454] |
Thu, 05 August 2004 00:36 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eric Camden![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=adampauls%40yahoo.ca) Messages: 19 Registered: July 2009 |
Junior Member |
|
|
Thank you, for both answers. Indeed, all I needed to do was turn the
y-weight of component 2 to 0, and problem solved. In my humble opinion,
this is a bit of a flaw in the design of GridBagLayout, but oh well, can't
have everything you want.
Jeff Myers wrote:
> Hi Eric,
> This is a fairly odd situation. The reason you're not getting the
> behavior you're expecting is that there's nothing in the second row to
> define its height, so the row has a height of 0. After a little fooling
> around I came up with a way to get what I think you want.
> Set the constraints of the components as follows:
> 1: x: 0, y: 0, grid height: 2, weight y: 1, fill: vertical
> 2: x: 1, y: 0, grid height: 1, weight y: 0, fill: none
> 3: x: 1, y: 1, grid height: 3, weight y: 1, fill: vertical
> 4: x: 0, y: 2, grid height: 2, weight y: 1, fill: vertical
> Direct editing should still work, but the activation is by selecting
> something twice, not double clicking. If you double click it may happen
> too quickly for it to register as double selection. (it's supposed to
> work the same way you can rename a file in Windows Explorer by double
> selecting the file)
> Hope this helps,
> - Jeff
> Eric Camden wrote:
> > I am having trouble getting the visual editor to layout components in a
> > gridbaglayout the way they should. All I want is a grid with 4 components:
> > 2 of equal height on the left, and on the right, one small component
> > followed by one large component. In ascii:
> >
> > ------------------------|-----------------
> > |
> > | comp 1 comp 2
> > | |-----------------
> > | |
> > | |
> > | |
> > ------------------------|
> > | |
> > |
> > | comp 3
> > | comp 4
> > |
> > |
> > ------------------------|
> >
> > Currently, I have comp1 with grid height 2, comp 2 with grid height 1,
> > comp 4 with grid height 1, and comp 3 with grid height 2. But no matter
> > how I adjust sizes, comp 1 and comp 2 are always identically sized, as are
> > comp 4 and comp 3. Is this something wrong with the VE, or something I
> > don't understand about GridBagLayout?
> >
> > Oh, and I also just switched to M2, and I've noticed that you can no
> > longer double click a label/button to set its text. Is this a bug or a
> > feature?
> >
|
|
|
Re: GridbagLayout problems [message #596699 is a reply to message #54371] |
Wed, 04 August 2004 14:01 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Jeff Myers![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=binarydreams%40yahoo.com) Messages: 396 Registered: July 2009 |
Senior Member |
|
|
Hi Eric,
This is a fairly odd situation. The reason you're not getting the
behavior you're expecting is that there's nothing in the second row to
define its height, so the row has a height of 0. After a little fooling
around I came up with a way to get what I think you want.
Set the constraints of the components as follows:
1: x: 0, y: 0, grid height: 2, weight y: 1, fill: vertical
2: x: 1, y: 0, grid height: 1, weight y: 0, fill: none
3: x: 1, y: 1, grid height: 3, weight y: 1, fill: vertical
4: x: 0, y: 2, grid height: 2, weight y: 1, fill: vertical
Direct editing should still work, but the activation is by selecting
something twice, not double clicking. If you double click it may happen
too quickly for it to register as double selection. (it's supposed to
work the same way you can rename a file in Windows Explorer by double
selecting the file)
Hope this helps,
- Jeff
Eric Camden wrote:
> I am having trouble getting the visual editor to layout components in a
> gridbaglayout the way they should. All I want is a grid with 4 components:
> 2 of equal height on the left, and on the right, one small component
> followed by one large component. In ascii:
>
> ------------------------|-----------------
> |
> | comp 1 comp 2
> | |-----------------
> | |
> | |
> | |
> ------------------------|
> | |
> |
> | comp 3
> | comp 4
> |
> |
> ------------------------|
>
> Currently, I have comp1 with grid height 2, comp 2 with grid height 1,
> comp 4 with grid height 1, and comp 3 with grid height 2. But no matter
> how I adjust sizes, comp 1 and comp 2 are always identically sized, as are
> comp 4 and comp 3. Is this something wrong with the VE, or something I
> don't understand about GridBagLayout?
>
> Oh, and I also just switched to M2, and I've noticed that you can no
> longer double click a label/button to set its text. Is this a bug or a
> feature?
>
|
|
|
Re: GridbagLayout problems [message #596768 is a reply to message #54454] |
Thu, 05 August 2004 00:36 ![Go to previous message Go to previous message](theme/Solstice/images/up.png) |
Eric Camden![Friend of Eclipse Friend](/donate/web-api/friends_decorator.php?email=adampauls%40yahoo.ca) Messages: 19 Registered: July 2009 |
Junior Member |
|
|
Thank you, for both answers. Indeed, all I needed to do was turn the
y-weight of component 2 to 0, and problem solved. In my humble opinion,
this is a bit of a flaw in the design of GridBagLayout, but oh well, can't
have everything you want.
Jeff Myers wrote:
> Hi Eric,
> This is a fairly odd situation. The reason you're not getting the
> behavior you're expecting is that there's nothing in the second row to
> define its height, so the row has a height of 0. After a little fooling
> around I came up with a way to get what I think you want.
> Set the constraints of the components as follows:
> 1: x: 0, y: 0, grid height: 2, weight y: 1, fill: vertical
> 2: x: 1, y: 0, grid height: 1, weight y: 0, fill: none
> 3: x: 1, y: 1, grid height: 3, weight y: 1, fill: vertical
> 4: x: 0, y: 2, grid height: 2, weight y: 1, fill: vertical
> Direct editing should still work, but the activation is by selecting
> something twice, not double clicking. If you double click it may happen
> too quickly for it to register as double selection. (it's supposed to
> work the same way you can rename a file in Windows Explorer by double
> selecting the file)
> Hope this helps,
> - Jeff
> Eric Camden wrote:
> > I am having trouble getting the visual editor to layout components in a
> > gridbaglayout the way they should. All I want is a grid with 4 components:
> > 2 of equal height on the left, and on the right, one small component
> > followed by one large component. In ascii:
> >
> > ------------------------|-----------------
> > |
> > | comp 1 comp 2
> > | |-----------------
> > | |
> > | |
> > | |
> > ------------------------|
> > | |
> > |
> > | comp 3
> > | comp 4
> > |
> > |
> > ------------------------|
> >
> > Currently, I have comp1 with grid height 2, comp 2 with grid height 1,
> > comp 4 with grid height 1, and comp 3 with grid height 2. But no matter
> > how I adjust sizes, comp 1 and comp 2 are always identically sized, as are
> > comp 4 and comp 3. Is this something wrong with the VE, or something I
> > don't understand about GridBagLayout?
> >
> > Oh, and I also just switched to M2, and I've noticed that you can no
> > longer double click a label/button to set its text. Is this a bug or a
> > feature?
> >
|
|
|
Goto Forum:
Current Time: Sat Aug 24 12:48:06 GMT 2024
Powered by FUDForum. Page generated in 0.02798 seconds
|