The Value Button

Presence

Values are shown in the form of raised or depressed buttons if there is space (beyond what is needed for the window manager areas and the title area).  Buttons are shown in preference to labels if the latter are present and there isn't enough room for both.

Arrangement

The button-label pairs are arranged as described in the label-value area page.

Appearance

The button is shown depressed if the corresponding element of the underlying variable is 1, and raised if the element is 0.

Function

When a user clicks on the button, its state is toggled - it is raised if depressed and depressed if raised -, and the corresponding element of the underlying variable is changed.  This action can be prevented for all buttons by setting the `protect attribute to 1, and selectively prevented by setting `protect to a vector of ones and zeros.

Color

If depressed, the button is shown in `fg, whose default value is `black (or more precisely, the value of s.BLACK).  If raised, the button is show in `bg, whose default is `grey (more precisely, the value of s.GREY), and it is this color that is used in the shadow of the button, raised or depressed.


doc@aplusdev.org© Copyright 1995–2008 Morgan Stanley Dean Witter & Co. All rights reserved.