Page 1 of 1
Textsize
Posted: Mon Dec 14, 2015 12:14 pm
by aliyehia
HI
I write Arabic language in text field but textsize function is not working.
Any help please
Re: Textsize
Posted: Mon Dec 14, 2015 2:57 pm
by dunbarx
Hi.
if you:
Code: Select all
set the textsize of fld "yourField" to 24
Does the text in that field change? (Assuming it was not already 24)
Craig Newman
Re: Textsize
Posted: Mon Dec 14, 2015 3:08 pm
by aliyehia
This code does not change the size olny increase spacing between lines. I use scroll field.
Re: Textsize
Posted: Mon Dec 14, 2015 3:17 pm
by Klaus
Hi Ali,
does this eventually work:
...
set the textsize of char 1 to -1 of fld "yourField" to 24
...
?
What version of LC do you use?
Best
Klaus
Re: Textsize
Posted: Mon Dec 14, 2015 3:24 pm
by dunbarx
This code does not change the size olny increase spacing between lines. I use scroll field.
Try this on a card with a field with a few lines of text in it. In a button:
Code: Select all
on mouseUp
repeat 3
set the textSize of fld 1 to 6 + random(24)
wait 30
end repeat
end mouseUp
Now try it with the "textHeight"
Craig
Re: Textsize
Posted: Mon Dec 14, 2015 3:54 pm
by aliyehia
7.1 ind
The same error
Re: Textsize
Posted: Mon Dec 14, 2015 5:06 pm
by aliyehia
I note that when I get the text copy and past, the error appear and size is not change.
When I write in field, the code is working well and the size was changed.
But I have files, I can not re write.
Re: Textsize
Posted: Mon Dec 14, 2015 5:26 pm
by Klaus
Hi Ali,
does it work when you do not simply PASTE (CMD-V) but "Paste unformatted", (Menu: Edit -> ALT-SHIFT-CMD-V))?
Best
Klaus
Re: Textsize
Posted: Mon Dec 14, 2015 5:43 pm
by dunbarx
Hi.
You know that the text properties of newly created fields inherit the properties of the owners of those fields. Usually that is the card. You can always set the properties of individual fields to other values. I wonder if the field you are having issues with does not have its own textSize property, but rather that of some other object.
But that would not prevent you from setting a field property explicitly. However you enter text, by typing, loading under script control or by pasting, if you set text properties of a field, they should stick. But this takes getting used to. For example, if you have a field with three lines of text, and you:
Code: Select all
set the textSize of line 2 of fld 1 to 24
You will get a large textSize in that line. If you then go to the inspector, and set the textSize of the field itself, all lines except line 2 will change, but line 2 holds the size you set earlier.
So you have to get used to the fact that default properties and explicitly set properties can appear without warning, and can be mixed together.
I have no idea if this is helpful to you.
Craig
Re: Textsize
Posted: Thu Dec 31, 2015 5:37 am
by aliyehia
Thanks all
Unformatted paste solved the problem
Re: Textsize
Posted: Thu Dec 31, 2015 11:16 am
by Klaus
aliyehia wrote:Thanks all
Unformatted paste solved the problem
Hip Hip Hooray!
