Re: xControls How To
- Posted by cklester <cklester at yahoo.com> Jul 08, 2004
- 492 views
Don wrote: > > > Hows this? Child is a constant 200 pixels... > > > If the parent window is 300 pixels or less, it will stick to the bottom; > > > otherwise it will be a constant height as well... > > > > Now, can it be incorporated directly into the > > xControls library? > > Hmm, no I dont think so. xControls is supposed to be as generic as > possible and this is quite specific. What about something like this: manage( GMID, win_Floor, {0,4}, {0,224}, {win_Floor,164}, {1.0,-5} ) manage( GMID, win_Floor, {0,4}, {0,224}, {win_Floor,164}, {win_Floor,132} ) This would apply a variable height relative to the parent control, up to a maximum of 132. Or use a supplement... manage( GMID, win_Floor, {0,4}, {0,224}, {win_Floor,164}, {1.0,-5} ) manage_max( win_Floor, 0, 132 ) -- width, height This enhances the library in a logical way. > Plus adding in this kind of > functionality is A) quite easy as it is IMO, this goes against the purpose of the xControls library, which is to automagically manage sizes and positions without having to use extra code. > and B) would muddy up the > control creation syntax wise. Using the above syntax, I don't think it muddies it. > I would just cut and paste the above routine right in your program > as is. Yes, it works fine! > Of course, if a lot of people start screaming about this I > will of course try and support it. Thanks, Don! IOU. :) -=ck "Programming in a state of EUPHORIA."