What requirement am I missing that this isn't sufficient -- and capable of handling multiple fonts and font sizes throughout the text?
get the formattedrect of line 1 to -1 of fld 1 set the topmargin of fld 1 to (the height of fld 1 - item 4 of it + item 2 of it) div 2 On Fri, Dec 19, 2014 at 1:52 PM, Terence Heaford <t.heaf...@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.niggem...@uni-wh.de> wrote: > > > > Did the code "you came across" not do what you wanted? > > _______________________________________________ > use-livecode mailing list > use-livecode@lists.runrev.com > Please visit this url to subscribe, unsubscribe and manage your > subscription preferences: > http://lists.runrev.com/mailman/listinfo/use-livecode > _______________________________________________ use-livecode mailing list use-livecode@lists.runrev.com Please visit this url to subscribe, unsubscribe and manage your subscription preferences: http://lists.runrev.com/mailman/listinfo/use-livecode