dbkaynor Posted March 26, 2010 Share Posted March 26, 2010 Is it possible to have a list box have a horizontal scroll bar? I have no problem getting the Vertical scroll but not the horizontal. Global $ListNewFiles = GUICtrlCreateList("", 10, 60, 550, 250, BitOR($LBS_SORT, $LBS_HASSTRINGS, $LBS_STANDARD, $WS_HSCROLL, $WS_VSCROLL, $WS_BORDER, $LBS_MULTIPLESEL)) Global $ListActiveFiles = GUICtrlCreateList("", 10, 310, 550, 250, Default, $WS_HSCROLL + $WS_VSCROLL) No matter what combo I try I do not get a horizontal scroll bar Link to comment Share on other sites More sharing options...
furrycow Posted March 27, 2010 Share Posted March 27, 2010 Just had a quick look in the help file. BitOR($WS_BORDER, $WS_VSCROLL, $LBS_NOTIFY, $LBS_DISABLENOSCROLL, $WS_HSCROLL) Should do it. This example gives both Horizontal and Vertical. Instant Lockerz Invite - www.instantlockerzinvite.co.uk Link to comment Share on other sites More sharing options...
martin Posted March 27, 2010 Share Posted March 27, 2010 (edited) Just had a quick look in the help file. BitOR($WS_BORDER, $WS_VSCROLL, $LBS_NOTIFY, $LBS_DISABLENOSCROLL, $WS_HSCROLL) Should do it. This example gives both Horizontal and Vertical. What example in the help file? Why would that be any different to what the op shows he has already tried? Edited March 27, 2010 by martin Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
dbkaynor Posted March 27, 2010 Author Share Posted March 27, 2010 Just had a quick look in the help file. BitOR($WS_BORDER, $WS_VSCROLL, $LBS_NOTIFY, $LBS_DISABLENOSCROLL, $WS_HSCROLL) Should do it. This example gives both Horizontal and Vertical. Link to comment Share on other sites More sharing options...
dbkaynor Posted March 27, 2010 Author Share Posted March 27, 2010 I finally found the answer, After setting $WS_HSCROLL it is also required to set _GUICtrlListBox_SetHorizontalExtent. It appears the default value is 0 which means that the scroll bar is shown but is disabled. I set mine to 2500 and now the scroll bar works. Thanks for the help. Link to comment Share on other sites More sharing options...
martin Posted March 27, 2010 Share Posted March 27, 2010 I finally found the answer, After setting $WS_HSCROLL it is also required to set _GUICtrlListBox_SetHorizontalExtent. It appears the default value is 0 which means that the scroll bar is shown but is disabled. I set mine to 2500 and now the scroll bar works. Thanks for the help.Can you show an example because I have been unable to get it to work? (XP) Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script. Link to comment Share on other sites More sharing options...
dbkaynor Posted March 27, 2010 Author Share Posted March 27, 2010 The following two sets of line are out of my code and they work. I have been fighting this for months. Global $ListNewFiles = GUICtrlCreateList("", 10, 60, 550, 250, BitOR($LBS_DISABLENOSCROLL, $LBS_SORT, $WS_BORDER, $WS_HSCROLL, $WS_VSCROLL)) _GUICtrlListBox_SetHorizontalExtent($ListNewFiles, 1000) Global $ListActiveFiles = GUICtrlCreateList("", 10, 310, 550, 250, BitOR($LBS_DISABLENOSCROLL, $LBS_SORT, $WS_BORDER, $WS_HSCROLL, $WS_VSCROLL)) _GUICtrlListBox_SetHorizontalExtent($ListActiveFiles, 1000) Link to comment Share on other sites More sharing options...
furrycow Posted March 27, 2010 Share Posted March 27, 2010 Sorry i wasnt more clear. I found it in the help file in the, "_GUICtrlListBox_AddString" example. Instant Lockerz Invite - www.instantlockerzinvite.co.uk 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