Vertical Centering Text
dan at clearvisiontech.com
Wed Apr 9 21:30:01 EDT 2003
Does anyone already have a function for setting a fields topMargin so that
it's text is centered vertically?
I got this far (don't laugh!)... Which works fine for some font sizes... But
others are not right.
on fixLineHeight tFieldID
put the formattedHeight of line 1 of field id tFieldID into tHeight
put the formattedHeight of char 1 of field id tFieldID into cHeight
put the height of field id tFieldID into fHeight
set the topMargin of field id tFieldID to ((((fHeight - tHeight)/2) +
More information about the Use-livecode