GUI 控件样式

GUI 控件样式

来源于: http://www.autoitx.com/Doc/html/appendix/guistyles.htm

本页列出了用于窗口的通用及扩展样式,同时还列出了用于控件的样式.这些样式能作为"样式"和/或"扩展样式"参数用于大部分的 GUI 函数中.要使用这些值必须使用 #include 语句包含该文件到您的脚本中.

注意:下表给出的"值"仅供参考,为了使脚本的可读性更好您应该尽量使用这些样式的"名称".


公共样式详细信息
  

#include <WindowsConstants.au3>

GUI创建时默认/强制样式 $GUI_SS_DEFAULT_GUI 请查看 GUICreate 函数.
$WS_BORDER0x00800000创建一个细边框的窗口.
$WS_POPUP0x80000000创建一个弹出式窗口.此样式不能和 WS_CHILD 同时使用.
$WS_CAPTION0x00C00000创建一个带有标题栏的窗口(包含 WS_BORDER 样式)
$WS_CLIPCHILDREN0x02000000当在父窗口内绘图时,排除子窗口区域.在创建父窗口时将使用此样式.
$WS_CLIPSIBLINGS0x04000000Clips child windows relative to each other; that is, when a particular child window receives a WM_PAINT message, the WS_CLIPSIBLINGS style clips all other overlapping child windows out of the region of the child window to be updated. If WS_CLIPSIBLINGS is not specified and child windows overlap, it is possible, when drawing within the client area of a child window, to draw within the client area of a neighboring child window.
$WS_DISABLED0x08000000创建一个初始状态为不可用的窗口.
$WS_DLGFRAME0x00400000创建一个带有对话框边框的窗口.
$WS_HSCROLL0x00100000创建一个带有水平滚动条的窗口.
$WS_MAXIMIZE0x01000000创建一个初始状态为最大化的窗口.
$WS_MAXIMIZEBOX0x00010000创建一个带有最大化按钮的窗口.不能和 WS_EX_CONTEXTHELP 样式同时使用.必须带有 WS_SYSMENU 样式.
$WS_MINIMIZE0x20000000创建一个初始状态为最小化的窗口.
$WS_MINIMIZEBOX0x00020000创建一个带有最小化按钮的窗口.不能和 WS_EX_CONTEXTHELP同时使用.必须带有 WS_SYSMENU 样式.
$WS_OVERLAPPED0x00000000创建一个层叠的窗口.层叠的窗口带有标题栏和边框.和 WS_TILED 样式相同.
$WS_OVERLAPPEDWINDOW0x00CF0000创建一个带有WS_OVERLAPPED, WS_CAPTION, WS_SYSMENU, WS_THICKFRAME, WS_MINIMIZEBOX, 和 WS_MAXIMIZEBOX 样式的窗口. 与 WS_TILEDWINDOW 样式相同.
$WS_POPUPWINDOW0x80880000创建一个带有 WS_BORDER, WS_POPUP 以及 WS_SYSMENU 样式的弹出式窗口.为使窗口的菜单可见必须添加 WS_CAPTION 和 WS_POPUPWINDOW 样式.
$WS_SIZEBOX0x00040000创建一个可调整边框的窗口.和 WS_THICKFRAME样式相同.
$WS_SYSMENU0x00080000创建一个标题栏上有窗口菜单的窗口.必须添加 WS_CAPTION 样式.
$WS_THICKFRAME0x00040000创建一个可调整边框的窗口.和 WS_SIZEBOX 样式相同.
$WS_VSCROLL0x00200000创建一个带有垂直滚动条的窗口.
$WS_VISIBLE0x10000000创建一个初始状态为可见的窗口.
$WS_CHILD0x40000000创建一个子窗口.带有此风格的窗口不能带有菜单栏.此样式不能和 WS_POPUP 样式同时使用.
$WS_GROUP0x00020000指定控件组的第一个控件.控件组由第一个控件和其后定义的所有控件组成,一直到下一个控件带有 WS_GROUP 样式为止.
$WS_TABSTOP0x00010000使控件具有 tabstop,使用户能按下 Tab 键在对话框的各个(具有 tabstop 的)控件间切换(以选择控件).
$DS_MODALFRAME0x00000080创建一个带有模式对话框框架的窗口,在指定了 WS_CAPTION 和 WS_SYSMENU 样式后还可以让窗口带有标题栏和窗口 菜单.
$DS_SETFOREGROUND0x00000200此样式对模式对话框比较有用,它能使用户立即注意到此对话框,而不管它的主属窗口是否活动(当前)窗口.
$DS_CONTEXTHELP0x00002000使对话框的标题栏上显示一个问号按钮.此样式不能和 WS_MAXIMIZEBOX 或 WS_MINIMIZEBOX 样式同时使用.和WS_EX_CONTEXTHELP 扩展样式相同.

 

 

公共扩展样式详细信息
  

#include <WindowsConstants.au3>

$WS_EX_ACCEPTFILES0x00000010允许(用户)通过拖放让被创建的GUI窗口中的编辑框/输入控件接受文件名.该控件也必须具有 $GUI_ACCEPTFILES 状态(由 GUICtrlSetState 设置).
$WS_EX_APPWINDOW0x00040000当窗口可见时将一个顶层窗口放到任务栏上.
$WS_EX_COMPOSITED0x02000000Windows XP or above: Paints all descendants of a window in bottom-to-top painting order using double-buffering.
$WS_EX_CLIENTEDGE0x00000200使窗口带有凹陷边框.
$WS_EX_CONTEXTHELP0x00000400使窗口标题栏带有一个问号标志,不能和 WS_MAXIMIZEBOX 或 WS_MINIMIZEBOX 同时使用.
$WS_EX_DLGMODALFRAME0x00000001创建一个带有双层边框的窗口;对这种窗口还可以在创建时通过在样式参数中指定 WS_CAPTION 样式使其带有标题栏(可选).
$WS_EX_MDICHILD0x00000040在父窗口中建立一个子窗口.(模拟一个MDI窗口,但是子窗口的最大化/最小化按钮不能模拟).
$WS_EX_OVERLAPPEDWINDOW0x00000300相当于 WS_EX_CLIENTEDGE 和 WS_EX_WINDOWEDGE 样式的组合.
$WS_EX_STATICEDGE0x00020000创建一个带有三维边框样式的窗口,一般用于不接受用户输入的项目.
$WS_EX_TOPMOST0x00000008使带有此样式的窗口放置在所有非顶层窗口之上,而且即使在该窗口失去激活状态时还总是保持在它们之上.
$WS_EX_TRANSPARENT0x00000020该窗口将透明显示,因为在它下方的同属窗口已被重绘.
$WS_EX_TOOLWINDOW0x00000080创建一个工具窗口;也即,一个一般用作浮动工具栏的窗口.工具窗口的标题栏比普通标题栏要短,而且它的窗口标题使用更小的字体.工具窗口在任务栏上不显示按钮,用户按下热键 Alt+Tab 后在弹出的对话框中也不会显示它的图标.如果一个工具窗口拥有系统菜单,那么它的图标不会在其标题栏上显示出来.不过,您可以按下热键 Alt+空格 来显示它的系统菜单.
$WS_EX_WINDOWEDGE0x00000100使窗口带有凸起边框.
$WS_EX_LAYERED0x00080000创建一个分层的窗口.注意,此样式不能用于子窗口.
$GUI_WS_EX_PARENTDRAG0x00100000允许拖动标签(label)或者图片(Pic)控件时即拖动整个父窗口.

 

 

检查框(Checkbox)样式详细信息
  

#include <ButtonConstants.au3>

默认/强制性 参考 GUICtrlCreateCheckbox 函数.
$BS_3STATE0x0005Creates a check box in which the box can be unavailable as well as selected or cleared. Use the unavailable state to show that the state of the check box is not determined.
$BS_AUTO3STATE0x0006Creates a three-state check box in which the state cycles through selected, unavailable, and cleared each time the user selects the check box.
$BS_AUTOCHECKBOX0x0003Creates a check box in which the check state switches between selected and cleared each time the user selects the check box.
$BS_CHECKBOX0x0002Creates a small, empty check box with a label displayed to the right of it. To display the text to the left of the check box, combine this flag with the BS_RIGHTBUTTON style.
$BS_LEFT0x0100Left-aligns the text in the button rectangle on the right side of the check box.
$BS_PUSHLIKE0x1000Makes a button (such as a check box, three-state check box, or radio button) look and act like a push button. The button looks raised when it isn't pushed or checked, and sunken when it is pushed or checked.
$BS_RIGHT0x0200Right-aligns text in the button rectangle on the right side of the check box.
$BS_RIGHTBUTTON0x0020Positions a check box square on the right side of the button rectangle.
$BS_GROUPBOX0x0007Creates a rectangle in which other buttons can be grouped. Any text associated with this style is displayed in the rectangle’s upper-left corner.
$BS_AUTORADIOBUTTON0x0009Same as a radio button, except that when the user selects it, the button automatically highlights itself and removes the selection from any other radio buttons with the same style in the same group.

 

 

按钮(Button)样式详细信息
  

#include <ButtonConstants.au3>

Default/forced 参考 GUICtrlCreateButton, GUICtrlCreateCheckbox, GUICtrlCreateRadio 函数.
$BS_BOTTOM0x0800将文字置于按钮底部.
$BS_CENTER0x0300水平居中按钮文本.
$BS_DEFPUSHBUTTON0x0001创建一个带黑边的按钮. 如果是一个对话框, 用户可以使用回车键选择这个按钮, 即使按钮并不具有输入焦点也同样可用. 这个样式通常用于用户快速的选择合适的选项或者默认选项.
$BS_MULTILINE0x2000如果单行的文字太长不能在按钮上正常显示,那么它可以让文本使用多行显示.
$BS_TOP0x0400放置文本在按钮的顶端.
$BS_VCENTER0x0C00垂直居中按钮文本.
$BS_ICON0x0040让按钮可以显示图标(ICO).
$BS_BITMAP0x0080让按钮可以显示位图(BMP).
$BS_FLAT0x8000使用二维方式显示按钮,它没有三维显示的阴影.
$BS_NOTIFY0x4000Enables a button to send BN_KILLFOCUS and BN_SETFOCUS notification messages to its parent window. Note that buttons send the BN_CLICKED notification message regardless of whether it has this style. To get BN_DBLCLK notification messages, the button must have the BS_RADIOBUTTON or BS_OWNERDRAW style.

 

 

组合框(Combo)样式详细信息
  

#include <ComboConstants.au3>

默认/强制 $GUI_SS_DEFAULT_COMBO 参考 GUICtrlCreateCombo 函数.
$CBS_AUTOHSCROLL0x0040Automatically scrolls the text in an edit control to the right when the user types a character at the end of the line. If this style is not set, only text that fits within the rectangular boundary is enabled.
$CBS_DISABLENOSCROLL0x0800Shows a disabled vertical scroll bar in the list box when the box does not contain enough items to scroll. Without this style, the scroll bar is hidden when the list box does not contain enough items.
$CBS_DROPDOWN0x0002Displays only the edit control by default. The user can display the list box by selecting an icon next to the edit control.
$CBS_DROPDOWNLIST0x0003Displays a static text field that displays the current selection in the list box.
$CBS_LOWERCASE0x4000Converts to lowercase any uppercase characters that are typed into the edit control of a combo box.
$CBS_NOINTEGRALHEIGHT0x0400Specifies that the combo box will be exactly the size specified by the application when it created the combo box. Usually, Windows CE sizes a combo box so that it does not display partial items.
$CBS_OEMCONVERT0x0080Converts text typed in the combo box edit control from the Windows CE character set to the OEM character set and then back to the Windows CE set. This style is most useful for combo boxes that contain file names. It applies only to combo boxes created with the CBS_DROPDOWN style.
$CBS_SIMPLE0x0001Displays the list box at all times. The current selection in the list box is displayed in the edit control.
$CBS_SORT0x0100Sorts strings that are typed into the list box.
$CBS_UPPERCASE0x2000Converts to uppercase any lowercase characters that are typed into the edit control of a combo box.

 

 

List 样式详细信息
  

#include <ListboxConstants.au3>

Default/forced $GUI_SS_DEFAULT_LIST 参考 GUICtrlCreateList 函数.
$LBS_DISABLENOSCROLL0x1000Shows a disabled vertical scroll bar for the list box when the box does not contain enough items to scroll. If you do not specify this style, the scroll bar is hidden when the list box does not contain enough items.
$LBS_NOINTEGRALHEIGHT0x0100Specifies that the list box will be exactly the size specified by the application when it created the list box.
$LBS_NOSEL0x4000Specifies that the user can view list box strings but cannot select them.
$LBS_NOTIFY0x0001Notifies the parent window when the user taps or double-taps a string in the list box.
$LBS_SORT0x0002Sorts strings in the list box alphabetically.
$LBS_STANDARD0xA00003Sorts strings in the list box alphabetically. The parent window receives an input message when the user taps or double-taps a string. The list box has borders on all sides. (LBS_NOTIFY | LBS_SORT | WS_VSCROLL | WS_BORDER)
$LBS_USETABSTOPS0x0080Enables a list box to recognize and expand tab characters when drawing its strings. The default tab positions are 32 dialog box units. A dialog box unit is equal to one-fourth of the current dialog box base-width unit.

 

 

Edit/Input 样式详细信息
  

#include <EditConstants.au3>

Default/forced $GUI_SS_DEFAULT_EDIT, $GUI_SS_DEFAULT_INPUT see GUICtrlCreateEdit or GUICtrlCreateInput function.
$ES_AUTOHSCROLL0x0080Automatically scrolls text to the right by 10 characters when the user types a character at the end of the line. When the user presses the ENTER key, the control scrolls all text back to the zero position.
$ES_AUTOVSCROLL0x0040Scrolls text up one page when the user presses the ENTER key on the last line.
$ES_CENTER0x0001Centers text in a multiline edit control.
$ES_LOWERCASE0x0010Converts all characters to lowercase as they are typed into the edit control.
$ES_NOHIDESEL0x0100Negates the default behavior for an edit control. The default behavior hides the selection when the control loses the input focus and inverts the selection when the control receives the input focus. If you specify ES_NOHIDESEL, the selected text is inverted, even if the control does not have the focus.
$ES_NUMBER0x2000Accepts into the edit control only digits to be typed.
$ES_OEMCONVERT0x0400This style is most useful for edit controls that contain file names.
$ES_MULTILINE0x0004Designates a multiline edit control. The default is a single-line edit control.
$ES_PASSWORD0x0020Displays an asterisk (*) for each character that is typed into the edit control.
$ES_READONLY0x0800Prevents the user from typing or editing text in the edit control.
$ES_RIGHT0x0002Right-aligns text in a multiline edit control.
$ES_UPPERCASE0x0008Converts all characters to uppercase as they are typed into the edit control.
$ES_WANTRETURN0x1000Specifies that a carriage return be inserted when the user presses the ENTER key while typing text into a multiline edit control in a dialog box. If you do not specify this style, pressing the ENTER key has the same effect as pressing the dialog box’s default push button. This style has no effect on a single-line edit control.

 

 

进度条(Progress Bar)控件样式详细信息
  

#include <ProgressConstants.au3>

$PBS_SMOOTH0x01Displays progress status in a smooth scrolling bar instead of the default segmented bar.
$PBS_VERTICAL0x04Displays progress status vertically, from bottom to top.

 

 

Up-down 控件样式详细信息
  

#include <UpdownConstants.au3>

Default/forced $GUI_SS_DEFAULT_UPDOWN 参考 GUICtrlCreateUpdown 函数.
$UDS_ALIGNLEFT0x08Positions the up-down control next to the left edge of the buddy window. The buddy window is moved to the right and its width is decreased to accommodate the width of the up-down control.
$UDS_ALIGNRIGHT0x04Positions the up-down control next to the right edge of the buddy window. The width of the buddy window is decreased to accommodate the width of the up-down control.
$UDS_ARROWKEYS0x20Causes the up-down control to process the UP ARROW and DOWN ARROW keys on the keyboard.
$UDS_HORZ0x40Causes the up-down control’s arrows to point left and right instead of up and down.
$UDS_NOTHOUSANDS0x80Prevents insertion of a thousands separator between every three decimal positions.
$UDS_WRAP0x01Causes the position to wrap if it is incremented or decremented beyond the end or beginning of the range.

 

 

Label/Static 样式详细信息
  

#include <StaticConstants.au3>

Default/forced $GUI_SS_DEFAULT_LABEL, $GUI_SS_DEFAULT_ICON, $GUI_SS_DEFAULT_PIC see GUICtrlCreateLabel, GUICtrlCreateIcon, GUICtrlCreatePic functions.
$SS_BLACKFRAME0x07Specifies a box with a frame drawn in the same color as the window frames. This color is black in the default color scheme.
$SS_BLACKRECT0x04Specifies a rectangle filled with the current window frame color. This color is black in the default color scheme.
$SS_CENTER0x01Specifies a simple rectangle and centers the error value text in the rectangle. The control automatically wraps words that extend past the end of a line to the beginning of the next centered line.
$SS_CENTERIMAGE0x0200Specifies that the midpoint of a static control with the SS_BITMAP style will remain fixed when you resize the control. The four sides are adjusted to accommodate a new bitmap. If the bitmap is smaller than the control’s client area, the rest of the client area is filled with the color of the pixel in the upper-left corner of the bitmap. It can be used with static control having only one line of text.
Microsoft Windows XP: This style bit no longer results in unused portions of the control being filled with the color of the top left pixel of the bitmap or icon. Unused portions of the control will remain the background color.
$SS_ETCHEDFRAME0x12Draws the frame of the static control using the EDGE_ETCHED edge style.
$SS_ETCHEDHORZ0x10Draws the top and bottom edges of the static control using the EDGE_ETCHED edge style.
$SS_ETCHEDVERT0x11Draws the left and right edges of the static control using the EDGE_ETCHED edge style.
$SS_GRAYFRAME0x08Specifies a box with a frame drawn with the same color as the screen background (desktop). This color is gray in the default color scheme
$SS_GRAYRECT0x05Specifies a rectangle filled with the current screen background color. This color is gray in the default color scheme.
$SS_LEFT0x0000Specifies a simple rectangle and left-aligns the text in the rectangle. The text is formatted before it is displayed. Words that extend past the end of a line are automatically wrapped to the beginning of the next left-aligned line. Words that are longer than the width of the control are truncated.
$SS_LEFTNOWORDWRAP0x0CSpecifies a rectangle and left-aligns the text in the rectangle. Tabs are expanded, but words are not wrapped. Text that extends past the end of a line is clipped.
$SS_NOPREFIX0x80Prevents interpretation of any ampersand (&) characters in the control’s text as accelerator prefix characters.
An application can combine SS_NOPREFIX with other styles by using the bitwise OR (|) operator. This can be useful when file names or other strings that might contain an ampersand (&) must be displayed within a static control in a dialog box.
$SS_NOTIFY0x0100Sends the parent window the STN_CLICKED notification when the user clicks the control.
$SS_RIGHT0x0002Specifies a rectangle and right-aligns the specified text in the rectangle.
$SS_RIGHTJUST0x0400Specifies that the lower right corner of a static control with the SS_BITMAP or SS_ICON style is to remain fixed when the control is resized. Only the top and left sides are adjusted to accommodate a new bitmap or icon.
$SS_SIMPLE0x0BSpecifies a simple rectangle and displays a single line of left-aligned text in the rectangle. The text line cannot be shortened or altered in any way. Also, if the control is disabled, the control does not gray its text.
$SS_SUNKEN0x1000Draws a half-sunken border around a static control.
$SS_WHITEFRAME0x09Specifies a box with a frame drawn with the same color as the window background. This color is white in the default color scheme.
$SS_WHITERECT0x06Specifies a rectangle filled with the current window background color. This color is white in the default color scheme.

 

 

标签(Tab)控件样式详细信息
  

#include <TabConstants.au3>

默认值/强制值 参考 GUICtrlCreateTab 函数.
$TCS_SCROLLOPPOSITE0x0001Unneeded tabs scroll to the opposite side of the control when a tab is selected.
$TCS_BOTTOM0x0002Tabs appear at the bottom of the control. This value equals TCS_RIGHT. This style is not supported if you use ComCtl32.dll version 6.
$TCS_RIGHT0x0002Tabs appear vertically on the right side of controls that use the TCS_VERTICAL style. This value equals TCS_BOTTOM. This style is not supported if you use visual styles.
$TCS_MULTISELECT0x0004Multiple tabs can be selected by holding down CTRL when clicking. This style must be used with the TCS_BUTTONS style.
$TCS_FLATBUTTONS0x0008Selected tabs appear as being indented into the background while other tabs appear as being on the same plane as the background. This style only affects tab controls with the TCS_BUTTONS style.
$TCS_FORCEICONLEFT0x0010Icons are aligned with the left edge of each fixed-width tab. This style can only be used with the TCS_FIXEDWIDTH style.
$TCS_FORCELABELLEFT0x0020Labels are aligned with the left edge of each fixed-width tab; that is, the label is displayed immediately to the right of the icon instead of being centered.

This style can only be used with the TCS_FIXEDWIDTH style, and it implies the TCS_FORCEICONLEFT style.

$TCS_HOTTRACK0x0040Items under the pointer are automatically highlighted
$TCS_VERTICAL0x0080Tabs appear at the left side of the control, with tab text displayed vertically. This style is valid only when used with the TCS_MULTILINE style. To make tabs appear on the right side of the control, also use the TCS_RIGHT style. This style is not supported if you use ComCtl32.dll version 6.
$TCS_TABS0x0000Tabs appear as tabs, and a border is drawn around the display area. This style is the default.
$TCS_BUTTONS0x0100Tabs appear as buttons, and no border is drawn around the display area.
$TCS_SINGLELINE0x0000Only one row of tabs is displayed. The user can scroll to see more tabs, if necessary. This style is the default.
$TCS_MULTILINE0x0200Multiple rows of tabs are displayed, if necessary, so all tabs are visible at once.
$TCS_RIGHTJUSTIFY0x0000The width of each tab is increased, if necessary, so that each row of tabs fills the entire width of the tab control.

This window style is ignored unless the TCS_MULTILINE style is also specified.

$TCS_FIXEDWIDTH0x0400All tabs are the same width. This style cannot be combined with the TCS_RIGHTJUSTIFY style.
$TCS_RAGGEDRIGHT0x0800Rows of tabs will not be stretched to fill the entire width of the control. This style is the default.
$TCS_FOCUSONBUTTONDOWN0x1000The tab control receives the input focus when clicked.
$TCS_OWNERDRAWFIXED0x2000The parent window is responsible for drawing tabs.
$TCS_TOOLTIPS0x4000The tab control has a tooltip control associated with it.
$TCS_FOCUSNEVER0x8000The tab control does not receive the input focus when clicked.

 

 

Avi Clip 样式详细信息
  

#include <AVIConstants.au3>

Default/forced $GUI_SS_DEFAULT_AVI see GUICtrlCreateAvi function.
$ACS_AUTOPLAY0x04Starts playing the animation as soon as the AVI clip is opened.
$ACS_CENTER0x01Centers the animation in the animation control's window.
$ACS_TRANSPARENT0x02Allows you to match an animation's background color to that of the underlying window, creating a "transparent" background. (Default value)
$ACS_NONTRANSPARENT0x10To override default ACS_TRANSPARENT

 

 

日期(Date)控件样式详细信息
  

#include <DateTimeConstants.au3>

默认值/强制值 $GUI_SS_DEFAULT_DATE 参考 GUICtrlCreateDate 函数.
$DTS_UPDOWN0x01Places an up-down control to the right of a DTP control to modify time values. This style can be used instead of the drop-down month calendar, which is the default style.
$DTS_SHOWNONE0x02Enables the control to accept “no date” as a valid selection state.
$DTS_LONGDATEFORMAT0x04Displays the date in long format. The default format string for this style is defined by LOCALE_SLONGDATEFORMAT, which produces output like “Friday, April 19, 1998.”
$DTS_TIMEFORMAT0x09Displays the time. The default format string for this style is defined by LOCALE_STIMEFORMAT, which produces output like “5:31:42 PM.”
$DTS_RIGHTALIGN0x20The drop-down month calendar will be right-aligned with the control instead of left-aligned, which is the default.
$DTS_SHORTDATEFORMAT0x00Displays the date in short format. The default format string for this style is defined by LOCALE_SSHORTDATE, which produces output like "4/19/96".

 

 

月历(MonthCal)控件样式详细信息
  

#include <DateTimeConstants.au3>

Default/forced 参考 GUICtrlCreateMonthCal 函数.
$MCS_NOTODAY0x10月历控件将不会显示 "今天" 日期在控件底部 .
$MCS_NOTODAYCIRCLE0x08The month calendar control will not circle the "today" date.
$MCS_WEEKNUMBERS0x04The month calendar control will display week numbers (1-52) to the left of each row of days. Week 1 is defined as the first week that contains at least four days.

 

 

树形查看(TreeView)控件样式详细信息
  

#include <TreeviewConstants.au3>

Default/forced $GUI_SS_DEFAULT_TREEVIEW 参考 GUICtrlCreateTreeView 函数.
$TVS_HASBUTTONS0x0001Displays plus (+) and minus (-) buttons next to parent items. The user clicks the buttons to expand or collapse a parent item's list of child items. To include buttons with items at the root of the tree view, TVS_LINESATROOT must also be specified.
$TVS_HASLINES0x0002Uses lines to show the hierarchy of items.
$TVS_LINESATROOT0x0004Uses lines to link items at the root of the tree view control. This value is ignored if TVS_HASLINES is not also specified.
$TVS_DISABLEDRAGDROP0x0010Prevents the tree view control from sending TVN_BEGINDRAG notification messages.
$TVS_SHOWSELALWAYS0x0020Causes a selected item to remain selected when the tree view control loses focus.
$TVS_RTLREADING0x0040Normal windows display text left-to-right (LTR). Windows can be mirrored to display languages such as Hebrew or Arabic that read right-to-left (RTL). Normally, tree view text will be displayed in same direction as the the text in its parent window. If TVS_RTLREADING is set, tree view text will read in the opposite direction from the text in the parent window.
$TVS_NOTOOLTIPS0x0080树形查看控件不支持工具提示(tooltips).
$TVS_CHECKBOXES0x0100启用树形查看控件中的检查框(check boxes). Once a tree-view control is created with this style, the style cannot be removed. Instead, you must destroy the control and create a new one in its place.
$TVS_TRACKSELECT0x0200Enables hot tracking in a tree view control.
$TVS_SINGLEEXPAND0x0400When this style is enabled, changing the selection in the tree view will automatically cause the item being selected to expand and the item being unselected to collapse. If the mouse is used to single-click the selected item and that item is closed, it will be expanded. If the user holds the CTRL key down while selecting an item, the item being unselected will not be collapsed.
$TVS_FULLROWSELECT0x1000Enables full-row selection in the tree view. The entire row of the selected item is highlighted, and clicking anywhere on an item's row will cause it to be selected. This style cannot be used in conjunction with the TVS_HASLINES style.
$TVS_NOSCROLL0x2000Disables horizontal scrolling in the control. The control will not display any horizontal scroll bars.
$TVS_NONEVENHEIGHT0x4000The height of the items can be set to an odd height with the TVM_SETITEMHEIGHT message. By default, the height of items must be an even value.

 

 

Slider 样式详细信息
  

#include <SliderConstants.au3>

Default/forced $GUI_SS_DEFAULT_SLIDER 参考 GUICtrlCreateSlider 函数.
$TBS_AUTOTICKS0x0001Adds tick marks when you set the range on the trackbar by using the TBM_SETRANGE message.
$TBS_BOTH0x0008Places ticks on both sides of the trackbar.
$TBS_BOTTOM0x0000Places ticks on the bottom of a horizontal trackbar.
$TBS_HORZ0x0000Specifies a horizontal trackbar. This is the default.
$TBS_VERT0x0002Places ticks on the left side of a vertical trackbar.
$TBS_NOTHUMB0x0080Specifies that the trackbar has no slider.
$TBS_NOTICKS0x0010Specifies that no ticks are placed on the trackbar.
$TBS_LEFT0x0004Places ticks on the left side of a vertical trackbar.
$TBS_RIGHT0x0000Places ticks on the right side of a vertical trackbar.
$TBS_TOP0x0004Places ticks on the top of a horizontal trackbar.

 

 

列表查看(ListView) 样式详细信息
  

#include <ListviewConstants.au3>

默认/强制 $GUI_SS_DEFAULT_LISTVIEW see GUICtrlCreateListView函数.
$LVS_ICON0x0000这个样式指定控件显示为带大图标的列表.
$LVS_REPORT0x0001这个样式指定控件显示为报告样式.
$LVS_SMALLICON0x0002这个样式指定控件显示为带小图标的列表.
$LVS_LIST0x0003这个样式指定控件显示为一个列表.
$LVS_EDITLABELS0x0200项目文本可以被编辑替换.
$LVS_NOCOLUMNHEADER0x4000不在报告样式中显示列表头. 默认情况下, 列表头在报告样式的ListView控件中是存在的 .
$LVS_NOSORTHEADER0x8000列表头就像按钮一样,并且不能用来自动排序. 这个样式可以使用于 单击一个报告样式的列表头不会执行任何动作 .
$LVS_SINGLESEL0x0004只需选中一个项目,同样的项目也会被选中(点一个选一行).
$LVS_SHOWSELALWAYS0x0008总是显示所有项目的所有文本(注:防止文本长度太长,ListView不能全部显示.原文:The selection, if any, is always shown, even if the control does not have the focus).
$LVS_SORTASCENDING0x0010项目索引将使用递增自动排列.
$LVS_SORTDESCENDING0x0020项目索引将使用递减自动排列 .
$LVS_NOLABELWRAP0x0080项目文本显示于图标查看的单行中. 默认情况下, 项目文本将会限制在图标周围 .

 

 

列表查看(ListView)扩展样式详细信息
  

#include <ListviewConstants.au3>

$LVS_EX_FULLROWSELECT0x00000020当一个项目被选中,同一行的所有项目也会被选中.
$LVS_EX_GRIDLINES0x00000001在项目和子项目周围显示网格.
$LVS_EX_HEADERDRAGDROP0x00000010列表头可以使用拖动排列顺序(比如把下载速度行拖动到下载时间后面等等).
$LVS_EX_TRACKSELECT0x00000008在列表查看(ListView)控件中使用焦点跟踪,当前焦点会被选中(鼠标光标移动到一个项目上,将会自动赋予焦点并选中)
$LVS_EX_CHECKBOXES0x00000004在列表查看(ListView)控件中使用检查框(Check)控件.
$LVS_EX_BORDERSELECT0x00008000如果设置了这个样式, 当项目选择了与边界同样的颜色,项目会被设置高亮(突出) .
$LVS_EX_DOUBLEBUFFER0x00010000 
$LVS_EX_FLATSB0x00000100列表查看(ListView)使用平坦样式的滚动条.
$LVS_EX_MULTIWORKAREAS0x00002000 
$LVS_EX_SNAPTOGRID0x00080000 
$LVS_EX_SUBITEMIMAGES0x00000002允许图像显示于子项目.

 

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: PyQt是一个优秀的基于Python的GUI应用程序开发工具,在Python语言中,PyQt是一个强大的库,能够实现各种控件的创建和调用,这些控件包括按钮、文本框、标签、菜单栏等。此外,PyQt还支持自定义控件样式,用户可以根据自己的需求来设置控件的颜色、字体、布局等方面的样式。 在PyQt中,可以通过CSS样式表来设置控件的外观。CSS样式表是一种常见的网页设计语言,通过设置CSS属性,可以改变控件的颜色、字体、大小以及布局等外观属性。在PyQt中,可以通过类似于HTML的标记语言QSS来创建和设置CSS样式表,通过设置QWidget的setStyleSheet方法,我们可以将样式表应用到界面上。 除了使用CSS样式表外,PyQt还支持使用QPalette来设置控件的颜色和背景。QPalette是Qt这个GUI框架中专门用来控制颜色和背景的类,开发者可以使用setPalette()方法来设置QPalette。QPalette可以为一个控件设置多个状态下的颜色和背景,例如正常状态、选中状态、鼠标悬停状态等。 总之,PyQt提供了很多控件样式和设置的方式,开发者可以根据自己的需求来选择适合的方式,改变控件样式和外观。这些特性使得PyQt成为一个非常强大的GUI开发工具,能够满足各种不同应用场景下的需求。 ### 回答2: PyQt是一种用于创建Python GUI应用程序的框架。它提供了丰富的控件样式,使开发者可以轻松地创建各种类型和风格的GUI应用程序。 除了通常的窗口和按钮控件,PyQt还提供了图像控件、多媒体控件、文本控件、进度条控件等等。这些控件可以帮助开发者创建更加丰富和功能齐全的GUI应用程序。 PyQt还支持许多不同的控件样式,例如Windows、Fusion、Macintosh和Plastique。这些样式可以定制控件的外观和行为,以满足开发者的特定需求和美学。 除了系统提供的控件样式,PyQt还支持自定义样式表。这允许开发者根据需要设计控件的外观和行为。通过样式表,开发者可以定制控件的背景色、字体、边框、填充等等。 总之,PyQt提供的控件样式非常多样化,可以满足许多不同类型和需求的GUI应用程序。开发者可以根据自己的需求选择适合自己的控件样式,从而创建出独一无二的GUI应用程序。 ### 回答3: PyQt是一种Python编程语言的GUI框架,可以让开发者创建各种控件。PyQt提供了丰富的控件样式,以满足不同应用程序的需求,这些样式反映在PyQt提供的不同QWidget的子类中。其中一些常见控件包括按钮,滑块条,组合框,标签,表格和菜单栏等。 每个控件都有自己的一些标准样式,但PyQt还为开发人员提供了自定义控件样式的灵活性。通过Qt样式表,可以轻松修改控件的外观,例如改变背景颜色,修改文字大小和字体等。还可以通过更改控件样式表来改变控件的行为,例如更改按钮的单击和双击操作等。 除了提供标准和自定义控件样式之外,PyQt还可以让应用程序使用不同的主题。通过更改整个应用程序的主题,开发人员可以改变应用程序中所有控件的显示方式,从而使应用程序更具吸引力和个性化。在选择主题时,开发人员可以根据用户需求和应用程序的性质进行选择。 总之,PyQt的控件样式可以帮助开发人员快速创建各种GUI应用程序,并提供丰富的控件和主题样式,以满足用户需求,增强应用程序的外观和功能。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值