User Tools

Site Tools


Sidebar

<< Back


koda:en:documentation:control_tab

Tab

{|class=“cboxtable”

class=“cboxcell1”
class=“cboxcell2”

Creates a tab control

See the tutorial, Creating a Tab control

#remarks_header[Properties:]#

ActivePageThis controls which page will be active by default.
AlignDesign only property, does not generate code, helps with aligning controls while editing.
alBottom - control moves to bottom of client area, resizes to width of client area x original height
alClient - control occupies the whole of the client area
alCustom - not used
alLeft - control moves to left edge of client area, resizes to original width x height of client area
alNone - no aligning
alRight - control moves to right edge of client area, resizes to original width x height of client area
alTop - control moves to top of client area, resizes to width of client area x original height
ColorBackground color of control. Choose from the list, or enter your own. Format is 0xnumber where number is 6 hexadecimal digits: 2 for blue, 2 for green and 2 for red
ContextMenuSpecifies context menu to attach to control. 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>
Images ImageList containing icons to show at tops of Pages (optional). ImageList must already exist
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
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>

#remarks_header[Styles:]#

TCS_SCROLLOPPOSITEUnneeded tabs scroll to the opposite side of the control when a tab is selected
TCS_BOTTOMPage labels appear at the bottom of pages
TCS_FLATBUTTONSWith TCS_BUTTONS, buttons are two-dimensional
TCS_FORCEICONLEFTIcon is at left edge of page label, leaving text centered. Requires TCS_FIXEDWIDTH
TCS_FORCELABELLEFTText is at left side of page label, icon next to it. Requires TCS_FIXEDWIDTH. Implies TCS_FORCEICONLEFT
TCS_HOTTRACKPage label under cursor is highlighted. Requires TCS_BUTTONS
TCS_VERTICALPage labels appear at side of pages: on right if TCS_BOTTOM else at left
TCS_TABSPage labels appear normally
TCS_BUTTONSPage labels appear and work like buttons. Page area is usually not used. Control has no border. Do not use with TCS_SCROLLOPPOSITE
TCS_SINGLELINEWhen widths of page labels exceed width of control, show horizontal scroll bar
TCS_MULTILINEWhen widths of page labels exceed width of control, show multiple rows of page titles
TCS_RIGHTJUSTIFYPage labels widen to occupy width of control. Requires TCS_MULTILINE
TCS_FIXEDWIDTHPage labels are all the same width
TCS_RAGGEDRIGHTWidth of page labels depends on width of labels
TCS_FOCUSONBUTTONDOWNPage receives input focus on button down. Useful with TCS_BUTTONS
TCS_FOCUSNEVERPage never receives input focus
WS_TABSTOPControl can be selected with Tab and Shift+Tab
WS_HSCROLLControl has horizontal scroll bar
WS_VSCROLLControl has vertical scroll bar
WS_VISIBLEControl is visible
WS_BORDERControl has a thin-line border
WS_CLIPSIBLINGSIf this control overlaps with another, this control shows partially

#remarks_header[Extra Styles:]#

TCS_EX_FLATSEPARATORSShows separators between page labels. Requires TCS_BUTTONS and TCS_FLATBUTTONS
WS_EX_CLIENTEDGEControl has border with sunken edge
WS_EX_STATICEDGEControl has a three-dimensional border

#remarks_header[Pages:]#

Each page has its own properties:

CaptionText displayed at the top of the page
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>
ImageIndexIndex of image in the attached ImageList control. Default is -1 (none)
NameName of control and of the variable that is assigned its control ID in generated code. If not specified, no variable is generated

#remarks_header[Remarks:]#

  • AutoIt limits the number of Tab controls on a form to one.
  • Microsoft admits that Hints can behave strangely: consider a Tab control with n pages:
With Hints on Without Hints on Hints show
Control only all Pages Control's Hint on all Pages
Page 1 Control, other Pages Page 1
Page n ControlPage n Hint on Pages 1 to n
Pages 1 and n Control and other Pages Only Pages 1 and n have Hints
Control and any Page(s) other Pages on Page(s) - other Pages don't show Control's Hint

This behavior is acknowledged in AutoIt; it may be due to a deficiency in Windows.

Koda partly overcomes this behavior. If a Page other than the first one specifies a Hint, Koda generates <color blue>GUICtrlSetTip(-1,“”)</color> for the first page.

Koda is unable to have the Hint for the control show when any of the Pages specify a Hint.

#remarks_header[Related:]#

None

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