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:
- Connect the ready event of the composite
part (from the free-form surface) to the
IFrameWindow* addExtension action.
- Connect the IScrollBar* this attribute to
the newExtension parameter of the ready-to-addExtension
connection.
- 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:
- Connect the IFrameWindow* this attribute
to the IScrollBar* owner attribute. This
makes the frame window the owner of the scroll
bar.
- Connect the IFrameWindow* this attribute
to the IScrollBar* parent attribute. This
makes the frame window the parent of the scroll
bar.
- 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.
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
IScrollBar
Property Settings --
IScrollBar
Portability --
IScrollBar