ButtonState Enumeration

 

Specifies the appearance of a button.

This enumeration has a FlagsAttribute attribute that allows a bitwise combination of its member values.

Namespace:   System.Windows.Forms
Assembly:  System.Windows.Forms (in System.Windows.Forms.dll)

[<FlagsAttribute>]
type ButtonState

Member nameDescription
All

All flags except Normal are set.

Checked

The button has a checked or latched appearance. Use this appearance to show that a toggle button has been pressed.

Flat

The button has a flat, two-dimensional appearance.

Inactive

The button is inactive (grayed).

Normal

The button has its normal appearance (three-dimensional).

Pushed

The button appears pressed.

This enumeration represents the different states of a button. The default state is Normal.

In this example, you use the ButtonState enumeration as a parameter to the method DrawButton to specify the state of button1. To run the example, create two buttons, button1 and button2. Then replace the button2_Click method with the example code. Click button2 to redraw button1 and change its state to Flat.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1
Return to top
Show: