Sets the tab-stop positions
#include <GuiListBox.au3>
_GUICtrlListBox_SetTabStops ( $hWnd, $aTabStops )
$hWnd | Control ID/Handle to the control |
$aTabStops | Array with the following format: [0] - Number of tab stops in the array (n) [1] - First tab stop [2] - Second tab stop [n] - Nth tab stop |
Success: | True. |
Failure: | False. |
The integers in $aTabStops represent the number of quarters of the average character width for the font that is selected into the list box.
For example, a tab stop of 4 is placed at 1.0 character units, and a tab stop of 6 is placed at 1.5 average character units.
However, if the list box is part of a dialog box, the integers are in dialog template units.
The tab stops must be sorted in ascending order; backward tabs are not allowed.
#include <GUIConstantsEx.au3>
#include <GuiListBox.au3>
Example()
Func Example()
Local $aTabs[4] = [3, 100, 200, 300], $idListBox
; Create GUI
GUICreate("List Box Set Tab Stops", 400, 296)
$idListBox = GUICtrlCreateList("", 2, 2, 396, 296, BitOR($LBS_STANDARD, $LBS_USETABSTOPS))
GUISetState(@SW_SHOW)
; Set tab stops
_GUICtrlListBox_SetTabStops($idListBox, $aTabs)
; Add tabbed string
_GUICtrlListBox_AddString($idListBox, "Column 1" & @TAB & "Column 2" & @TAB & "Column 3")
; Loop until the user exits.
Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE
GUIDelete()
EndFunc ;==>Example