Enables or disables an option button.

Usage

Set_Property(OLECtrlEntID, "OLE.OptionEnabled[CtrlId]", Boolean)

Values

[True | False]

Default: True

Indices

IndexDescription
CtrlIdIdentifies a subclassed control

Remarks

Applies To: EDITLINE, EDITBOX

The OptionEnabled property enables or disables an option button in an EDITLINE control. Normally, option buttons take on the enabled state of the EDITLINE control. That is, they are enabled when the control is enabled and disabled when the control is disabled. However, there may be instances in which you want to temporarily disable the option button while leaving the EDITLINE enabled.

This property is independent from the EDITLINE control's enabled state. If you use this property to disable the option button, then only this property can enable it again. Furthermore, if you enable the option button while the EDITLINE control is disabled, the option button will remain disabled until the control itself is enabled.

Example

// Subclass my editline control and add an option button that is independently disabled 
CtrlId = @Window:".EDITLINE" 
Handle = Get_Property(CtrlId, "HANDLE") 
rv = Send_Message(@Window:".OLE_SUBCLASS", "OLE.Subclass", Handle, CtrlId) 
Convert "." to ";" in CtrlId 
Set_Property(@Window:".OLE_SUBCLASS", "OLE.OptionButton[":CtrlId:"]", 1) 
Set_Property(@Window:".OLE_SUBCLASS", "OLE.OptionEnabled[":CtrlId:"]", 0)

See Also

OptionButtonOptionImageOptionOnFocusOnOptionClick

  • No labels