[ Previous | Next | Contents | Glossary | Home | Search ]
Motif 2.1 User's Guide



Using Adjustable Components

Motif includes the following adjustable components:

  1. PanedWindows for adjusting the relative size of components

  2. ScrolledWindows for viewing the entire contents of a component when the viewing area cannot accomodate all of the contents at any one time

  3. Scales for selecting a value within a range

  4. Using PanedWindows

    A PanedWindow groups components into separate panes. Panes are distinct sections within one window. Adjacent panes are separated from one another by a horizontal separating line and a Sash (see Figure 3-12). The Sash allows you to adjust the relative size of adjacent panes. You move the Sash to change the position of the separating line between two panes, which changes the size of the panes. As the Sash moves, the pane located in the direction of the movement gets smaller while the other pane gets proportionally larger.

    Figure 20. A PanedWindow.




    View figure.

    To adjust a PanedWindow with the mouse:

    1. Move the pointer to the Sash.

    2. When the pointer shape changes to a + (plus sign), press and hold down Button 1.

    3. Drag the mouse until the panes are in the proportion you want.

    4. Release Button 1.

      If a Sash has the input focus, you can adjust a PanedWindow using the keyboard. Use the up and down arrows keys to move the separating line in small increments. You can move the separating line by larger increments by holding down Ctrl as you press the arrow keys.

    5. Using ScrolledWindows

      A ScrolledWindow frames other components and provides ScrollBars as necessary to view the contents of the window. You use ScrollBars to adjust the visible contents of a window when the entire contents do not fit in the window. A ScrollBar consists of a movable component, called a slider, which moves within a trough running the length of the scrolled region. The position and size of the slider within the trough indicates the relative position and size of the visible area of the scrolled component. A ScrollBar also provides arrow buttons at each end of the trough for moving the slider (see Figure 3-13).

      Figure 21. A ScrolledWindow.




      View figure.

      In addition to the illustrated slider, a ScrollBar's slider visual can also be an etched line, a shadowed circle, or three etched lines in the middle of the slider.

      You can use the following techniques to scroll a region with the mouse:

      1. To move the slider to a particular location, press Button 2 in the trough. The slider will jump to that location. You can then drag the slider back and forth to further scroll the region.

      2. To drag the slider to a particular location, move the pointer to the slider. Press and hold down Button 1. You can then drag the slider back and forth to any position you want.

      3. To scroll up or down one page (using vertical ScrollBars), click Button 1 on the trough above or below the slider. Horizontal ScrollBars provide the same mechanism for scrolling left or right by a page.

      4. To scroll the region one unit at a time, click Button 1 on the arrow button that corresponds to the direction that you want to scroll the region.

        To navigate through a ScrolledWindow using the keyboard, see the following sections on Lists and Text components for specific information.

      5. Using Scales

        A Scale is used to select a value from a continuous range. Like a ScrollBar, a Scale consists of a slider within a trough and arrow buttons. A Scale can be oriented vertically or horizontally. The position of the slider indicates the current value relative to the whole range. The current value of a Scale may be displayed next to the slider. A Scale can also contain Labels that specify the value of the Scale when the slider is at particular locations (see Figure 3-14).

        Figure 22. A Scale.




        View figure.

        In addition to the illustrated slider, a Scale's slider visual can also be a rectangle, a shadowed circle, or three etched lines in the middle of the slider.

        You can use the following techniques to manipulate a Scale with the mouse:

        1. To move the slider to an arbitrary location, press Button 2 in the trough. The slider will jump to that location. You can then drag the slider back and forth to adjust the value of the Scale.

        2. To drag the slider to a particular location, move the pointer to the slider. Press and hold down Button 1. You can then drag the slider back and forth to any position you want.

        3. To adjust the Scale one unit at a time, click Button 1 on the arrow button that corresponds to the direction that you want to change the value.

          When a Scale has the input focus, you can adjust its value using the keyboard. To move the slider in single increments, press the appropriate arrow key. To move the slider in larger increments, press and hold down Ctrl as you press the appropriate arrow keys.


        4. [ Previous | Next | Contents | Glossary | Home | Search ]