OK I am trying to allow the user to increase the size of text in a field in
an ebook, using the htmlText property to preserve styles and size of text
that has had specific attributes applied. But running into anamolies I can't
solve, these are two menu items

case "Smaller Text"
    put the htmlText of fld "theSutras" into tHoldText
    set the textsize of fld "theSutras" to  (the textSize of fld "theSutras"
-1)
    set the htmlText of fld "theSutras" to tHoldText
break
## the above works, with this anamoly: I hit the menu once, the field text
## is downsized. Line one of the field text of the is a header and if I
## check the htmlText, it shows the size was preserved "font size=14"
## hit the down sizer again. Text is downsized and line one preserves
## its text attribute "font size=14" while the rest of the field dropped one
## point size. Hit the downsizer once more. Bingo now ALL text is down sized
## and line 1 of the text has

case "Bigger Text"
 put the htmlText of fld "theSutras" into tHoldText
 set the textsize of fld "theSutras" to  (the textSize of fld "theSutras"
+1)
    set the htmlText of fld "theSutras" to tHoldText
  break
## The above does the same thing...text will be sized up... after choosing
the menu item twice in a row, on the third time, the "font size=14" will be
stripped from the htmlText. But, it was preserve on the first two passes...
as if it would allow the text to go to 15 point, then 16 point,  and line 1
one maintain it's "font size=14" attribute, but as soon as you moved up to
17 the font size attribute is cleared.

So for now I will have to live with the default behaviour and just allow the
headers to shrink or grow with the text underneath it. At least colors and
textStyle is preserved.


Hinduism Today

Sivakatirswami
Editor's Assistant/Production Manager
[EMAIL PROTECTED] 
www.HinduismToday.com, www.HimalayanAcademy.com,
www.Gurudeva.org, www.hindu.org



Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.

Reply via email to