change textFont and TextSize of text
Mark Schonewille
m.schonewille at economy-x-talk.com
Wed May 10 05:33:32 EDT 2006
Hello Serge,
If a field has different text styles and sizes applied to different
parts of its text, changing the textFont and textSize of the control
does not always change the textFont and textSize of its text. You
might want to try:
if "field" is in the controlname then
set the textFont of char 1 to -1 of control i to theFont
set the textSize of char 1 to -1 of control i to theSize
end if
or if you want to make sure that the textFont and textSize of the
control is applied:
set the textFont of char 1 to -1 of control i to empty
set the textSize of char 1 to -1 of control i to empty
set the textFont of control i to theFont
set the textSize of control i to theSize
and you might also try
put the text of control i into control i
set the textFont of control i to theFont
set the textSize of control i to theSize
Best,
Mark
--
Economy-x-Talk
Consultancy and Software Engineering
http://economy-x-talk.com
http://www.salery.biz
Salery is the easiest way to get your own web store on-line: http://
www.salery.biz/salery.html
Op 10-mei-2006, om 11:21 heeft Serge Ségu het volgende geschreven:
> Hello
>
> Whan I convert a stack from HyperCard to Revolution, size and font
> of fields are not always adapted
> with the script below, size and font of fields are modified
> but sometimes not the font and the size of text _inside_ the field,
> the appearance of the text is the same
> What is the just way ?
>
> go to stack myStack
> repeat with n=1 to the number of cds
> go to cd n
> repeat with i=1 to the number of controls
> put the name of control i into controlName
> if "field" is in controlName then
> set the textFont of control i to theFont
> set the textsize of control i to theSize
> end if
> end repeat
> end repeat
>
> Thanks
>
> Serge
> --
> Mac OS 10.3.9 Dreamcard 2.5.1
More information about the use-livecode
mailing list