Button Class

Displays a push button control within a container in a form. A Click event is fired when the button is pressed.

The name of the button and size are specified when the object is instantiated using the Create method.

Namespace: elsystem.windows.forms

Properties

   Additional properties, methods, and events are described in the classes listed under Inheritance Hierarchy (see below).

  Name Type Description
Public property DisabledBackColor object Gets or sets the disabled button back color when OverrideDiabledColors = true.
Public property DisabledForeColor object Gets or sets the disabled button fore color when OverrideDiabledColors = true.
Public property OverrideDisabledColors bool True potentially allows the disabled colors to take effect; false otherwise.
Methods
  Name Description
Public property Create() Initializes a new instance of a Button.
Public property Create(text, width, height) Initializes a new instance of a Button.  Parameters include the Text to appear on the button followed by integer values for the button Width and Height.
Public property PerformClick() Generates a click event for a button.
Public property RemoveGradient Removes the gradient.
Public property SetLinearGradient(mode, startColor, endColor) Creates a linear gradient button background. See LinearGradientMode and Color for lists of possible values.
Public property SetRadialGradient(startColor, endColor) Creates a radial gradient button background. See Color for a list of possible values.
Events
  Name Description
Public event

KeyDown

Occurs when a key is pressed while the control has focus. See KeyEventArgs for the properties returned by the handler's args parameter.

Public event

KeyPress

Occurs when a key is pressed while the control has focus. See KeyPressEventArgs for the properties returned by the handler's args parameter.

Public event

KeyUp

Occurs when a key is pressed while the control has focus. See KeyEventArgs for the properties returned by the handler's args parameter.