Control states

The glue that connects a control to your program is called a control state. This is analogous to the socket that a physical control is plugged into.


Controls usually can adopt one control state. When the user manipulates the control, the control makes pre-determined calls to the control state. The type of data that the control is designed to present and manipulate determines the type of control state that the control can use. You can use different derived classes of a given type of control state to achieve different kinds of actions as a result of the user input.

The CommonPoint application system defines the following control state types:

  1. MMomentaryControlState, the control state for stateless controls, such as push buttons.
  2. MBooleanControlState, the control state for controls that manipulate a Boolean state value, such as check boxes and radio buttons.
  3. MFloatControlState, the control state for controls that manipulate a floating number, such as line sliders.
  4. MIntegerControlState, the control state that represents the currently-selected control in a Boolean control group.
  5. MTextControlState, the state for controls that manipulate text data, such as text controls.
  6. MTableControlState, the control state for controls that manipulate tabulated data, such as table views and scrolling lists.
  7. MSpinFieldState, the control state for controls that spin through a set of choices.
  8. MDropDownListControlState, the control state for drop down text controls.
Figure 39 shows how you can use a line slider to control a volume setting in program.



[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker