![]() ![]() |
GoFiler Legato Script Reference
Legato v 1.6l Application v 6.6b
|
| Table of Contents | < < Previous | Next >> |
Chapter Nine — Dialog Functions (continued)
9.12 Checkbox and Radio Controls
There are three types of ‘checkbox’ or button controls. These functions address: the check box, the radio control, and the group box. If a resource statement such as AUTOCHECKBOX or RADIOBUTTON is used, the style is automatically set to define the type of control. When the generic CONTROL statement is employed, the appropriate BS_ style must be set such as BS_CHECKBOX or BS_AUTORADIOBUTTON.
When a button is defined as a checkbox, it operates independently of other controls. Checkboxes typically are used to indicate or set a specific condition. Depending on the style, it is either on (checked), off (unchecked) or undefined (tri-state). Control behavior may be automatic or manual. If the BS_AUTOCHECKBOX or BS_AUTO3STATE are not set, then it is expected that the script will check and uncheck the box in response to BN_CLICKED action messages. A common mistake is to fail to set the automatic mode and then expecting the button to check without any supporting code. In many cases, the tri-state behavior is performed manually, depending on context.
Radio buttons, on the other hand, generally operate in context with other radio buttons. Typical usage is to select one item of many, for example, ‘male’ or ‘female’. In such a case when one option is clicked and selected, another radio button will be deselected. When in auto mode, the operating system will automatically deselect other buttons in the group. Therefore, it is critical to group the buttons correctly.
The radio button controls are grouped by controls marked the WS_GROUP window style. All radio controls, in the order of the resource, are grouped. For example:
Control with WS_GROUP
RadioA
RadioB
Control with WS_GROUP
RadioC
RadioD
When clicked, A and B will interact as well as C and D. The AB group will not affect the CD group. A common problem when multiple groups are used with the auto function is the failure to add WS_GROUP styles in the correct order. An actual group box control is not required, only that a control with WS_GROUP bit style set divides each group of radio controls. The style can be set on any control including the first radio button of a series.
9.12.2 Checkbox Specific Styles
This table has the control styles that directly relate to checkboxes.
This table has the control styles that directly relate to radio controls, other general styles can also be used.
See the previous Section 9.11 Button Controls for notification.
9.12.5 Checkbox/Radio Button Functions
Page revised 2026-11-16
| Table of Contents | < < Previous | Next >> |
© 2012-2026 Novaworks, LLC. All rights reserved worldwide. Unauthorized use, duplication or transmission is prohibited by law. Portions of the software are protected by US Patents 10,095,672, 10,706,221 and 11,210,456. Novaworks, GoFiler™ and Legato™ are registered trademarks of Novaworks, LLC. EDGAR® is a federally registered trademark of the U.S. Securities and Exchange Commission. Novaworks is not affiliated with or approved by the U.S. Securities and Exchange Commission. All other trademarks are the property of their respective owners. Use of the features specified in this language are subject to terms, conditions and limitations of the Software License Agreement.