jvds Posted September 3, 2014 Posted September 3, 2014 Hi all, is there a way to disable a listview created with _GUICtrlListView_Create? GUICtrlSetState($g_hListView,@SW_DISABLE) does not work, reading arround the form give me the idea that I need to use winapi but I have no clue how to disable it that way thanks #include <GUIConstantsEx.au3> #include <GuiImageList.au3> #include <GuiListView.au3> $hGUI=GUICreate("ImageList Create", 400, 300) $g_hListView = _GUICtrlListView_Create($hGUI, "", 2, 2, 394, 268) GUISetState(@SW_SHOW) _GUICtrlListView_AddColumn($g_hListView, "a", 120) _GUICtrlListView_AddColumn($g_hListView, "b", 120) _GUICtrlListView_AddItem($g_hListView, "1", 0) _GUICtrlListView_AddItem($g_hListView, "2", 1) _GUICtrlListView_AddSubItem($g_hListView, 0, "3", 1) _GUICtrlListView_AddSubItem($g_hListView, 1, "4", 1) ;Not Working GUICtrlSetState($g_hListView,@SW_DISABLE) Do Until GUIGetMsg() = $GUI_EVENT_CLOSE GUIDelete()
computergroove Posted September 3, 2014 Posted September 3, 2014 Rather than disabling it why don't you just remove it from the script? Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html
Moderators JLogan3o13 Posted September 3, 2014 Moderators Posted September 3, 2014 (edited) I would think it is apparent that if the OP is creating a listview and then disabling, he either wants it to be read only but scrollable - or would like to re-enable it at some point... @OP, it is $GUI_DISABLE, not @SW_DISABLE, for controls. Edited September 3, 2014 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum!
jvds Posted September 3, 2014 Author Posted September 3, 2014 I want to disable / enable it depending on what the script is doing
MikahS Posted September 3, 2014 Posted September 3, 2014 GUICtrlSetState($g_hListView, $GUI_DISABLE) Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ
jvds Posted September 3, 2014 Author Posted September 3, 2014 it is still enabled after i use that, i can still click the column headers or the items inside
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