Textsize

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
aliyehia
Posts: 17
Joined: Mon May 25, 2015 6:51 am

Textsize

Post by aliyehia » Mon Dec 14, 2015 12:14 pm

HI

I write Arabic language in text field but textsize function is not working.

Any help please

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10309
Joined: Wed May 06, 2009 2:28 pm

Re: Textsize

Post by dunbarx » Mon Dec 14, 2015 2:57 pm

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

aliyehia
Posts: 17
Joined: Mon May 25, 2015 6:51 am

Re: Textsize

Post by aliyehia » Mon Dec 14, 2015 3:08 pm

This code does not change the size olny increase spacing between lines. I use scroll field.

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Textsize

Post by Klaus » Mon Dec 14, 2015 3:17 pm

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

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10309
Joined: Wed May 06, 2009 2:28 pm

Re: Textsize

Post by dunbarx » Mon Dec 14, 2015 3:24 pm

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" :D

Craig
Last edited by dunbarx on Mon Dec 14, 2015 3:56 pm, edited 1 time in total.

aliyehia
Posts: 17
Joined: Mon May 25, 2015 6:51 am

Re: Textsize

Post by aliyehia » Mon Dec 14, 2015 3:54 pm

7.1 ind

The same error

aliyehia
Posts: 17
Joined: Mon May 25, 2015 6:51 am

Re: Textsize

Post by aliyehia » Mon Dec 14, 2015 5:06 pm

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.

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Textsize

Post by Klaus » Mon Dec 14, 2015 5:26 pm

Hi Ali,

does it work when you do not simply PASTE (CMD-V) but "Paste unformatted", (Menu: Edit -> ALT-SHIFT-CMD-V))?


Best

Klaus

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10309
Joined: Wed May 06, 2009 2:28 pm

Re: Textsize

Post by dunbarx » Mon Dec 14, 2015 5:43 pm

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

aliyehia
Posts: 17
Joined: Mon May 25, 2015 6:51 am

Re: Textsize

Post by aliyehia » Thu Dec 31, 2015 5:37 am

Thanks all

Unformatted paste solved the problem

Klaus
Posts: 14182
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Textsize

Post by Klaus » Thu Dec 31, 2015 11:16 am

aliyehia wrote:Thanks all

Unformatted paste solved the problem
Hip Hip Hooray! :D

Post Reply