styling lines of a field dynamically
Posted: Thu Oct 23, 2014 12:55 am
This code works. If there is someone who knows an easier way to do it please share. Until then if this helps anyone then feel free to use it.
I created it since there was never the same amount of lines between titles to uniformly choose a line number to style
I created it since there was never the same amount of lines between titles to uniformly choose a line number to style
Code: Select all
on mouseUp
put empty into fooditems
put 1 into titlearraycount
repeat for 5 times
put "This is a title" & return after fooditems
put the number of lines in fooditems into listTitles[titlearraycount]
add 1 to titlearraycount
put "this is some text" & return after fooditems
put "this is some more text" & return after fooditems
put "this will finish it" & return after fooditems
put "-------------------------" & return after fooditems
end repeat
set the text of fld "A" to fooditems
repeat for each element deline in listTitles
set the textSize of line deline of fld "A" to "22"
set the textStyle of line deline of fld "A" to "bold"
end repeat
end mouseUp