nyke0 Posted September 3, 2014 Share Posted September 3, 2014 Is that possible? GUICtrlSetState(-1, $GUI_DISABLE) Is a little too much, I can't scroll then. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 3, 2014 Moderators Share Posted September 3, 2014 What do you mean "I can't scroll"? What kind of control are you setting to disabled? It will really help us help you if you post your code so we can see what you're trying to do "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! Link to comment Share on other sites More sharing options...
nyke0 Posted September 3, 2014 Author Share Posted September 3, 2014 I meant the GUICtrlSetState(-1, $GUI_DISABLE) Function, if I use it, I can't scroll. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted September 3, 2014 Moderators Share Posted September 3, 2014 Again, you need to post your entire code so we can see what you're doing, rather than having us guess from 1 line. "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! Link to comment Share on other sites More sharing options...
nyke0 Posted September 3, 2014 Author Share Posted September 3, 2014 ok ... #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 400, 220, -1, -1) $ListView1 = GUICtrlCreateListView("Col 1|Col 2|Col 3", 0, 0, 400, 220) For $i = 0 to 20 GUICtrlCreateListViewItem('Text|Text|Text', $ListView1) Next GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Link to comment Share on other sites More sharing options...
Wruck Posted September 3, 2014 Share Posted September 3, 2014 (edited) Try using GUICtrlCreateList instead of GUICtrlCreateListView? There is a style in just the List called, $LBS_NOSEL, that might be what you are looking for? #include <GUIConstantsEx.au3> #include <ListboxConstants.au3> #include <WindowsConstants.au3> $Form1 = GUICreate("Form1", 400, 220, -1, -1) $ListView1 = GUICtrlCreateList("", 0, 0, 400, 220, $LBS_NOSEL) For $i = 0 to 20 GUICtrlSetData($ListView1, 'Text|Text|Text') Next GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Edited September 3, 2014 by Wruck Link to comment Share on other sites More sharing options...
nyke0 Posted September 3, 2014 Author Share Posted September 3, 2014 No, I need a Listview, and disable to click items. Link to comment Share on other sites More sharing options...
Solution johnmcloud Posted September 3, 2014 Solution Share Posted September 3, 2014 expandcollapse popup;~ Johnmcloud 2014 #include <GUIConstantsEx.au3> #include <ListViewConstants.au3> #include <WindowsConstants.au3> #include <StructureConstants.au3> $Form = GUICreate("Johnmcloud Test Code", 400, 220, -1, -1) $hListView = GUICtrlCreateListView("Col 1|Col 2|Col 3", 0, 0, 400, 220) For $i = 0 To 100 GUICtrlCreateListViewItem('Text|Text|Text', $hListView) Next GUISetState(@SW_SHOW) GUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd Func WM_NOTIFY($hWnd, $Msg, $wParam, $lParam) Local $tNMHDR, $IdFrom, $iCode $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $IdFrom = DllStructGetData($tNMHDR, "IdFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $IdFrom Case $hListView Switch $iCode Case $LVN_ITEMACTIVATE Return 1 Case $LVN_ITEMCHANGING Return 1 EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc ;==>WM_NOTIFY 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