Scrollbar increments in scrolling group
Shari
shari at gypsyware.com
Sun Feb 12 10:59:00 CST 2006
The object is a scrolling group. It has several fields and buttons in it.
I have a piece of code that is working, but has one small problem.
It needs to scroll vertically in increments of 47 (the distance apart
each set is). The script of the grp is:
on scrollbarDrag x
set the scroll of me to (x div 47) * 47
end scrollbarDrag
This works beautifully. Absolutely perfect when clicking the scroll arrows.
But when dragging the scrollbar it creates a sort of flicker, and you
cannot properly watch the contents scrolling to determine where it
stops with all the flicker, so you're just guessing. Also, it
doesn't seem to start dragging the contents until you are pretty far
up/down with the scroll bar. You would expect to drag a little and
have it increment one notch of 47.
I am assuming that it's updating so frequently during the drag that
it creates a visual flicker. I tried trapping for mouseUp in the
handler, but that failed. It seems that if I could trap for when the
user stops dragging and then set it, things might work visually.
Any thoughts?
I'm not even sure if I can use this method, as the scrollbar itself
will need to be visually appealing as well (fit in with the rest of
the imagery of the card). But I thought I'd try it before moving on
to another plan.
And regarding scrollbars in general, both as an individual object, or
as it shows in a scrolling group as above:
Is it possible to use custom images for the arrows and scrollbar itself?
If this fails, plan B is as follows:
To have 6 sets of fields/buttons, which represents the visible
portion of the longer list of sets
Have a list of 30 (or however many) total sets of data
There will always be six consecutive sets visible, set 1-6, or 9-14,
or whatever
To create some sort of custom scroll system, and change the contents
of each visible set while scrolling.
This just seems like such a hack. The concept of a scrolling group
seems so much cleaner.
Shari
--
Mac and Windows shareware games
http://www.gypsyware.com
More information about the metacard
mailing list