Search the Community
Showing results for tags 'lbs_usetabstops'.
-
I'd like to add tab Stops to a previously created listbox. Maybe use a GUICtrlSendMsg() or _SendMessage() but I don't know. Help #include <GUIConstantsEx.au3> #include <GuiListBox.au3> #include <WinAPI.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) Local $Style = _WinAPI_GetWindowLong(GUICtrlGetHandle($idListBox), $GWL_STYLE) ;Capture Existing Style ;~ Local $ExStyle = _WinAPI_GetWindowLong(GUICtrlGetHandle($idListBox), $GWL_EXSTYLE) ;Capture Existing ExStyle ConsoleWrite("- before $Style = 0x" & Hex($Style) & @CRLF) ;~ ConsoleWrite("- before $ExStyle = 0x" & Hex($ExStyle) & @CRLF) GUICtrlSetStyle($idListBox, BitOR($Style, $LBS_USETABSTOPS)) ; change the Style $Style = _WinAPI_GetWindowLong(GUICtrlGetHandle($idListBox), $GWL_STYLE) ;~ $ExStyle = _WinAPI_GetWindowLong(GUICtrlGetHandle($idListBox), $GWL_EXSTYLE) ConsoleWrite("- after $Style = 0x" & Hex($Style) & @CRLF) ; updated style but is not reflected in it's behaviour ;~ ConsoleWrite("- after $ExStyle = 0x" & Hex($ExStyle) & @CRLF) ; 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
-
- lbs_usetabstops
- _guictrllistbox_settabstops
-
(and 1 more)
Tagged with: