styling text within an LC script

Sri sritcp at gmail.com
Tue Nov 10 09:15:30 EST 2015


niconiko wrote
> Can an LC script italicize the Italian while leaving the English as is, so
> that the resulting multi-styled combined text can be copy-pasted from an
> LC
> text-object to another doc?

Yes.
Drag a table field onto the card and name it "Table1"
Create a button called "Test".
Put the following code into the script of the button "Test"
Click the button "Test" !!!
-----------------------
on mouseUp
   local tText
   
   -- create tab-delimited text
   put "Paradiso.01 1" & tab & "La gloria di colui che tutto move" & tab &
"The glory of the one who moves all things" into line 1 of tText
   put "Paradiso.01 2" & tab & "per l’universo penetra, e risplende" & tab &
"permeates the universe and glows" into line 2 of tText
   put "Paradiso.01 3" & tab & "in una parte più e meno altrove." & tab &
"in one part more and another less." into line 3 of tText
   
   -- put it into a table field
   set the tabStops of field "Table1" to  "100, 300, 500"
   set the text of field "Table1" to tText
   
   --  style as necessary
   repeat with i = 1 to 3
      set the itemDel to tab 
      set the textStyle of item 2 of line i of field "Table1"  to "italic"
   end repeat
   
end mouseUp
----------------

Regards,
Sri



--
View this message in context: http://runtime-revolution.278305.n4.nabble.com/styling-text-within-an-LC-script-tp4698642p4698652.html
Sent from the Revolution - User mailing list archive at Nabble.com.




More information about the use-livecode mailing list