Scrollbar Covering Resizebox
kray at sonsothunder.com
Mon Jan 3 09:12:31 EST 2005
On 1/3/05 7:55 AM, "Mark Smith" <mark at maseurope.net> wrote:
> This is on OS X.
> I have a stack in which I want a field to reach all the way to the
> bottom of the window. This field is to contain text which will usually
> more than fill the field, so I need a scrollbar. The stack needs to be
> resizable, so when the field reaches to the bottom, the resize box of
> the window covers the down arrow at the bottom of the fields scrollbar.
> Is the only solution to make the field a non-scrolling field, use a
> separate scroll bar and script the behaviour myself? If it is, can
> anyone point to an example of such a thing, as I've not really played
> around with scrollbars before, and I could use some help, as, once
> again the docs are not really helpful - all the relevant properties,
> commands and messages are listed, of course, but there's not much to
> help with putting it all together.
Well, if you must have the field go all the way to the lower-right corner of
the stack, then the answer is "yes", you'll have to make a non-scrolling
field, and have a separate scrollbar next to it. The hard part is knowing
how much of the non-scrolling field is scrollable so you can set the
endValue of the scrollbar. I guess you could subtract the height of the
field from the formattedHeight of the field to see what the difference is,
and if it is not negative, set the endValue of the scrollbar to that value.
Then, in the scrollbar, you just do:
set the scroll of fld "NonScrollingField" to the thumbPosition of me
This is completely off the top of my head though, so your mileage may vary.
Sons of Thunder Software
Web site: http://www.sonsothunder.com/
Email: kray at sonsothunder.com
More information about the Use-livecode