Jump to content

LIst box horz scroll


dbkaynor
 Share

Recommended Posts

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

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.
Link to comment
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.

Link to comment
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.
Link to comment
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)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...