>>-anAdvancedControl~GetScrollBar(--id--+-------------+--)----->< +-,--category-+
The GetScrollBar method returns an object of the ScrollBar class that is assigned to the scroll bar with the specified ID. The ScrollBar class (see ScrollBar Class) provides methods to query and manipulate scroll bars.
The arguments are:
The ID of the scroll bar.
The number of the category dialog page containing the requested scroll bar. This argument must only be specified for category dialogs.
An object of the ScrollBar class or .Nil if the requested scroll bar does not exist.
The following example sets a new range and a new position for scroll bar HORSB. Object "di" is connected to scroll bar HORSB.
::class MyDlgClass subclass UserDialog inherit AdvancedControls ::method FocusPage di = self~GetScrollBar("HORSB") if di == .Nil then return 0 di~SetRange(0, 1000, 0) di~SetPos(500, 1)
Note: GetScrollBar connects an Object Rexx object with a Windows object. If the object does not exist, the NIL object is returned. Therefore, this method can only be applied after the Windows dialog has been created (after the invocation of StartIt).