<< Return to Main Index

< Return to Class Index

CGXGridCore::AutoScroll

void AutoScroll(BOOL bSetCapture = FALSE, BOOL bVertical = TRUE, BOOL bHorizontal = TRUE);

bSetCapture

TRUE if this method should call SetCapture.

bVertical

Specifies if vertical scrolling is enabled.

bHorizontal

Specifies if horizontal scrolling is enabled.

Remarks

Starts the autoscroll-mode. The view will automatically scroll when the user drags the mouse over the window-frame.

Auto-scrolling is implemented through a timer. When a WM_LBUTTONUP message or WM_CANCELMODE message is received by the grid auto-scrolling will automatically be stopped.

Control-Factory Specific ->

Auto-scrolling has been implemented using the abstraction mechanism as discussed in the chapter "Reducing the size of your application" in the user's guide. A call to the ImplementAutoScroll method from within the control factory class' InitializeGridComponents method will make the concrete implementation for auto-scrolling available to your application.

If no concrete implementation for auto-scrolling is available this method has no effect.

END Control-Factory Specific

Note on compatibility with Objective Grid 6.0

The implementation of auto-scrolling has been changed for Objective Grid 6.1. In earlier versions auto-scrolling did work with a message loop. That caused sometimes unwanted side-effects and we therefore switched to a new approach using a timer.

Also, the first parameter has changed. You do not specify a mouse message any more. Instead you specify if AutoScroll should call SetCapture() or not.

See Also

CGXGridCore::OnAutoScroll CGXGridCore::SetAutoScroll

CGXGridCore

Class Overview | Class Members