Formatted text in a field.

Peter Haworth pete at
Thu Apr 3 00:44:06 EDT 2014

Not sure if this helps but as of 6.1 there is a property named pageheights
which lists, one per line, the height in pixels of each page of a field.
 Check the dictionary for more details.

lcSQL Software <>
Home of lcStackBrowser <> and
SQLiteAdmin <>

On Wed, Apr 2, 2014 at 5:29 PM, James Hale <james at> wrote:

> Regarding paging of text.
> I too have wanted to do this and have been flummoxed by the nature of text
> fields and their visual appearance capabilities. Unfair I know but still
> annoying.
> I borrowed a solution from a stack on Livecodeshare (the name of which
> escapes me, not being at my desk.)
> Firstly you will need to set the text height as fixed for the fields to
> get any consistency in the results.
> Unless there is a large difference in text heights within the field I have
> found it safe to set a value that accommodates the largest and leave it at
> that. Sure the visual line spacing is increased, but not so as to make one
> concerned.
> Secondly use two fields, one for each page, side by side, grouped with
> their tops at the same level.
> The group's height is set to the height of the virtual page that you want,
> and both field's heights are set to the formatted height of the content of
> field 1. (At this stage, this is the same for both fields).
> Now scrolling the group will scroll both fields in sync.
> To get different page chunks on each page ( and allow for a blank page at
> the end of the second field) I simply added <return> Characters to the end
> of the second field. The number being equal to the group's height divided
> by the textheight setting of the fields. (Hence the requirement for fixed
> text height.)
> Lastly I set the vscroll of the second field to the height of the group.
> (Remember its height was equal to the formatted height of field 1 but now
> has extra content and so can be scrolled.)
> Now the second field (page 2) seems to start where the first field ends.
> To page, just have a button that increases or decreases the vscroll of the
> group by the height of the group.
> It works surprisingly well.
> James
> _______________________________________________
> use-livecode mailing list
> use-livecode at
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:

More information about the Use-livecode mailing list