Sign in to follow this  
Followers 0
MrChiliCheese

GUICtrlListView with disabled HScrollBar

3 posts in this topic

Hey,

how can i create a Listview with a disabled scrollbar? I knew that this possible for a listbox, ist there a way to have it in a listview?

thx!

Share this post


Link to post
Share on other sites



Hey,

how can i create a Listview with a disabled scrollbar? I knew that this possible for a listbox, ist there a way to have it in a listview?

thx!

Example:

#include <GuiConstantsEx.au3>
#include <GuiListView.au3> ;Only for set the column width
#Include <GuiScrollBars.au3>
#include <ScrollBarConstants.au3>

$hGUI = GUICreate("Disable HScroll in ListView", 300, 200)

$hListView = GUICtrlCreateListView("Items|SubItems", 10, 10, 280, 180)

_GUICtrlListView_SetColumnWidth($hListView, 0, 100)
_GUICtrlListView_SetColumnWidth($hListView, 1, 250)

For $i = 1 To 10
    GUICtrlCreateListViewItem("Item " & $i & "|SubItem " & $i, $hListView)
Next

_GUIScrollBars_EnableScrollBar(GUICtrlGetHandle($hListView), $SB_HORZ, $ESB_DISABLE_BOTH)

GUISetState()

Do
Until GUIGetMsg() = $GUI_EVENT_CLOSE

Share this post


Link to post
Share on other sites

Thank you, but i think i did'n explain very well what i want...

I want a vertical (not a horizontal, my fault, sorry) scrollbar within my listview... if there are not enuough items to scroll, the scroll bar should be still there, but disabled...

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