Ummm, Eeeeee, How do you this again?
Jim Ault
JimAultWins at yahoo.com
Sun Jul 16 02:54:46 EDT 2006
>>>> I need to record the vscroll position, increase the font size of the
>>>> field, then reapply the htmltext, then adjust the vscroll to take
>>>> into account the increased formattedheight. Basically, put the
>>>> vscroll back to the same line as it was before the font size
>>>> increase.
Try this approach
Copy the portion of the text that is represented by the current scrollbar
position in the original field
into an identical hidden fld , the apply the htmltext to the original and
the hidden copy. Now get the formattedHt of the copy and calc the correct
scroll value of the original.
I hope this is what you are after.
Jim Ault
Las Vegas
On 7/15/06 11:40 PM, "Garrett Hylltun" <garrett at paraboliclogic.com> wrote:
> Since I'm using htmltext, I have disabled fixedlineheight of the field.
>
> What about getting a percentage value of the scrollbar to
> formattedheight of the field, then after changing fon't size and
> reapplying the htmltext, then finding the appropriate position under
> the new circumstances. This is what I was trying to do in the first
> place, but my mind just is not clicking at all. I can't even
> remember how to get a percentage value of the scrollbar's position
> within the formatted height of the field. :-(
>
> -Garrett
>
> On Jul 15, 2006, at 11:20 PM, PDS Labs - RevDev wrote:
>
>> Hold on there, Baba-Louie! I think what you want is this:
>> (field names changed to hopefully avoid wrapping)
>>
>> put (the vScroll of fld "x" / the effective textHeight of fld "x") \
>> into tLineScroll
>> -- set your font size
>> -- insert your html text
>> set the vScroll of fld "x" to \
>> (the effective textHeight of fld "x" * tLineScroll)
>>
>> -- the above code should work as long as all lines of fld "x" have
>> the same textHeight - otherwise don't you get "mixed" (or something
>> like that) as the textHeight value?
>>
>> Regards -
>> Phil Davis
>>
>>
>> Ken Ray wrote:
>>> On 7/15/06 6:43 PM, "Garrett Hylltun" <garrett at paraboliclogic.com>
>>> wrote:
>>>
>>>
>>>> Rev 2.6.1 on OS X
>>>>
>>>> Greetings,
>>>>
>>>> Somebody showed me how to do this before, but for the life of me
>>>> can't find the code or the email on it.
>>>>
>>>> I need to record the vscroll position, increase the font size of the
>>>> field, then reapply the htmltext, then adjust the vscroll to take
>>>> into account the increased formattedheight. Basically, put the
>>>> vscroll back to the same line as it was before the font size
>>>> increase.
>>>>
>>>> I can't find anything specific to doing this in the docs, and even
>>>> attempted to figure this out on my own, but I just can't seem to
>>>> grasp it.
>>>>
>>>> Could someone please point me in the right direction?
>>>>
>>>
>>> put the vScroll of fld "stuff" into tScroll
>>> -- set your font size
>>> -- insert your html text
>>> set the vScroll of fld "Stuff" to tScroll
>>>
>>> HTH,
>>>
>>> Ken Ray
>>> Sons of Thunder Software
>>> Web site: http://www.sonsothunder.com/
>>> Email: kray at sonsothunder.com
>>>
>>> _______________________________________________
>>> use-revolution mailing list
>>> use-revolution at lists.runrev.com
>>> Please visit this url to subscribe, unsubscribe and manage your
>>> subscription preferences:
>>> http://lists.runrev.com/mailman/listinfo/use-revolution
>>>
>>>
>> _______________________________________________
>> use-revolution mailing list
>> use-revolution at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-revolution
>
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription
> preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution
More information about the use-livecode
mailing list