The fuelgauge at the bottom right annoyingly forces itself to a certain minimum height that is higher than the string field to the left of it. Does anyone have an idea on how to force it to follow the same height?
String.gadgets are not proportional vertically so when put next to other gadgets, they may have different height. Doing what Chris said will force all gadgets in the group to have the same minimum height (and lose proportionality).
I vaguely recollect from memory that you must put CHILD_WeightedHeight, 0 after your HGroupObject definition, not inside - that is, after the HGroupObject's LayoutEnd. Have yout tried that?
That's quite strange! I've just compiled a test GUI under OS3.9, and it does work as I described earlier: the string gadget and the gauge are placed in one horizontal group and both are made unproportional vertically through a common CHILD_WeightedHeight, 0. The code snippet:
Does that code snippet make the guage smaller or the string gad taller?
The biggest difference between your code and orgins I can see is that you have a sing hgroup whereas orgin has each gadget inside an hgroup within the outer one. That could be undoing the effects of the WeightedHeight...
> Does that code snippet make the guage smaller > or the string gad taller?
AFAIK string gadgets are never proportional vertically, their actual height depends on font size and is fixed (at least that was the case under OS3.x). So it is the gauge that is made the same height as the string in my example.
You're right. I've removed the gauge ticks, added a button to the HGroupObject, and it now looks like below.
The button and the gauge are forced to the same minimum height while the string gadget is a little smaller than the two. This is under OS3.9. Sorry I'm lost here, can't help.
It might look the same, but it isn't. The subtle difference is that the string and the fuelguage are in the same hgroup, and the WeightedHeight tag is applied to the layout, not each object.
The WeightedWidth tag is so that the fuelguage does not occupy 50% of the layout width, only 20%.
IIRC I was having the same problem when programming ARexx GUI with AWNPipe. I solved the design problem by suppressing the readonly string gadget, kept only the fuelgauge and put the text inside it. Saved a few bytes in the end.
Edit:typos
Bye, TMTisFree
"Never ascribe to malice that which is adequately explained by incompetence." (Napol?on Bonaparte) "I would love to change the world, but they won?t give me the source code." (Unknown)