[Lazarus] Mouse wheel scroll bar increment size?

Hans-Peter Diettrich DrDiettrich1 at aol.com
Tue Jun 30 14:08:34 CEST 2009


Bruce Tulloch schrieb:

>> I am confused, do you want to use the scrollbar for scrolling or the
>> mouse wheel?
> I want to use the scrollbar because it provides visual feedback about
> the location of the section of the visible data in a larger buffer of
> displayable data.

You may hit the scrollbar position limits with really large data sets.

> I prefer that the scrollbar perform this function
> regardless of whether the mouse wheel is moved (with the mouse pointer
> hovering over the scrollbar) or the scrollbar handle is dragged with the
> mouse or the arrow or page up/down buttons are used. All methods should
> to the same thing; move the data display in response to scrollbar events.

You can implement a common MoveTo method, which is called by both the 
scrollbar and wheel events, optionally by key events. For non-scrollbar 
events you should update the scrollbar position - what for itself may 
trigger the scrollbar event (don't remember).

DoDi





More information about the Lazarus mailing list