Valuater Posted October 30, 2006 Share Posted October 30, 2006 is it possible to "remove" the vertical and horizontal scroll bars in a ListView i couldn't find it in the styles, extended styles, or the GuiListView.au3 commands thx 8) Link to comment Share on other sites More sharing options...
GaryFrost Posted October 30, 2006 Share Posted October 30, 2006 thru sub-classing maybe, from what I've seen it's not pretty. Might ask Holger. 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 More sharing options...
Valuater Posted October 30, 2006 Author Share Posted October 30, 2006 thru sub-classing maybe, from what I've seen it's not pretty.Might ask Holger.I take your word for it!... you know ListViews alot better than mostMaybe Holger has an extra bag of magic tricks..But if its gonna be ugly... i will have to find another directionthanks Gary8) Link to comment Share on other sites More sharing options...
Champak Posted May 22, 2008 Share Posted May 22, 2008 Two years old, but hoping someone has come up with a way for this since.?.?.? Link to comment Share on other sites More sharing options...
Zed Posted May 22, 2008 Share Posted May 22, 2008 Scroll arrows are nasty. They are everywhere when we dont need them. Link to comment Share on other sites More sharing options...
Gui Posted January 9, 2010 Share Posted January 9, 2010 I would love to see you be able to remove scroll bars, been searching and trying for weeks. Link to comment Share on other sites More sharing options...
picaxe Posted January 10, 2010 Share Posted January 10, 2010 I would love to see you be able to remove scroll bars, been searching and trying for weeks. _GUIScrollBars_ShowScrollBar($hListView, $SB_BOTH, False)See help file for example code. Link to comment Share on other sites More sharing options...
supersonic Posted January 22, 2010 Share Posted January 22, 2010 This works pretty well for GUIs but have no effect on ListViews...!? _GUIScrollBars_ShowScrollBar($hListView, $SB_BOTH, False)See help file for example code. Link to comment Share on other sites More sharing options...
picea892 Posted January 22, 2010 Share Posted January 22, 2010 (edited) Seems like the great minds have already been at this one so I will provide my hack. It clips a guictrl. There was a repaint problem which I have never been able to solve. So if you minimize and restore you would have to remake the control. <Edit> hmmm. no repaint problem for this solution as far as I can tell. expandcollapse popup#include <GuiConstantsEx.au3> #include <WindowsConstants.au3> #include <GuiListView.au3> $iLastPos = IniRead("Test.ini", "Scroll", "VPos", 0) $GUI = GUICreate("Test Script", 600, 200) $ListView = GUICtrlCreateListView("Col ", 20, 20, 260, 160) $hListView = GUICtrlGetHandle($ListView) $ListView2 = GUICtrlCreateListView("Col ", 280, 20, 260, 160) _ControlToRoundedRectangle($ListView2,0,0,240, 160,0) $hListView2 = GUICtrlGetHandle($ListView2) For $i = 1 To 80 GUICtrlCreateListViewItem("Item " & $i, $ListView) GUICtrlCreateListViewItem("Next " & $i, $ListView2) Next GUISetState(@SW_SHOW, $GUI) While 1 Switch GUIGetMsg() Case $GUI_EVENT_CLOSE Exit EndSwitch if _GUICtrlListView_GetTopIndex($hListView)<_GUICtrlListView_GetTopIndex($hListView2) then _GUICtrlListView_Scroll($hListView2, 0, -12) elseif _GUICtrlListView_GetTopIndex($hListView)>_GUICtrlListView_GetTopIndex($hListView2) then _GUICtrlListView_Scroll($hListView2, 0, +12) EndIf WEnd Func _ControlToRoundedRectangle($aControl,$X1,$Y1,$X2,$Y2,$X3) Local $l Local $handle = GUICtrlGetHandle($aControl) $l = DllCall("gdi32.dll","int","CreateRoundRectRgn","int",$X1,"int",$Y1,"int",$X2,"int",$Y2,"int",$X3,"int",$X3) DllCall("user32.dll","int","SetWindowRgn","hwnd",$handle,"int",$l[0],"int",True) EndFunc Edited January 22, 2010 by picea892 Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 22, 2010 Share Posted January 22, 2010 This works pretty well for GUIs but have no effect on ListViews...!? Yes it does. Think about it, controls are windows, so why shouldn't it? #include <ScrollBarConstants.au3> #Include <GuiScrollBars.au3> #include <ListViewConstants.au3> GUICreate(@ScriptName, 640, 480, -1, -1) $listview = GUICtrlCreateListView("col1 |col2|col3|col4|col5 ", 10, 10, 200, 150, $LVS_NOCOLUMNHEADER);,$LVS_SORTDESCENDING) $item1 = GUICtrlCreateListViewItem("item2|col22|col23|col24|col25", $listview) $item2 = GUICtrlCreateListViewItem("item1|col12|col13|col14|col15", $listview) $item3 = GUICtrlCreateListViewItem("item3|col32|col33|col34|col35", $listview) GUISetState() $hListView = GUICtrlGetHandle($listview) _GUIScrollBars_ShowScrollBar($hListView, $SB_BOTH, False) ;remove comment and scrollbars disappear Do Sleep(10) Until GUIGetMsg() = -3 .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
supersonic Posted January 22, 2010 Share Posted January 22, 2010 (edited) Cool! 100% ! Greate! :-) Edited January 22, 2010 by supersonic Link to comment Share on other sites More sharing options...
supersonic Posted January 22, 2010 Share Posted January 22, 2010 (edited) Hmm... Temporary the scroll bars disappear... But when selecting Items via mouse, the scroll bars reappear... Strange. You can put _GUIScrollBars_ShowScrollBar() somewhere between the Do/Until-Loop, but this isn't a real solution... For the moment, the "hack" from picea892 (see above) works pretty well as long as sticking two ListViews together... Edited January 22, 2010 by supersonic Link to comment Share on other sites More sharing options...
AdmiralAlkex Posted January 22, 2010 Share Posted January 22, 2010 Hmm... Temporary the scroll bars disappear... But when selecting Items via mouse,the scroll bars reappear... Strange.You can put _GUIScrollBars_ShowScrollBar() somewhere between the Do/Until-Loop,but this isn't a real solution...Yeah I just noticed that... Better try picea892's way. .Some of my scripts: ShiftER, Codec-Control, Resolution switcher for HTC ShiftSome of my UDFs: SDL UDF, SetDefaultDllDirectories, Converting GDI+ Bitmap/Image to SDL Surface Link to comment Share on other sites More sharing options...
supersonic Posted January 22, 2010 Share Posted January 22, 2010 (edited) I have no repaint problem... (V3.3.0.0) Edited January 22, 2010 by supersonic Link to comment Share on other sites More sharing options...
picea892 Posted January 22, 2010 Share Posted January 22, 2010 On this example neither do I...must have been GDI related in this post. redraw control Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now