Formatted text in a field.
jameshale
james at thehales.id.au
Thu Apr 3 02:06:31 EDT 2014
Yes Peter is right.
If all you are looking to do is display the two pages then this might be the
go.
If you place a field "f1" on a page and set it up the way you want (size,
text characteristics etc) and then make two copies, field fa" and field
"fb".
Then make "f1" invisible.
make a button to load the pages like:
--intialize script--
global pn
global pr
on mouseUp
set the htmltext of field "f1" to YOUR_STYLED_TEXT_VARIABLE
put 1 into pn
put the pageranges of field "f1" into pr
put line pn of pr into pr1
put line pn+1 of pr into pr2
set the htmltext of field "fa" to the htmltext of char (item 1 of pr1)
to (item 2 of pr1) of field "f1"
set the htmltext of field "fb" to the htmltext of char (item 1 of pr2)
to (item 2 of pr2) of field "f1"
add 2 to pn
end mouseUp
---end initialise---
Then a next page button script is simply...
---next page---
global pn
global pr
on mouseUp
put the pageranges of field "f1" into pr
put line pn of pr into pr1
put line pn+1 of pr into pr2
set the htmltext of field "fa" to the htmltext of char (item 1 of pr1)
to (item 2 of pr1) of field "f1"
set the htmltext of field "fb" to the htmltext of char (item 1 of pr2)
to (item 2 of pr2) of field "f1"
add 2 to pn
end mouseUp
---end next page---
Works a charm.
It just depends on what your intention is.
If this is only for display or printing (the inspiration for the property)
then this is the neatest way to go.
But if you want greater user interaction, then maybe not.
In my application of this idea I am using the first method I mentioned
(group scroll). I want my users to be able to select text over more than one
page and to view what may be just overleaf (say at the end of page 2 and the
beginning of page 3) without having to jump back and forth.
James
--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/Formatted-text-in-a-field-tp4677903p4677917.html
Sent from the Revolution - User mailing list archive at Nabble.com.
More information about the use-livecode
mailing list