Scroll Bar Toolbox Routines for Use Only with ScrollText (61677)



The information in this article applies to:

  • Microsoft QuickBASIC Compiler for the Apple Macintosh 1.0
  • Microsoft QuickBASIC Compiler for the Apple Macintosh 1.0a
  • Microsoft QuickBASIC Compiler for the Apple Macintosh 1.0b

This article was previously published under Q61677

SUMMARY

The scroll bar Toolbox Library statements included with Macintosh QuickBasic are designed to be used with the ScrollText routine and are not designed as general purpose scroll bar routines.

This information applies to Microsoft QuickBasic versions 1.0, 1.0a, and 1.0b for the Apple Macintosh.

MORE INFORMATION

The scroll bar routines ActiveScroll, DisposeScroll, GetScrollValue, HideScroll, MoveScroll, NewScroll, SetScrollValue, and ShowScroll are all designed to be used with ScrollText.

When you drag the scroll button in a scroll bar, the Macintosh can automatically return a value for the scroll bar based on the minimum and maximum values for the scroll bar.

When a mouse click is detected on either the scroll button, or in the scroll bar, the distance to scroll needs to be defined by the program. This is accomplished in other languages by defining special scroll bar handling routines that are called when a mouse click is detected in either of these areas. However, as stated on page 492 of the "Microsoft QuickBASIC for the Apple Macintosh: Language Reference":

A click anywhere in the scroll bar (the bar, the arrows, or the scroll box) is not detected by QuickBASIC as a mouse or dialog event.

This means that in QuickBasic, no processing can be done for a click in any of these areas. QuickBasic is able to update the scroll value only by moving the scroll bar button. To work around this limitation, ScrollText has special handling routines to trap and process mouse clicks on the scroll arrows and in the scroll box.

In place of these routines, a scroll box can be created by dynamically drawing each piece of the scroll bar. Mouse clicks can then be trapped and processed in these areas. In effect, a routine is created that simulates creating a scroll bar and doing what the toolbox routines would do.

Modification Type:MajorLast Reviewed:10/20/2003
Keywords:KB61677