Flow/wrap text into an irregular shape

Peter Haworth pete at lcsql.com
Fri Dec 27 22:04:39 EST 2013


Not sure if this is more complicated or not but perhaps you could have
several fields vertically in the triangle, each the width of the triangle.
Then you'd have to figure out how much text would fit in each field
according to it's formatted width. Hmmm, maybe that is too complicated!

Pete
lcSQL Software
On Dec 27, 2013 3:56 PM, "Roger Eller" <roger.e.eller at sealedair.com> wrote:

> Thanks Craig. It might be simpler to just use a monospaced font, and know
> beforehand how many chars will fit each line of text, and wrap accordingly.
>
> ~Roger
>
> On Fri, Dec 27, 2013 at 5:22 PM, <dunbarx at aol.com> wrote:
>
> > Hi.
> >
> >
> > This is doable. There are functions, like "the selectedLoc" that will
> work
> > for you. If you have a field with this in its script:
> >
> >
> >
> > on keyDown
> >
> >   put the selectedLoc
> >
> >
> >   pass keyDown
> > end keyDown
> >
> >
> > You can see the loc of the insertion point within whatever you are
> typing.
> > You can determine the X value of the triangle as it crosses each line of
> > text, and if less than or greater than those values, you can, perhaps,
> pad
> > the field text with spaces until you are on the correct side of the
> > graphic. Much more management will be required, especially with long
> words
> > that might start outside the grc boundary but cross it before that word
> is
> > finished, but, hey, you asked for it.
> >
> >
> > Craig
> >
> >
> >
> >
> >
> >
> >
> >
> > -----Original Message-----
> > From: Roger Eller <roger.e.eller at sealedair.com>
> > To: How to use LiveCode <use-livecode at lists.runrev.com>
> > Sent: Fri, Dec 27, 2013 4:36 pm
> > Subject: Flow/wrap text into an irregular shape
> >
> >
> >  Imagine a multi-line text field which overlays a triangle polygon, which
> > is wide at the top, and comes to a point at the bottom.  I want the text
> to
> > detect the edges of the triangle and wrap at those edges.  The result
> would
> > be a triangle shaped body of text (centered).  My question to you is "How
> > can this be achieved?"
> >
> > ~Roger
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription
> > preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> >
> > _______________________________________________
> > use-livecode mailing list
> > use-livecode at lists.runrev.com
> > Please visit this url to subscribe, unsubscribe and manage your
> > subscription preferences:
> > http://lists.runrev.com/mailman/listinfo/use-livecode
> >
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>



More information about the use-livecode mailing list