Appearance and Behavior Settings in Windows Forms Radio Button

18 Nov 20181 minute to read

This section discusses the appearance and behavior settings of the Radio Button control.

Appearance settings

DrawFocusRectangle

The focus rectangle can be hidden or made visible using the below given property.

Radio Button Property Description
DrawFocusRectangle Determines if the focus rectangle is visible when it gets the focus. The default value is set to 'True'.
this.radioButtonAdv1.DrawFocusRectangle = true;
Me.radioButtonAdv1.DrawFocusRectangle = True

Behavior settings

AutoHeight

The height of the Radio Button can be automatically set using the property given below.

Radio Button Property Description
AutoHeight Determines if the Radio Button will automatically calculate its height.
this.radioButtonAdv1.AutoHeight = true;
Me.radioButtonAdv1.AutoHeight = True

RaiseEventOnClick

The below given property can be used to fire the OnClick event of the Radio Button.

Radio Button Property Description
RaiseEventOnClick Specifies whether the OnClick event should be fired. The default value is set to 'True'.
this.radioButtonAdv1.RaiseEventOnClick = true;
Me.radioButtonAdv1.RaiseEventOnClick = True