1. how make LARGE (proportional) scrollbar button?
- Posted by DanM Mar 06, 2009
- 809 views
I have some items to display one after another down a window, which can be more than the window can hold, so I want to scroll them. I don't want to use a virtual window, because I want to easily allow clicking on the items.
I have a scroll routine which does this fine, except that I'd like to be able to make the scroll button LARGE, so it takes a minimum of mouse movement to move that scroll button from top to bottom. (This would be similar to how a "TreeView" with more items than fits in its space works.)
I know that
"setWindowScrollRange ( id, typeScroll, min, max, pageSize)"
is supposed to allow that, but I can't get it to work with respect to varying amounts of items.
So I'm currently using:
setScrollRange(MainWin, 1, length(ItemsToShow) - quanItemsNowShowing)
but while this works ok to scroll just to the bottom of the items that should show, of course it does NOT yield the large scroll button I would like.
I would LIKE to get something like the following to work, but I can't find any combination of computed values to put into
"setWindowScrollRange ( id, typeScroll, min, max, pageSize)"
that works right:
setWindowScrollRange (MainWin, SB_VERT, 1, length(ItemsToShow) - quanItemsNowShowing, length(ItemsToShow) - quanItemsNowShowing )
Any suggestions? Is there something obvious that I'm missing?
(and that CAN include "understanding"!)
Dan