Vertically aligning text in a field

Scott Rossi scott at tactilemedia.com
Fri Dec 19 15:35:47 EST 2014


Hi Terry:

FWIW, I¹ve never been able to get the field adjustment code working for
anything but default text.  I¹ve pretty much given up on using fields for
vertically centered text and use buttons where possible.  Once you
establish a topMargin offset to center the text (you can use a negative
margin value via script even though the Inspector doesn¹t accept negative
numbers), the text will automatically stay vertically centered, regardless
of how the button is scaled.

Regards,

Scott Rossi
Creative Director
Tactile Media, UX/UI Design




On 12/19/14, 11:52 AM, "Terence Heaford" <t.heaford at btinternet.com> wrote:

>Thank you very much for this code.
>
>I was surprised that LC did not have an option for vertically aligned
>text in a field and on searching the forum found your method.
>
>However, on my iMac the offset calculation did not seem to work precisely
>and I had to adjust it slightly.
>
>As I am creating a report stack for printing tables that may have
>different fonts and font sizes with different row(field) heights provided
>as parameters I was looking for a reliable way to centre text vertically
>with the possibility of many options.
>
>Thanks again, this really looks like the answer. I will report back if
>anything looks odd in testing.
>
>All the best
>
>Terry
> 
>> On 19 Dec 2014, at 17:32, BNig <bernd.niggemann at uni-wh.de> wrote:
>> 
>> Did the code "you came across" not do what you wanted?
>
>_______________________________________________
>use-livecode mailing list
>use-livecode at lists.runrev.com
>Please visit this url to subscribe, unsubscribe and manage your
>subscription preferences:
>http://lists.runrev.com/mailman/listinfo/use-livecode






More information about the use-livecode mailing list