text adapt

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

SparkOut
Posts: 2947
Joined: Sun Sep 23, 2007 4:58 pm

Re: text adapt

Post by SparkOut » Wed Aug 28, 2013 7:39 pm

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.
Attachments
Resize Reflow.zip
(740 Bytes) Downloaded 205 times

pascalh4
Posts: 81
Joined: Thu Aug 22, 2013 12:50 pm

Re: text adapt

Post by pascalh4 » Wed Aug 28, 2013 8:00 pm

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

pascalh4
Posts: 81
Joined: Thu Aug 22, 2013 12:50 pm

Re: text adapt

Post by pascalh4 » Wed Aug 28, 2013 8:07 pm

Thank you SparkOut.

Your response came while I was writing mine.

Thank you for that clarification.
I'll test.

Pascal

Post Reply