Who's Online
117 user(s) are online (
109 user(s) are browsing
Forums )
Members: 2
Guests: 115
Rigo ,
hlt ,
more...
Topic options
View mode
Newest First
[SOLVED] Fuelgauge height
Posted on:
2009/5/15 21:25
#1
Supreme Council
Joined: 2006/11/16 19:25Last Login
: Yesterday 16:40
From Sweden
Group:
Webmasters Moderators Staff members Staff members Moderators Staff members Staff members
Looking at this image:
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?
Edited by orgin on 2009/5/16 22:35:16
Vacca foeda. Sum, ergo edo Mr Bobo Cornwater
Re: Fuelgauge height
Posted on:
2009/5/15 22:04
#2
Amigans Defender
Joined: 2006/11/17 22:40Last Login
: Yesterday 20:40
From England
Group:
Registered Users Moderators
@orgin Put it in a HGroup with the string gadget, and set CHILD_WeightedHeight,0.
Re: Fuelgauge height
Posted on:
2009/5/15 23:43
#3
Amigans Defender
Joined: 2009/5/1 18:57Last Login
: Today 8:27
From Czech Republic
Group:
Registered Users Staff members Moderators
@orgin 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).
Re: Fuelgauge height
Posted on:
2009/5/16 1:06
#4
Supreme Council
Joined: 2006/11/16 19:25Last Login
: Yesterday 16:40
From Sweden
Group:
Webmasters Moderators Staff members Staff members Moderators Staff members Staff members
@Chris
Didn't help, tried a gazillion different combinations back and forth and whetever I did they refused to get the same height.
I reverted the code back to what I started with below:
LAYOUT_AddChild , HGroupObject , LAYOUT_FixedVert , FALSE , LAYOUT_AddChild , HGroupObject , LAYOUT_AddChild , inst -> Gad [ GID_StatusBar ] = StringObject , GA_ID , GID_StatusBar , GA_RelVerify , TRUE , GA_GadgetHelp , FALSE , GA_ReadOnly , TRUE , STRINGA_TextVal , "" , STRINGA_MaxChars , 256 , End , LayoutEnd , LAYOUT_AddChild , HGroupObject , LAYOUT_FixedHoriz , FALSE , CHILD_WeightedHeight , 0 , LAYOUT_AddChild , FuelGaugeObject , //GA_ID, GID_, GA_Text , "DH2: 3%" , FUELGAUGE_Justification , FGJ_CENTER , FUELGAUGE_Min , 0 , FUELGAUGE_Max , 99 , FUELGAUGE_Percent , FALSE , FUELGAUGE_Ticks , 0 , FUELGAUGE_Level , 25 , FuelGaugeEnd , LayoutEnd , LayoutEnd ,
Any idea how to change it?
Vacca foeda. Sum, ergo edo Mr Bobo Cornwater
Re: Fuelgauge height
Posted on:
2009/5/16 9:01
#5
Amigans Defender
Joined: 2009/5/1 18:57Last Login
: Today 8:27
From Czech Republic
Group:
Registered Users Staff members Moderators
@orgin 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?
Re: Fuelgauge height
Posted on:
2009/5/16 9:48
#6
Supreme Council
Joined: 2006/11/16 19:25Last Login
: Yesterday 16:40
From Sweden
Group:
Webmasters Moderators Staff members Staff members Moderators Staff members Staff members
@trixie Made no difference.
Vacca foeda. Sum, ergo edo Mr Bobo Cornwater
Re: Fuelgauge height
Posted on:
2009/5/16 11:43
#7
Amigans Defender
Joined: 2009/5/1 18:57Last Login
: Today 8:27
From Czech Republic
Group:
Registered Users Staff members Moderators
@orgin 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: ... LAYOUT_AddChild, HGroupObject, LAYOUT_AddChild, StringObject, GA_ID, GID_STRING, GA_RelVerify, TRUE, End, /* string */ LAYOUT_AddChild, FuelGaugeObject, GA_ID, GID_GAUGE, GA_RelVerify, TRUE, End, /* fuelgauge */ End, /* HGroup */ CHILD_WeightedHeight, 0, ...
Re: Fuelgauge height
Posted on:
2009/5/16 12:47
#8
Home away from home
Joined: 2006/12/4 23:15Last Login
: 10/14 16:04
Group:
Registered Users
@trixie 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...
Re: Fuelgauge height
Posted on:
2009/5/16 12:53
#9
Supreme Council
Joined: 2006/11/19 18:16Last Login
: Today 9:46
From London, England
Group:
Webmasters Registered Users
@orgin
Try something like this:
LAYOUT_AddChild , HGroupObject ,
LAYOUT_FixedVert , FALSE ,
LAYOUT_AddChild , HGroupObject ,
LAYOUT_AddChild , inst -> Gad [ GID_StatusBar ] = StringObject ,
GA_ID , GID_StatusBar ,
GA_RelVerify , TRUE ,
GA_GadgetHelp , FALSE ,
GA_ReadOnly , TRUE ,
STRINGA_TextVal , "" ,
STRINGA_MaxChars , 256 ,
StringEnd ,
LAYOUT_AddChild , FuelGaugeObject ,
//GA_ID, GID_,
GA_Text , "DH2: 3%" ,
FUELGAUGE_Justification , FGJ_CENTER ,
FUELGAUGE_Min , 0 ,
FUELGAUGE_Max , 99 ,
FUELGAUGE_Percent , FALSE ,
FUELGAUGE_Ticks , 0 ,
FUELGAUGE_Level , 25 ,
FuelGaugeEnd ,
CHILD_WeightedWidth , 20 ,
LayoutEnd ,
CHILD_WeightedHeight , 0 ,
LayoutEnd ,
Re: Fuelgauge height
Posted on:
2009/5/16 12:54
#10
Supreme Council
Joined: 2006/11/16 19:25Last Login
: Yesterday 16:40
From Sweden
Group:
Webmasters Moderators Staff members Staff members Moderators Staff members Staff members
@trixie
Looks like this:
Vacca foeda. Sum, ergo edo Mr Bobo Cornwater
Re: Fuelgauge height
Posted on:
2009/5/16 12:58
#11
Supreme Council
Joined: 2006/11/16 19:25Last Login
: Yesterday 16:40
From Sweden
Group:
Webmasters Moderators Staff members Staff members Moderators Staff members Staff members
@Rigo Looks the same as the post above this one.
Vacca foeda. Sum, ergo edo Mr Bobo Cornwater
Re: Fuelgauge height
Posted on:
2009/5/16 13:11
#12
Amigans Defender
Joined: 2009/5/1 18:57Last Login
: Today 8:27
From Czech Republic
Group:
Registered Users Staff members Moderators
@broadblues > 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.
Re: Fuelgauge height
Posted on:
2009/5/16 14:12
#13
Amigans Defender
Joined: 2009/5/1 18:57Last Login
: Today 8:27
From Czech Republic
Group:
Registered Users Staff members Moderators
@orgin
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.
Re: Fuelgauge height
Posted on:
2009/5/16 14:53
#14
Supreme Council
Joined: 2006/11/19 18:16Last Login
: Today 9:46
From London, England
Group:
Webmasters Registered Users
@orgin 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%. Simon
Re: Fuelgauge height
Posted on:
2009/5/16 15:18
#15
Supreme Council
Joined: 2006/11/16 19:25Last Login
: Yesterday 16:40
From Sweden
Group:
Webmasters Moderators Staff members Staff members Moderators Staff members Staff members
@Rigo
Just to indulge you I uploaded a snapshot of your 'solution'.
Vacca foeda. Sum, ergo edo Mr Bobo Cornwater
Re: Fuelgauge height
Posted on:
2009/5/16 17:12
#16
Supreme Council
Joined: 2006/11/19 18:16Last Login
: Today 9:46
From London, England
Group:
Webmasters Registered Users
@orgin Try adding CHILD_WeightMinimum, TRUE to the HGroupObject that contains the two gadgets. Simon
Re: Fuelgauge height
Posted on:
2009/5/16 17:17
#17
Just popping in
Joined: 2006/12/5 20:43Last Login
: 2010/3/14 9:00
From Nice, so nice
Group:
Registered Users
@orgin 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)
Re: Fuelgauge height
Posted on:
2009/5/16 18:45
#18
Amigans Defender
Joined: 2009/5/1 18:57Last Login
: Today 8:27
From Czech Republic
Group:
Registered Users Staff members Moderators
@Rigo No that didn't help. But the following placement of CHILD_MinHeight did, at least in my OS3.x test GUI: ... LAYOUT_AddChild, HGroupObject, LAYOUT_AddChild, StringObject, GA_ID, GID_STRING, GA_RelVerify, TRUE, End, /* string */ LAYOUT_AddChild, FuelGaugeObject, GA_ID, GID_GAUGE, GA_RelVerify, TRUE, FUELGAUGE_Ticks, FALSE, End, /* fuelgauge */ CHILD_MinHeight, TRUE, End, /* HGroup */ CHILD_WeightedHeight, 0, ... Thanks for the tip, Rigo!
Re: Fuelgauge height
Posted on:
2009/5/16 21:49
#19
Supreme Council
Joined: 2006/11/16 19:25Last Login
: Yesterday 16:40
From Sweden
Group:
Webmasters Moderators Staff members Staff members Moderators Staff members Staff members
@trixie&Rigo
OKey thanks, got it to work now.
LAYOUT_AddChild , HGroupObject , LAYOUT_FixedVert , FALSE , LAYOUT_AddChild , HGroupObject , LAYOUT_AddChild , HGroupObject , LAYOUT_AddChild , inst -> Gad [ GID_StatusBar ] = StringObject , GA_ID , GID_StatusBar , GA_RelVerify , TRUE , GA_GadgetHelp , FALSE , GA_ReadOnly , TRUE , STRINGA_TextVal , "" , STRINGA_MaxChars , 256 , End , LayoutEnd , LAYOUT_AddChild , HGroupObject , LAYOUT_FixedHoriz , FALSE , LAYOUT_AddChild , FuelGaugeObject , //GA_ID, GID_, GA_Text , "DH2: 3%" , FUELGAUGE_Justification , FGJ_CENTER , FUELGAUGE_Min , 0 , FUELGAUGE_Max , 99 , FUELGAUGE_Percent , FALSE , FUELGAUGE_Ticks , 0 , FUELGAUGE_Level , 3 , FuelGaugeEnd , CHILD_MinHeight , TRUE , LayoutEnd , LayoutEnd , CHILD_WeightedHeight , 0 , LayoutEnd ,
Vacca foeda. Sum, ergo edo Mr Bobo Cornwater
Re: Fuelgauge height
Posted on:
2009/5/16 22:48
#20
Amigans Defender
Joined: 2009/5/1 18:57Last Login
: Today 8:27
From Czech Republic
Group:
Registered Users Staff members Moderators
@orgin
Great to hear it works! Here's a pint of Guinness to another Filer betaversion!
Currently Active Users Viewing This Thread:
1
(
0 members
and 1 Anonymous Users
)