AW: How to increase the textsize of HTMLtext proportional?

Tiemo Hollmann TB toolbook at kestner.de
Tue Jul 9 14:14:02 EDT 2013


Great thanks Richard, Mike and Michael
Very helpful!
Tiemo

> -----Ursprüngliche Nachricht-----
> Von: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] Im
Auftrag
> von Michael Doub
> Gesendet: Dienstag, 9. Juli 2013 19:31
> An: How to use LiveCode
> Betreff: Re: How to increase the textsize of HTMLtext proportional?
> 
> I think this solves the problem.   You want to make sure that there is a
> ">" but not if it is found after a "<".
> 
> on mouseUp
>    put the htmlText of fld 1 into theHtml
>    replace "size="&quote with "size="&numtoChar(1500) in theHTML
>    set the itemdel to numToChar(1500)
>    if the number of items of theHTML<>1 then
>       put 0 into itemCount
>       repeat for each item theItem in theHTML
>          add 1 to itemCount
>          if itemCount=1 then
>             put theItem into newHTML
>             next repeat
>          end if
>          put 1 into counter
>          put offset (">", theItem) into tLeft
>          put offset ("<" , theItem) into tRight
>          if tLeft <> 0 then -- found it
>             if tRight <> 0 and tRight > tLeft then-- found "<" and after
> ">" which is ok
>                repeat forever
>                   add 1 to counter
>                   if char counter of theItem=quote then exit repeat
>                end repeat
>                put char 1 to counter-1 of theItem into theSize
>                put theSize + 1 into theSize
>                put theSize into char 1 to counter-1 of theItem
>             end if
>          end if
>          put quote&theItem after newHTML
>       end repeat
>       set the htmlText of fld "test" to newHTML
>    end if
>    set the textSize of fld "test" to \
>          the effective textSize of fld "test"+1 end mouseUp
> 
> 
> On Jul 9, 2013, at 10:20 AM, Mike Bonner <bonnmike at gmail.com> wrote:
> 
> > You might look at "styledtext" which returns an array describing all
> > the text variations in the field. Very handy.
> >
> >
> > On Tue, Jul 9, 2013 at 7:47 AM, Richard Gaskin
> > <ambassador at fourthworld.com>wrote:
> >
> >> Tiemo Hollmann wrote:
> >>
> >>> How would you change the textsize of such a text by keeping the size
> >>> relation of the different chunks of text? Should I look up the
> >>> HTMLtext and manipulate every "font size attribute" - or is there a
> >>> more straight forward approach, I don't see?
> >>
> >> I asked this question here a few years back, and there were many good
> >> solutions presented, with Malte's being the fastest IIRC:
> >>
> >> http://lists.runrev.com/**pipermail/use-livecode/2005-**July/061750.h
> >> tml<http://lists.runrev.com/pipermail/use-livecode/2005-July/061750.h
> >> tml>
> >>
> >>
> >> --
> >> Richard Gaskin
> >> Fourth World
> >> LiveCode training and consulting: http://www.fourthworld.com Webzine
> >> for LiveCode developers: http://www.LiveCodeJournal.com Follow me on
> >> Twitter:
> >> http://twitter.com/**FourthWorldSys<http://twitter.com/FourthWorldSys
> >> >
> >>
> >>
> >>
> >> ______________________________**_________________
> >> 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<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