Re: xControls How To

new topic     » goto parent     » topic index » view thread      » older message » newer message

> > > 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.

> xControls would have to see that I've already defined a height for
> the control that is -5 of 100% of the parent. When it receives another
> height spec for that same control, it will then have to add it to
> some spec list that supplements it... 
> 
> -5 of 100% of the parent up to 132.
> 
> -- the first manage spec for GMID win_Floor...
> -- provides a static width ({win_Floor,164}) and variable height ({1.0,-5})
> manage( GMID, win_Floor, {0,4}, {0,224}, {win_Floor,164}, {1.0,-5} )
> -- this second manage spec is 75% the same as the last
> -- but now provides a max height in {win_Floor, 132}
> manage( GMID, win_Floor, {0,4}, {0,224}, {win_Floor,164}, {win_Floor,132} )

Ahhh now I see what you meant.  I read that wrong the first time, but
the same general principle applies here also.  I should explain this
better...

Shortly after Geometry was released, it was suggested (by Derek?) that
it would be nice to have the ability to change settings for the controls
after they were already defined...

Original code:
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 was an error originally because the lib couldnt handle redefinitions.

Modified:
This was ok now.  It would be redefined to the second.  And actually this
is how I was able to provide a solution to your problem via the extra
little routine to your code.  I cant change this to your requested
syntax without breaking existing applications that currently use this
method.

> Good points. You know how us users have to push for more functionality
> from our favorite libraries... :P
> 
> > Basically it gets down to adding something like this would require alot
> > of conditional checks and code.  While it would make your application
> > smaller and easier to read, for anyone not actually using this kind of
> > window they would suffer a performance hit.
> 
> I doubt it would be that drastic a hit. In fact, it might just add
> an item or two to the "basic loop" you reference above. However, since
> you authored the thing, I'll take your word for it... for now. ;)

While I still do not think Geometry should support this, I *do* think
LimitSize should be looked into a bit closer.  Its main purpose is to
limiting the size of main applications, but I see no reason off the top
of my head why controls cant be handled... I remember an earlier post from
you stating you tried it so I am assuming that it did not work.  I will
look into this as I might be able to come up with something along those
lines.


Don Phillips - aka Graebel
     National Instruments
     mailto: eunexus @ yahoo.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu