====== jButton ====== The [[https://api.comfiletech.com/csharp/api/ComfileTech.jControlsNF4.jButton.html|jButton]] control is analogous the .NET Framework's [[https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.button?view=netframework-4.8.1|Button]], 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]], along with a few additional features. ===== PressedAppearance and ReleasedAppearance Properties ===== The [[https://api.comfiletech.com/csharp/api/ComfileTech.jControlsNF4.jBaseButton-1.PressedAppearance.html|PressedAppearance]] property describes the appearance of the jButton when it is pressed, and the [[https://api.comfiletech.com/csharp/api/ComfileTech.jControlsNF4.jBaseButton-1.ReleasedAppearance.html|ReleasedAppearance]] property describes the appearance of the jButton when it is not pressed. | {{ :jcontrols_nf4:jbutton:jbutton_appearance.mp4?182x104 }} | {{ :jcontrols_nf4:jbutton:jbutton_appearance_properties.png }} | ===== IsPressed Property ===== This [[https://api.comfiletech.com/csharp/api/ComfileTech.jControlsNF4.jBaseButton-1.IsPressed.html#ComfileTech_jControlsNF4_jBaseButton_1_IsPressed|IsPressed]] property can be set at design time or runtime to cause the button to press or release respectively. It can be read at runtime to inspect whether or not the button is pressed or released. The ''IsPressed'' property returns ''true'' when the button is pressed, and ''false'' when the button is released. Use this property at design time to style the jButton's pressed and released appearances without having to run the program to verify. {{ :jcontrols_nf4:jbutton:jbutton_ispressed.mp4?414x98 }} ===== IsPressedChanged Event ===== The [[https://api.comfiletech.com/csharp/api/ComfileTech.jControlsNF4.jBaseButton-1.IsPressedChanged.html|IsPressedChanged]] event is fired any time the ''IsPressed'' property is changed. It can be used at runtime to notify another part of the program any time the button is pressed or released. {{ :jcontrols_nf4:jbutton:jbutton_ispressedchanged.mp4?900x554 }} ===== Latch Property ===== The [[https://api.comfiletech.com/csharp/api/ComfileTech.jControlsNF4.jBaseButton-1.Latch.html#ComfileTech_jControlsNF4_jBaseButton_1_Latch|Latch]] property can be used to cause the button to remain in a pressed state until the button is pressed a second time, thus implementing a toggle button. {{ :jcontrols_nf4:jbutton:jbutton_latch.mp4?912x654 }}