PC SOFT

WINDEV的在线文档

  • Overview
  • Creating a Radio Button control
  • Creating a Radio Button control
  • The different display modes
  • Swap
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Overview
The Radio Button control is a control allowing the user to select an option among several ones.

A radio button can display up to 256 options arranged in several rows and columns. A single option can be selected by the user. The radio button returns the number of the selected option.

Examples:

  • In WinDev or WinDev Mobile:
  • In WebDev:

16版本和更高版本
WinDevLinux The Radio Button controls are now available for the WinDev applications in Linux.
16新版本
WinDevLinux The Radio Button controls are now available for the WinDev applications in Linux.
WinDevLinux The Radio Button controls are now available for the WinDev applications in Linux.
18版本和更高版本
WinDevWindows Store apps The Radio Button controls are now available for the applications in Windows Store apps mode.
18新版本
WinDevWindows Store apps The Radio Button controls are now available for the applications in Windows Store apps mode.
WinDevWindows Store apps The Radio Button controls are now available for the applications in Windows Store apps mode.

Creating a Radio Button control

Creating a Radio Button control

To create a Radio Button control:
  1. In the window editor or in the page editor, click(or select "Insert .. Control .. Radio button").On the "创建" pane, in the "常用控件" group, click "单选框".
  2. Click the position where the control must be created in the window or in the page. The control appears in creation mode.
WinDev Tip: You also have the ability to create a "preset" radio button by clicking the arrow found on the right of the icon. The list of available controls (with their preview in the skin template of the project) is displayed. All you have to do is click the requested control to create it in the editor.
WinDev Tip: You also have the ability to create a "preset" radio button by expanding "Radio button". The list of available controls (with their preview in the skin template of the project) is displayed. All you have to do is click the requested control to create it in the editor.

To display the characteristics of the control, select "Description" from the popup menu of the control.

WinDev Note: You can manage a general tooltip for the control or a tooltip specific to each option.

The different display modes
WinDevWindows Store apps
WinDev and WinDev Mobile propose different display modes for the radio buttons:
  • standard radio button,
  • standard radio button with sub-captions,
  • radio button in Vista style (with ability to use an image for each option),
  • radio button in Vista style with sub-captions (with ability to use an image for each option).
The display mode of the radio button is selected in the "General" tab of the control description. The "Content" tab is used to enter the characteristics specific to the display mode (image, sub-caption, row height, ...) in the different languages of the application. These elements can be modified by programming.

The programming mode can change according to the type of display. See Handling a radio button by programming for more details.

Windows Store apps Only the standard mode and the standard mode with sub-captions are proposed.

Swap
WinDev, WinDev Mobile and WebDev allow you to automatically change a Radio Button control into a Check Box control (and conversely):
  1. Select the control to transform.
  2. Select the "Control ..Swap .. Radio Button/Check Box" option.On the "修改" pane, in the "转换" group, expand "重构和切换" and select "Radio button/Check box".