- Code: Select all Expand view
#include "FiveWin.ch"
function Main()
local oDlg, oRadMenu
local nOption := 1
DEFINE DIALOG oDlg RESOURCE "Radios"
REDEFINE RADIO oRadMenu VAR nOption ID 110, 120, 130, 140, 150 OF oDlg ;
WHEN MyFunc()
REDEFINE BUTTON ID 100 OF oDlg ACTION oRadMenu:aItems[2]:disable()
REDEFINE BUTTON ID 102 OF oDlg ACTION oRadMenu:aItems[2]:enable()
ACTIVATE DIALOG oDlg CENTERED
return nil
function MyFunc()
return .t.
- Code: Select all Expand view
radios DIALOG 46, 44, 127, 86
STYLE DS_MODALFRAME | 0x4L | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Testing Radio Buttons"
FONT 10, "MS Sans Serif"
{
GROUPBOX "&Some Radios", 107, 5, 6, 70, 75, BS_GROUPBOX | WS_CHILD | WS_VISIBLE
CONTROL "&One", 110, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE | WS_GROUP | WS_TABSTOP, 10, 16, 28, 12
CONTROL "&Two", 120, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 10, 28, 28, 12
CONTROL "T&hree", 130, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 10, 40, 28, 12
CONTROL "&Four", 140, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 10, 52, 28, 12
CONTROL "F&ive", 150, "BUTTON", BS_AUTORADIOBUTTON | WS_CHILD | WS_VISIBLE, 10, 63, 28, 12
PUSHBUTTON "&Disable 2", 100, 81, 10, 41, 12, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "&Enable 2", 102, 81, 24, 41, 12, WS_CHILD | WS_VISIBLE | WS_TABSTOP
PUSHBUTTON "&Cancel", 2, 81, 38, 41, 12, WS_CHILD | WS_VISIBLE | WS_TABSTOP
}
TIA