nyke0 Posted September 3, 2014 Posted September 3, 2014 Is that possible? GUICtrlSetState(-1, $GUI_DISABLE) Is a little too much, I can't scroll then.
Moderators JLogan3o13 Posted September 3, 2014 Moderators 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!
nyke0 Posted September 3, 2014 Author Posted September 3, 2014 I meant the GUICtrlSetState(-1, $GUI_DISABLE) Function, if I use it, I can't scroll.
Moderators JLogan3o13 Posted September 3, 2014 Moderators 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!
nyke0 Posted September 3, 2014 Author 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
Wruck Posted September 3, 2014 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
nyke0 Posted September 3, 2014 Author Posted September 3, 2014 No, I need a Listview, and disable to click items.
Solution johnmcloud Posted September 3, 2014 Solution 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
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