User Tools

Site Tools


<< Back





Creates a button control on the form.


CaptionText displayed on the control
ContextMenuSpecifies html_wikilink('control_contextmenu','context menu') to attach to control. html_wikilink('create_menu','Create the ContextMenu') first
CursorCursor shape to display when mouse is over this control
EnabledFalse generates <color blue>GUICtrlSetState(-1, $GUI_DISABLE)</color>
FontDouble-click to the right to open the Font dialog. Click on + to show the Color, Name, Size and Style properties
Left,TopPosition of control relative to its parent
Width,HeightSize of control in pixels
HintText that appears when cursor hovers over control. Generates call to <color blue>GUICtrlSetTip</color>
HotKeyKeystroke that makes this control active
NameName of control and of the variable that is assigned its control ID in generated code. If not specified, no variable is generated
OnClickGenerates (in Message Loop mode) a <color blue>Case</color> or (in OnEvent mode) a call to <color blue>GUISetOnEvent</color> and a skeleton event function. Double-click to right to open Events Editor
PictureSpecifies an image to display. Double-click to the right to open html_wikilink('proped_images_editor',''). AutoIt does not support both picture and text on a button so assigning a Picture hides the Caption.
ResizingClick on + to expand resize modes:
DocAuto - resize and reposition according to new window size
DocRight - Do not move right side
DocLeft - Do not move left side
DocTop - Do not move top
DocBottom - Do not move bottom
DocHCenter - Horizontal center remains fixed
DocVCenter - Vertical center remains fixed
DocWidth - Width does not change
DocHeight - Height does not change
TabOrderSequence in which controls are selected with the Tab and Shift+Tab keys. For a Form and for each Group, TabOrder starts with 0. You may prefer to use the TabOrder Visual Editor: press Ctrl+T to open it.
VisibleIf False, generates <color blue>GUICtrlSetState(-1, $GUI_HIDE)</color>


BS_PUSHBUTTONdefault style of button
BS_DEFPUSHBUTTONHeavy black border. For dialog box, pressing Enter presses default button
BS_PUSHBOXButton without face and frame
BS_LEFTLeft-aligns the text, word-wrapping if BS_MULTILINE is checked
BS_RIGHTCenter-aligns text, word-wrapping if BS_MULTILINE is checked
BS_CENTERRight-aligns text, word-wrapping if BS_MULTILINE is checked
BS_TOPPlaces text at top of button
BS_BOTTOMPlaces text at bottom of button
BS_VCENTERVertically centers text in button
BS_MULTILINEWraps text to multiple lines if text doesn't fit on one line
BS_NOTIFYEnables button to send BN_KILLFOCUS and BN_SETFOCUS notification messages to Form
BS_FLATButton appears two-dimensional
WS_TABSTOPControl can be selected with Tab and Shift+Tab
WS_HSCROLLControl has horizontal scroll bar
WS_VSCROLL Control has vertical scroll bar
WS_BORDERControl has a thin-line border
WS_CLIPSIBLINGSIf this control overlaps with another, this control shows partially

#remarks_header[Extra Styles:]#

WS_EX_CLIENTEDGEControl has border with sunken edge
WS_EX_STATICEDGEControl has a three-dimensional border


For colored buttons you can set neither pictures nor styles. This is limitation of the current Autoit coloring code implementation.



koda/en/documentation/control_button.txt · Last modified: 2014/07/10 10:47 (external edit)