AlienStar Posted August 15, 2020 Share Posted August 15, 2020 (edited) hello everybody I use this functions to detect checkbox item in list view if checked or not expandcollapse popupGUIRegisterMsg($WM_NOTIFY, "WM_NOTIFY") Func WM_NOTIFY($hWnd, $iMsg, $wParam, $lParam) Global $hWndFrom, $iIDFrom, $iCode, $tNMHDR, $hWndListView $hWndListView = $listview_cat If Not IsHWnd($listview_cat) Then $hWndListView = GUICtrlGetHandle($listview_cat) $tNMHDR = DllStructCreate($tagNMHDR, $lParam) $hWndFrom = HWnd(DllStructGetData($tNMHDR, "hWndFrom")) $iIDFrom = DllStructGetData($tNMHDR, "IDFrom") $iCode = DllStructGetData($tNMHDR, "Code") Switch $hWndFrom Case $hWndListView Switch $iCode Case $NM_CLICK, $NM_DBLCLK, $NM_RCLICK, $NM_RDBLCLK Local $tInfo = DllStructCreate($tagNMITEMACTIVATE, $lParam) Local $iIndex = DllStructGetData($tInfo, "Index") If $iIndex <> -1 Then Local $iX = DllStructGetData($tInfo, "X") Local $iPart = 1 If _GUICtrlListView_GetView($listview_cat) = 1 Then $iPart = 2 ;for large icons view Local $aIconRect = _GUICtrlListView_GetItemRect($listview_cat, $iIndex, $iPart) If $iX < $aIconRect[0] And $iX >= 5 Then ItemChecked_Proc(_GUICtrlListView_GetItemText($listview_cat, $iIndex), _ _GUICtrlListView_GetItemChecked($listview_cat, $iIndex) = 0) Return 0 EndIf EndIf EndSwitch EndSwitch Return $GUI_RUNDEFMSG EndFunc Func ItemChecked_Proc($iItem, $sState) _GUICtrlStatusBar_SetText ($hStatusbar0 ,"<" & $iItem & "> is checked = " & $sState ,0) EndFunc the iItem detected is in first column only in $listview_cat I need to detect full row (all columns) help me please Edited August 15, 2020 by AlienStar Link to comment Share on other sites More sharing options...
faustf Posted August 16, 2020 Share Posted August 16, 2020 post a complealty script , not only a part ,(possibility idea: i suppose you must tell at program when is selected one select also a column ) Link to comment Share on other sites More sharing options...
Zedna Posted August 17, 2020 Share Posted August 17, 2020 (edited) Look here EDIT: and maybe also here Edited August 17, 2020 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search 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