ICreate.Controls.Bars Send comments on this topic.
Anatomy of CommandButton

Glossary Item Box

CommandButton is a general purpose button which raises an event when clicked. CommandButton may have a subordinate button. The sub button can be clicked independently of the main button. When the main button is depressed, the sub button is also drawn in the depressed state. A ContextMenuStrip can be assigned to a CommandButton. If the ContextMenuStrip has menu items, then it is displayed when the CommandButton is clicked. If the CommandButton has a sub button then the ContextMenuStrip is displayed when the sub button is clicked. The image below shows a CommandButton with the major visual elements and interactive surfaces highlighted.


Property Description
Image An image can be displayed on the surface of the CommandButton. The image can be located above, below, to the left or right of the Text.
Text Text can be displayed on the surface of the CommandButton. The text can be located above, below, to the left or right of the Image. The text wraps if necessary.
SubButtonPosition A CommandButton can have a sub button. The sub button is clicked independently of the main button. When, however, the main button is clicked the sub button is also shown as depressed. The sub button can be located at the top, bottom, left or right of the main button.
Padding Padding is used to add empty space around the edge of the CommandButton.
ButtonStyle The ButtonStyle property determines the appearance of the CommandButton.
MenuPosition A ContextMenuStrip can be assigned to a CommandButton. If the ContextMenuStrip has menu items, then it is displayed when the CommandButton, or sub button if present, is clicked. It is possible to specify the position at which the ContextMenuStrip is displayed. The menu can popup above, below, to the left or right of the CommandButton.