Jump to content

GUICtrlListView with disabled HScrollBar


MrChiliCheese
 Share

Recommended Posts

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

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...