MattHiggs Posted March 24, 2016 Share Posted March 24, 2016 (edited) I am having an issue where the horizontal scroll bar is not appearing on my list controls. And this doesn't just happen with my project. Even running the GUICtrlCreateList script included with autoit Installation (clearly states that, while limited, there should be a horizontal scroll bar for list control), none is displayed. Is this a known issue? I have the following code for my project: **Just found _GUICtrlListBox_SetHorizontalExtent. My bad** expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> #include <GUIConstants.au3> $Form1 = GUICreate("Boxstarter Commands", 805, 643, 139, 134) $MenuItem1 = GUICtrlCreateMenu("File") $MenuItem2 = GUICtrlCreateMenuItem("Re-run command scan", $MenuItem1) $Label1 = GUICtrlCreateLabel("Boxstarter Easy Powershell Command Document Creator", 152, 16, 501, 29) GUICtrlSetFont(-1, 16, 400, 0, "MS Sans Serif") $Group1 = GUICtrlCreateGroup("Choose modules which contain commands which you want to add to document", 122, 88, 561, 81) $Checkbox1 = GUICtrlCreateCheckbox("example", 146, 112, 137, 17) $Checkbox2 = GUICtrlCreateCheckbox("example", 330, 112, 129, 17) $Checkbox3 = GUICtrlCreateCheckbox("example", 514, 112, 113, 17) $Checkbox4 = GUICtrlCreateCheckbox("example", 146, 136, 113, 17) $Checkbox5 = GUICtrlCreateCheckbox("example", 330, 136, 129, 17) $Checkbox6 = GUICtrlCreateCheckbox("I need all of it", 514, 136, 113, 17) GUICtrlCreateGroup("", -99, -99, 1, 1) $List1 = GUICtrlCreateList("", 8, 232, 145, 357, BitOR($GUI_SS_DEFAULT_LIST,$LBS_MULTIPLESEL,$LBS_HASSTRINGS,$LBS_EXTENDEDSEL,$WS_HSCROLL)) GUICtrlSetData(-1, "This is a long sentence containing lots of text which should create a horizontal scroll bar so you can see all of it, but its not|This is a long sentence containing lots of text which should create a horizontal scroll bar so you can see all of it, but its not|This is a long sentence containing lots of text which should create a horizontal scroll bar so you can see all of it, but its not|This is a long sentence containing lots of text which should create a horizontal scroll bar so you can see all of it, but its not|This is a long sentence containing lots of text which should create a horizontal scroll bar so you can see all of it, but its not") GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlSetState(-1, $GUI_HIDE) $List2 = GUICtrlCreateList("", 168, 232, 145, 357, BitOR($GUI_SS_DEFAULT_LIST,$LBS_MULTIPLESEL,$LBS_HASSTRINGS,$LBS_EXTENDEDSEL,$WS_HSCROLL)) For $i = 1 To 5 Step 1 GUICtrlSetData ( -1, "This is a long sentence containing lots of text which should create a horizontal scroll bar so you can see all of it, but its not." ) Next GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlSetState(-1, $GUI_HIDE) $List3 = GUICtrlCreateList("", 328, 232, 145, 357, BitOR($GUI_SS_DEFAULT_LIST,$LBS_MULTIPLESEL,$LBS_HASSTRINGS,$LBS_EXTENDEDSEL,$WS_HSCROLL)) For $i = 1 To 5 Step 1 GUICtrlSetData ( -1, "This is a long sentence containing lots of text which should create a horizontal scroll bar so you can see all of it, but its not." ) Next GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlSetState(-1, $GUI_HIDE) $List4 = GUICtrlCreateList("", 488, 232, 145, 357, BitOR($GUI_SS_DEFAULT_LIST,$LBS_MULTIPLESEL,$LBS_HASSTRINGS,$LBS_EXTENDEDSEL,$WS_HSCROLL)) For $i = 1 To 5 Step 1 GUICtrlSetData ( -1, "This is a long sentence containing lots of text which should create a horizontal scroll bar so you can see all of it, but its not." ) Next GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlSetState(-1, $GUI_HIDE) $List5 = GUICtrlCreateList("", 648, 232, 145, 357, BitOR($GUI_SS_DEFAULT_LIST,$LBS_MULTIPLESEL,$LBS_HASSTRINGS,$LBS_EXTENDEDSEL,$WS_HSCROLL)) For $i = 1 To 5 Step 1 GUICtrlSetData ( -1, "This is a long sentence containing lots of text which should create a horizontal scroll bar so you can see all of it, but its not." ) Next GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlSetState(-1, $GUI_HIDE) $Button1 = GUICtrlCreateButton("Create", 361, 600, 83, 33) GUICtrlSetState(-1, $GUI_DISABLE) GUICtrlSetState(-1, $GUI_HIDE) GUICtrlSetCursor (-1, 0) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit Case $Checkbox1 If GUICtrlRead ( $Checkbox1 ) = 1 Then GUICtrlSetState ( $Checkbox6, $GUI_DISABLE ) GUICtrlSetState ( $List1, BitOR ( $GUI_ENABLE, $GUI_SHOW ) ) Else GUICtrlSetState ( $List1, BitOR ( $GUI_DISABLE, $GUI_HIDE ) ) EndIf If GUICtrlRead ( $Checkbox1 ) = 4 And GUICtrlRead ( $Checkbox2 ) = 4 And GUICtrlRead ( $Checkbox3 ) = 4 And GUICtrlRead ( $Checkbox4 ) = 4 And GUICtrlRead ( $Checkbox5 ) = 4 Then GUICtrlSetState ( $Checkbox6, $GUI_ENABLE ) EndIf Case $Checkbox2 If GUICtrlRead ( $Checkbox2 ) = 1 Then GUICtrlSetState ( $Checkbox6, $GUI_DISABLE ) GUICtrlSetState ( $List2, BitOR ( $GUI_ENABLE, $GUI_SHOW ) ) Else GUICtrlSetState ( $List2, BitOR ( $GUI_DISABLE, $GUI_HIDE ) ) EndIf If GUICtrlRead ( $Checkbox1 ) = 4 And GUICtrlRead ( $Checkbox2 ) = 4 And GUICtrlRead ( $Checkbox3 ) = 4 And GUICtrlRead ( $Checkbox4 ) = 4 And GUICtrlRead ( $Checkbox5 ) = 4 Then GUICtrlSetState ( $Checkbox6, $GUI_ENABLE ) EndIf Case $Checkbox3 If GUICtrlRead ( $Checkbox3 ) = 1 Then GUICtrlSetState ( $Checkbox6, $GUI_DISABLE ) GUICtrlSetState ( $List3, BitOR ( $GUI_ENABLE, $GUI_SHOW ) ) Else GUICtrlSetState ( $List3, BitOR ( $GUI_DISABLE, $GUI_HIDE ) ) EndIf If GUICtrlRead ( $Checkbox1 ) = 4 And GUICtrlRead ( $Checkbox2 ) = 4 And GUICtrlRead ( $Checkbox3 ) = 4 And GUICtrlRead ( $Checkbox4 ) = 4 And GUICtrlRead ( $Checkbox5 ) = 4 Then GUICtrlSetState ( $Checkbox6, $GUI_ENABLE ) EndIf Case $Checkbox4 If GUICtrlRead ( $Checkbox4 ) = 1 Then GUICtrlSetState ( $Checkbox6, $GUI_DISABLE ) GUICtrlSetState ( $List4, BitOR ( $GUI_ENABLE, $GUI_SHOW ) ) Else GUICtrlSetState ( $List4, BitOR ( $GUI_DISABLE, $GUI_HIDE ) ) EndIf If GUICtrlRead ( $Checkbox1 ) = 4 And GUICtrlRead ( $Checkbox2 ) = 4 And GUICtrlRead ( $Checkbox3 ) = 4 And GUICtrlRead ( $Checkbox4 ) = 4 And GUICtrlRead ( $Checkbox5 ) = 4 Then GUICtrlSetState ( $Checkbox6, $GUI_ENABLE ) EndIf Case $Checkbox5 If GUICtrlRead ( $Checkbox5 ) = 1 Then GUICtrlSetState ( $Checkbox6, $GUI_DISABLE ) GUICtrlSetState ( $List5, BitOR ( $GUI_ENABLE, $GUI_SHOW ) ) Else GUICtrlSetState ( $List5, BitOR ( $GUI_DISABLE, $GUI_HIDE ) ) EndIf If GUICtrlRead ( $Checkbox1 ) = 4 And GUICtrlRead ( $Checkbox2 ) = 4 And GUICtrlRead ( $Checkbox3 ) = 4 And GUICtrlRead ( $Checkbox4 ) = 4 And GUICtrlRead ( $Checkbox5 ) = 4 Then GUICtrlSetState ( $Checkbox6, $GUI_ENABLE ) EndIf Case $Checkbox6 If GUICtrlRead ( $Checkbox6 ) = 1 Then GUICtrlSetState ( $Checkbox1, $GUI_DISABLE ) GUICtrlSetState ( $Checkbox2, $GUI_DISABLE ) GUICtrlSetState ( $Checkbox3, $GUI_DISABLE ) GUICtrlSetState ( $Checkbox4, $GUI_DISABLE ) GUICtrlSetState ( $Checkbox5, $GUI_DISABLE ) GUICtrlSetState ( $List1, BitOR ( $GUI_ENABLE, $GUI_SHOW ) ) GUICtrlSetState ( $List2, BitOR ( $GUI_ENABLE, $GUI_SHOW ) ) GUICtrlSetState ( $List3, BitOR ( $GUI_ENABLE, $GUI_SHOW ) ) GUICtrlSetState ( $List4, BitOR ( $GUI_ENABLE, $GUI_SHOW ) ) GUICtrlSetState ( $List5, BitOR ( $GUI_ENABLE, $GUI_SHOW ) ) Else EndIf Case $List1 Case $List2 Case $List3 Case $List4 Case $List5 EndSwitch WEnd Edited March 24, 2016 by MattHiggs Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now