NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

Button Control

The Win Forms Button control allows the user to click on it to perform actions. When the button is clicked, it not only carries out the appropriate action, it also looks as if it’s being pushed in and released. Whenever the user clicks a button, the Click event-handling method is invoked. You place code in the Click event-handling method to perform any action you choose.

The text displayed on the button is contained in the Text property. If your text exceeds the width of the button, it will wrap to the next line. However, it will be clipped if the control cannot accommodate its overall height. For more information, see Setting the Text Displayed by a Control. An access-key character in button text is designated with an ampersand (&) in front of the character. See Creating Access Keys for Controls for more information. The appearance of the text is controlled by the Font property and the TextAlign property.

The Button control can also display images using the Image and ImageList properties. For more information, see Setting the Image Displayed by a Control.

See Also

Button Class | Responding to Button Clicks | Selecting a Button Control Programmatically