Vertically aligning text in a field

BNig bernd.niggemann at uni-wh.de
Fri Dec 19 18:02:53 EST 2014


Hi Terry,

Look at my reply to Geoff. I think this is more the solution you need
because that code makes no assumptions about fixed textHeight, line wrapping
and so on. It should work for any type of field and center what is visible
vertically.

Kind regards
Bernd


Terence Heaford 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





--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Vertically-aligning-text-in-a-field-tp4686824p4686970.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list