Scrollbar increments in scrolling group

MisterX b.xavier at internet.lu
Sun Feb 12 12:20:49 CST 2006


Hi Shari

The issue, I believe, is that scrollbardrag has it's own increments preset
compared to the scrollwheel which you can increment as you want...

To do what you want, you might have to do something like locking the screen
between drags or using the scrolling increment...

what I see is that there is all the scroll stuff you want for scrollbars but
little for fields or groups. Kind of inconsistent for similarly capable
objects...

instead of simulating a scrollbar, you could use a custom scrollbar adjacent
to the group to simulate the vscrollbar of the group. 

Then on scrollbardrag, set the Vscroll of the group to what you want.

cheers
Xavier 

> -----Original Message-----
> From: metacard-bounces at lists.runrev.com 
> [mailto:metacard-bounces at lists.runrev.com] On Behalf Of Shari
> Sent: Sunday, 12 February, 2006 17:59
> To: metacard at lists.runrev.com
> Subject: Scrollbar increments in scrolling group
> 
> 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
> _______________________________________________
> metacard mailing list
> metacard at lists.runrev.com
> http://lists.runrev.com/mailman/listinfo/metacard



More information about the metacard mailing list