conversion of field margins from older version to 8

hh hh at hyperhh.de
Tue Oct 25 08:45:59 EDT 2016


The text measurement of LC 8 was a lot improved for using 'modern'
fonts. The _only_ disadvantage to see is the 'topmargin-bug'
depending also on the font used (has it 'good' font metrics?).

With my standard field-settings (LC's default) I use in
preopenCard or preopenStack or ... preopenControl ;-)

-- adjust to your needs, may depend
-- on inherited textFont and textSize
-- standard of LC 8 and later is tM=8
  if the version > 7 then put 6 into tM
  else put 4 into tM
  repeat with i=1 to the num of flds <of this card/group/stack>
     set topMargin of fld i <of this card/group/stack> to tM
  end repeat
  set topMargin of the templateField to tM
 
or change it _once_ based on old:
  set topMargin of fld i to 2+the topMargin of fld i

or set it based on textSize, textFont and textStyle,
or set it based on platform and operating system version,
or set it based on printer resolution ...




More information about the use-livecode mailing list