Jump to content

Disable Horizontal Scroll bar for Listview


 Share

Recommended Posts

Understood. But is there a way to totally disable it?

I believe Holger would have to answer this one because I think you have to subclass it do what you want.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

There is no message that I know of that enables/disables the scroll bar for a ListView, so I would say that sub classing would be an option.

Pretty much what I said I believe.

SciTE for AutoItDirections for Submitting Standard UDFs

 

Don't argue with an idiot; people watching may not be able to tell the difference.

 

Link to comment
Share on other sites

  • 12 years later...
#include <ListViewConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiListView.au3>
#include <GuiScrollBars.au3>

opt("GUIOnEventMode",1)
Const $widthcoldefault=369
$Form1_1 = GUICreate("Maingui", 385, 263, 192, 124)
$ListView2 = GUICtrlCreateListView("1111111111|222222222|3333333333", 8, 24, $widthcoldefault, 145)
GUISetState(@SW_SHOW)


GUISetOnEvent($GUI_EVENT_CLOSE,"exits")
listviewsetbalance($ListView2,$widthcoldefault,34,0)
listviewsetbalance($ListView2,$widthcoldefault,34,1)
listviewsetbalance($ListView2,$widthcoldefault,34,2)

Sleep(2000)
MsgBox(0,0,"Disable scroll HORZ!")

_GUIScrollBars_ShowScrollBar(ControlGetHandle($Form1_1,"",$ListView2),$SB_HORZ,0)



while 1
    Sleep(250)
WEnd

func exits()
    Exit
EndFunc

func listviewsetbalance($handlelistview,$widthcoldefault,$data,$icol)
    local $valuedata=$data/100*$widthcoldefault
    _GUICtrlListView_setColumnWidth($handlelistview,$icol,$valuedata)
EndFunc

 

Edited by xtilam
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...