Working with IScrollBar Parts

The following tasks are associated with using an IScrollBar* part in visual composition. Tasks that are common to many parts are described in related topics.

Attaching a client scroll bar to a frame window
To attach a scroll bar for the client area of a frame window, do the following:
  1. Connect the ready event of the composite part (from the free-form surface) to the IFrameWindow* addExtension action.

  2. Connect the IScrollBar* this attribute to the newExtension parameter of the ready-to-addExtension connection.

  3. Open settings for the this-to-newExtension connection and select Set parameters. Then, select a value for the location parameter. This defines the location of the scroll bar relative to the client area. For a vertical scroll bar located to the right of the client area, select rightOfClient.

Defining a client scroll bar as a child of the frame window
A client area scroll bar must be a child of the frame window. To accomplish this, do the following:

Selecting the orientation of a scroll bar slider
By default, the scroll bar is vertical. For a horizontal scroll bar slider, open the style property in the IScrollBar* property sheet. Then, set the horizontal style to on and the vertical style to off.

Handling custom scrolling
To provide custom scroll processing for either the client area or slider values, derive a handler from the IScrollHandler class and add it as a handler for the scroll bar.


Related procedures
Common Tasks for Control Parts
Setting Part Style Properties
Setting Part Color Properties
Setting Part Font Properties
Setting Part Handlers Properties
Setting Part Framing Properties
Working with VisualAge User Interface Parts

Related references
IScrollBar
Property Settings -- IScrollBar
Portability -- IScrollBar