Radio button group

Source: Internet
Author: User

When you add single-choice buttons to the dialog box, use them as a group. In the Properties window, set the group attribute for the first button in the group. The Control ID of the single-choice button appears in the Add member variable wizard, which allows you to add member variables for the single-choice button group.

In the dialog box, there can be more than one group of radio buttons, each group should be added through the following process.

Add a group of radio buttons to the dialog box

  1. Select the radiobutton control in the Toolbox window, and click the location where you want to place the control in the dialog box.
  2. Repeat the steps
    1 to add any multiple radio buttons. Make sure that
    The tab key order is continuous (for more information, see change the tab key order of the control ).
  3. In the "properties" windowFirstRadio buttonGroupSet propertyTrue.

SetGroupProperty changedTrueThe ws_group style will be added to this button in the dialog box object of the resource script, and you can only select one single button in the button group at a time (when you click a single button, other buttons in the group are cleared ).

Note:

Only the first radio button in the group canGroupSet propertyTrue. If there are other controls that do not belong to the button groupOut-of-groupTheGroupSet propertyTrue. By pressing CTRL + D to view the tab key order, you can quickly determine the first control outside the group.

Add member variables to a single-choice button group

  1. Right-click the first radio button control in the tab key Order (dominant control andGroupControls with the property set to true ).
  2. Select"Add variable".
  3. In the Add member variable wizard, select"Control variables"Check box, and then select"Value"Single-choice button.
  4. In the variable name box, type the name of the new member variable.
  5. In"Variable type"In the list box, selectInt Or TypeInt.
  6. You can modify the code to specify which radio button should be displayed as selected. For example, m_radiobox1 = 0; the first radio button in the selected group.

 

 

The tab key order is the order in which the tab key moves the input focus from one control to another in the dialog box. The tab key sequence is usually left to right in the dialog box, from top to bottom. Each control hasTabstopDetermines whether the control receives the input focus.

Set the input focus of the control.

  • In the "properties" window, selectTabstopAttributeTrueOrFalse.

Even if the control does not set the tabstop attribute to true, it must be part of the tab key order. This may be important in some situations. For example, when you define an access key (mnk) for a control without a title. The static text that contains the access key of the related control is in
The tab key sequence must be placed in front of the related controls.

Note:

If the dialog box contains overlapping controls, changing the tab key order may change the display mode of the controls. The control behind the tab key order is always displayed on any overlapping control above the tab key order.

View the current status of all controls in the dialog boxTabKey order

  • In"Format"Click"TabKey order".

-Or-

  • Press Ctrl +
    D.

ModifyTabKey order

  1. In"Format"Click"TabKey order".

The number in the upper-left corner of each control is displayed in the current
Position in the tab key order.

  1. Click each control in the order you want the tab key to follow to set the tab key order.
  2. PressEnterExit"TabKey order"Mode.

Tip:

After entering the "tab key order" mode, you can press
The ESC or enter key disables the ability to change the tab key order.

ChangeTabKey order

  1. Slave"Format"Select"TabKey order".
  2. Specifies where to change the sequence. To do this, press Ctrl and click the control that is located before the control that you want to change its order.

For example, if you want to change the order of controls 7 to 9, press Ctrl and select control 6 first.

Note:

To set a specific control to number 1 (first in the tab order), double-click the control.

  1. Release the ctrl key, and then click the control in the order that you want the tab key to start from.
  2. PressEnterExit"TabKey order"Mode.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.