Aligning Baselines of Different Objects

Ken Ray kray at sonsothunder.com
Sat Jun 28 17:12:00 EDT 2003


Igor,

Could you set the margins of the field to match the "margins" of the button
and then adjust them accordingly? That is, if the button when it resizes
gets a virtual top and bottom margin of 6, couldn't you set the margins of
the corresponding field to 0,6,0,6 ?

Ken Ray
Sons of Thunder Software
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/


> From:     Igor Couto <igor at pixelmedia.com.au>
> Reply-To: use-revolution at lists.runrev.com
> Date: Sat, 28 Jun 2003 15:21:20 +1000
> To:     use-revolution at lists.runrev.com
> Subject: Aligning Baselines of Different Objects
> 
> Dear Revolutionaries,
> 
> I wonder if anyone has a neat, simple way to vertically align the
> baseline of text in a pulldown menu, with the baseline of text in a
> field. My problem is the following:
> 
> PROBLEM:
> I have 2 objects, a pulldown menu, and a field, side by side, on a
> card. The user has the option of changing the textSize of both,
> simultaneously, and when he/she does, both objects should resize to
> accomodate the text. The issue arises with the fact that the text in
> the pulldown menu is CENTRED vertically in along the height, while the
> text in the field is TOP ALIGNED. Even though both items have the SAME
> BORDER, SAME MARGINS, SAME TEXT SIZE, SAME FONT, ETC, the reported
> formattedHeight of both is different. Resizing them to their
> formattedHeigh (or even textSize), and then trying to align the
> top/bottom/center of the objects works for some text sizes, but not for
> others. So: how can I keep the baselines of the 2 objects aligned, when
> the textSize of the objects is changed?
> 
> If anyone has found a neat formula, or written a script, I would
> really, really appreciate some pointers!
> 
> Kind Regards,
> --
> Igor de Oliveira Couto
> ----------------------------------
> igor at pixelmedia.com.au
> ----------------------------------
> 
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list