Page 2 of 2

Re: text adapt

Posted: Wed Aug 28, 2013 7:39 pm
by SparkOut
On the menu bar, click Resources and the Resource Centre stack will open (revresourcecentre.rev). Resize this and you will see the text reflow to fit the new size screen, and the images recentre.
So I believe Pascal is looking for information as to handle geometry management on resizing.
http://lessons.runrev.com/s/lessons/m/4 ... ry-manager
In the revresourcecentre.rev stack there is also a card called TheGeometryManager that is not normally reachable, but you can turn on the option to show "LiveCode UI Elements in Lists" and use the application browser to open it.
Which is a whole can of worms.
The Geometry Manager that's built into the IDE is, generally speaking, not very well respected. It also would not reflow the field size to shorten in height as the width increases, or expand downwards as the width decreases. It would be necessary to handle the resizeStack message to "roll your own" for this. Very simply, you could start with something like:

Code: Select all

on resizeStack
   set the topleft of field "fldReflow" to 40,60
   set the width of field "fldReflow" to the width of this stack - 80
   set the height of field "fldReflow" to max(80,the formattedHeight of field "fldReflow")
end resizeStack
as in the attached stack to be unzipped.

Re: text adapt

Posted: Wed Aug 28, 2013 8:00 pm
by pascalh4
Hi

Sorry, my session was open, but I was not at my computer.

To these points, it was Richard who thinks just.

1) I'm not good in English.

2) this is what I want
Those can be used within a textChanged handler to adjust the size of the field to fit its contents.
I'm really an old novice and I do not want to create controversy between you. :lol:

I'll look in the direction given by Richard.

But I also look for training manuals.

Do you think "livecode university" could help me?

Pascal

Re: text adapt

Posted: Wed Aug 28, 2013 8:07 pm
by pascalh4
Thank you SparkOut.

Your response came while I was writing mine.

Thank you for that clarification.
I'll test.

Pascal