Jump to content
Sign in to follow this  
DjDeep00

Disable Horizontal Scroll bar for Listview

Recommended Posts

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.


Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


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

 

Share this post


Link to post
Share on other sites

Pretty much what I said I believe.

I was replying to the post at the same time you were. I was just slower because I checked some sources before I finished.

Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites
#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

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  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...