Sign in to follow this  
Followers 0
dbkaynor

LIst box horz scroll

8 posts in this topic

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

Share this post


Link to post
Share on other sites



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

Share this post


Link to post
Share on other sites

#3 ·  Posted (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 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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

Sorry i wasnt more clear.

I found it in the help file in the, "_GUICtrlListBox_AddString" example.


Instant Lockerz Invite - www.instantlockerzinvite.co.uk

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0