设置制表符大小
#include <GuiEdit.au3>
_GUICtrlEdit_SetTabStops($hWnd, $aTabStops)
$hWnd | 控件的控件ID/句柄 |
$aTabStops | 如下格式的制表符数组: [0] - 制表符 1 [2] - 制表符 2 [n] - 制表符 n |
#include <GuiEdit.au3>
#include <GuiStatusBar.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
$Debug_Ed = False ; Check ClassName being passed to Edit functions, set to True and use a handle to another control to see it work
_Main()
Func _Main()
Local $StatusBar, $hEdit, $hGUI
Local $aPartRightSide[3] = [190, 378, -1], $aTabStops[3] = [10, 30, 50]
; 创建 GUI
$hGUI = GUICreate("Edit Set Tab Stops", 400, 300)
$hEdit = GUICtrlCreateEdit("", 2, 2, 394, 268, BitOR($ES_WANTRETURN, $WS_VSCROLL))
$StatusBar = _GUICtrlStatusBar_Create($hGUI, $aPartRightSide)
_GUICtrlStatusBar_SetIcon($StatusBar, 2, 97, "shell32.dll")
GUISetState()
; Set Margins
_GUICtrlEdit_SetMargins($hEdit, BitOR($EC_LEFTMARGIN, $EC_RIGHTMARGIN), 10, 10)
; Set Text
_GUICtrlEdit_SetText($hEdit, @TAB & "1st" & @TAB & "2nd" & @TAB & "3rd")
MsgBox(4160, "信息", "Set Tab Stops")
; Set Tab Stops
_GUICtrlEdit_SetTabStops($hEdit, $aTabStops)
; 循环直到用户退出
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>_Main