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

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

text adapt

Post by pascalh4 » Tue Aug 27, 2013 8:06 pm

hi,

me again!

In revressourcecenter.rev when the window is resized, the text fits in width.

To text field and geometry, it is good.
But for the writings and images, how to set up them, so they adapt to the remaining space?

I tried to find in inspectors, but I have not found.

Pascal

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: text adapt

Post by Mark » Tue Aug 27, 2013 8:42 pm

Hi Pascal,

Are you asking how to adjust a field to the size of a window? Like this:

Code: Select all

on resizeStack
  set the rect of fld 1 to the rect of this stack
  pass resizeStack
end resizeStack
Kind regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

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

Re: text adapt

Post by pascalh4 » Tue Aug 27, 2013 10:18 pm

Thank you Mark, but it is not quite what I want.

I want to know, how to adapt the writings of the field, when the rectangle of the field is modified.
As is the event in the resource manager.


Good night.
Pascal

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: text adapt

Post by Mark » Tue Aug 27, 2013 10:26 pm

Got a picture?
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

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

Re: text adapt

Post by pascalh4 » Tue Aug 27, 2013 11:17 pm

hi
Got a picture?
I don't understand your question.

Pascal

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

Re: text adapt

Post by Klaus » Wed Aug 28, 2013 4:19 pm

Picture = image, means, can you please post a screenshot of what you want to achieve,
we have still no idea of what you are looking for 8)

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10062
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: text adapt

Post by FourthWorld » Wed Aug 28, 2013 4:27 pm

I think it would require an animation, as a still shot won't show what's needed.

Pascal, take a look at the formattedWidth and formattedHeight field properties. Those can be used within a textChanged handler to adjust the size of the field to fit its contents.

You may want to keep in mind that users can drag-and-drop text as well as paste, and either may exceed the physical bounds of the card, so perhaps at a certain size you could add a vertical scrollbar to the field.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: text adapt

Post by Mark » Wed Aug 28, 2013 4:56 pm

Can you explain what he wants, FourthWorld?

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

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

Re: text adapt

Post by Klaus » Wed Aug 28, 2013 5:04 pm

Mark wrote:Can you explain what he wants, FourthWorld?

Mark
Yes, Richard, with pictures, please :D

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Re: text adapt

Post by Mark » Wed Aug 28, 2013 5:46 pm

No, Klaus, with an animation ;-)

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

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

Re: text adapt

Post by Klaus » Wed Aug 28, 2013 6:11 pm

Oh, yes, even better!

C'mon, Richard, we're waiting! :D

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10062
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: text adapt

Post by FourthWorld » Wed Aug 28, 2013 6:50 pm

Klaus wrote:Oh, yes, even better!

C'mon, Richard, we're waiting! :D
Your guess is as good as mine.

Pascal has already noted elsewhere that he's not a native English speaker, and given his posts here I'm not confident that the guess I made about what he's looking for is indeed relevant, and have been waiting for him to clarify whether it is.

If you feel it's productive to venture further guesses before we get more guidance from Pascal, you're welcome to add your own as I've already done.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7395
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: text adapt

Post by jacque » Wed Aug 28, 2013 6:54 pm

My guess is he wants to adjust the textsize as well as the size of the field itself.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

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

Re: text adapt

Post by Klaus » Wed Aug 28, 2013 6:57 pm

Richard, we are only kidding! 8)
Sorry, for being a bit silly!

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10062
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: text adapt

Post by FourthWorld » Wed Aug 28, 2013 7:14 pm

Klaus wrote:Richard, we are only kidding! 8)
Sorry, for being a bit silly!
No apology needed, though I always appreciate your sensitivity to such social graces. The fact is that I don't really know what he's looking for, though Jacque's guess seems perhaps better than my own.

Looking forward to hearing more from Pascal on this.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

Post Reply