I am trying to develop my first Livecode application and I need to vary the field height as I change the width of my stack. The text in the field changes from three to four lines and I want the overall height of the field to increase and decrease as the number of lines increases and decreases. Is there a way to find how many lines are in a field?
Regards,
ewansmac
Dynamically changing text field height
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: Dynamically changing text field height
Hi EwansMac,
And welcome to this forum
For effectives lines use the num of lines of ffld "myField"
For visibles lines you can get the height of the text of the field
check "formattedHeight" in LC dictionary. It explane better than me
Best regards
Jean-Marc
And welcome to this forum
Effectives lines (with return char) or visibles lines ?Is there a way to find how many lines are in a field?
For effectives lines use the num of lines of ffld "myField"
For visibles lines you can get the height of the text of the field
check "formattedHeight" in LC dictionary. It explane better than me

Best regards
Jean-Marc
https://alternatic.ch
Re: Dynamically changing text field height
Ewansmac...
I've got the general idea of what you wish to do... I think
I have attached a stack for you to look at... have a look at the card script and the geometry settings of fld 1
hope it helps...
Dixie
I've got the general idea of what you wish to do... I think

I have attached a stack for you to look at... have a look at the card script and the geometry settings of fld 1
hope it helps...
Dixie
- Attachments
-
- ChangeFldSize copy.livecode.zip
- (1.68 KiB) Downloaded 319 times
Last edited by Dixie on Wed Dec 21, 2011 5:35 pm, edited 1 time in total.
Re: Dynamically changing text field height
You must play with the several points raised by your responders. The difference between hard delimited lines and wrapped lines is key here. Make sure you are comfortable with that subtle but important distinction.
So your field expands when the stack width does?
So your field expands when the stack width does?