The SDL Component Suite is an industry leading collection of components supporting scientific and engineering computing. Please visit the SDL Web site for more information....


Unit: SDL_onoffbut
Class: TOnOffBut
Declaration: property MouseAction: TOOButMouseAction;

The property MouseAction controls whether the mouse can affect the button state, and which area of the button control is sensitive to mouse clicks. MouseAction may take one of the following three values:

oomaNone The mouse does not affect the button state at all. This is equal to the behavior when the control is disabled (however without dimming the appearance, as it is done when the Enabled property is set to FALSE.
oomaFocused Mouse clicks change the button state only if the mouse is over the button glyph.
oomaPlain Mouse clicks are accepted and toggle the button state at any position of the entire button control area (including the text area surrounding the button glyph).

Hint: The MouseAction is always oomaFocused in the Light Edition.

Example: This property is used in the following example program (see for downloading the code): onoffbut

Last Update: 2012-Oct-20