====== jRadioButton ====== The [[https://api.comfiletech.com/csharp/api/ComfileTech.jControlsNF4.jRadioButton.html|jRadioButton]] control is analogous to the .NET Framework's [[https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.radiobutton?view=netframework-4.8.1|RadioButton]], but has a much more rich appearance, employing jControls NF4's [[jcontrols_nf4:fills_and_borders:index|fill, border]], [[jcontrols_nf4:shape_and_cornerradii:index|shape, corner radii]], [[jcontrols_nf4:gloss_and_dropshadow:index#dropshadow_property|drop shadow]], and [[jcontrols_nf4:text_features:index|text features]]. ===== Checked Property ===== The [[https://api.comfiletech.com/csharp/api/ComfileTech.jControlsNF4.jCheckControl.Checked.html#ComfileTech_jControlsNF4_jCheckControl_Checked|Checked]] property changes the checkbox's state to either checked (''true'') or unchecked (''false''). |{{jradiobutton_unchecked.png}}|{{jcheckbox_unchecked_properties.png}}| |{{jradiobutton_checked.png}}|{{jcheckbox_checked_properties.png}}| ===== CheckedChanged Event ===== The [[https://api.comfiletech.com/csharp/api/ComfileTech.jControlsNF4.jCheckControl.CheckedChanged.html|CheckedChanged]] event fires any time the [[#checked_property|Checked]] property changes, and can therefore be used to respond to operator input. ===== Group Property ===== The [[https://api.comfiletech.com/csharp/api/ComfileTech.jControlsNF4.jGroupOnOffControl-1.Group.html#ComfileTech_jControlsNF4_jGroupOnOffControl_1_Group|Group]] property places the control into a mutually exclusive group. In the video below ''jCheckBox1'', ''2'', and ''3'' are placed into one group, while ''jCheckBox4'', ''5'', and ''6'' are placed into another group. {{ :jcontrols_nf4:jradiobutton:jradiobutton_group.mp4?900x531 }} Group names are visible application-wide, so please be sure each group name is unique across the entire application. ===== CheckedAppearance Property ===== The [[https://api.comfiletech.com/csharp/api/ComfileTech.jControlsNF4.jCheckControl.CheckedAppearance.html|CheckedAppearance]] property describes the appearance of the check box when the control is in the checked state. | {{jradiobutton_checkedappearance.png}} | {{jradiobutton_checkedappearance_properties.png}} | ===== UncheckedAppearance Property ===== The [[https://api.comfiletech.com/csharp/api/ComfileTech.jControlsNF4.jCheckControl.UncheckedAppearance.html|UncheckedAppearance]] property describes the appearance of the check box when the control is in the unchecked state. | {{jradiobutton_uncheckedappearance.png}} | {{jcheckbox_uncheckedappearance_properties.png}} | ===== Bullet Property ===== The [[https://api.comfiletech.com/csharp/api/ComfileTech.jControlsNF4.jRadioButton.Bullet.html#ComfileTech_jControlsNF4_jRadioButton_Bullet|Bullet]] property describes the appearance of the bullet that is displayed when the control is in the checked state. | {{jradiobutton_checked.png}} | {{jcheckbox_checkmark_properties.png}} | The [[https://api.comfiletech.com/csharp/api/ComfileTech.jControlsNF4.FillBorderDropShadowPadding-2.Padding.html#ComfileTech_jControlsNF4_FillBorderDropShadowPadding_2_Padding|Padding]] property adds space between the edges of the check box and the checkmark. ===== GetCheckPath() Method ===== The [[https://api.comfiletech.com/csharp/api/ComfileTech.jControlsNF4.jCheckControl.GetCheckPath.html#ComfileTech_jControlsNF4_jCheckControl_GetCheckPath|GetCheckPath()]] method can be used to customize the shape or glyph that is the bullet. For example the following code will create an X that will be drawn when the control is in the checked state. {{jradiobutton_x.png}} public class XRadioButton : jRadioButton { protected override string GetCheckPath() { return "M3,20 L20,3 L50,33 L80,3 L97,20 L67,50 L97,80 L80,97 L50,67 L20,97 L3,80 L33,50 Z"; } } The shape is defined using the [[https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/d#path_commands|SVG path command syntax]].