Hey All,
I have a text field that has the fixedLineHeight set to false and is set to word wrap. Is there a way to get the height of a line of text when the field is wrapping text to make it multiple lines high. I don't know how many lines will be in the text field and since it is text that is wrapped livecode sees it as only 1 line of text so I can't simply divide the formatted height of the text by the number of lines. I have been looking at text properties but can't seem to find anything to give me the height of a line of text in pixels.
Get the height of multiline text field with word wrap
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- Posts: 86
- Joined: Tue May 15, 2012 5:56 pm
Re: Get the height of multiline text field with word wrap
Hi 1979,
How do you determine which line of the wrapped _apparent_ lines you want the textHeight of?
It is not clear to me what exactly you are trying to do. You could get the formattedHeight of char x to y of field "z", or the formattedHeight of word x to y of field "z".
It all depends what you want to do.
If you could upload a zipped sample stack with just sample data in the field and give a little more detail that would help.
Kind regards
Bernd
How do you determine which line of the wrapped _apparent_ lines you want the textHeight of?
It is not clear to me what exactly you are trying to do. You could get the formattedHeight of char x to y of field "z", or the formattedHeight of word x to y of field "z".
It all depends what you want to do.
If you could upload a zipped sample stack with just sample data in the field and give a little more detail that would help.
Kind regards
Bernd