Help with uncheck items in ListView
Posted: 01 Jan 2019, 04:51
hey
im trying to uncheck row2, row3, row4 & row5 only when row1 is checked
what im doing wrong ?
tnx in advance
im trying to uncheck row2, row3, row4 & row5 only when row1 is checked
what im doing wrong ?
tnx in advance
Code: Select all
Gui Add, ListView, Checked gTest, Name
Gui show
loop, 5
LV_Add("","Row" a_index)
return
test:
FocusedRowNumber := LV_GetNext() ; Find the focused row.
LV_GetText(Name, FocusedRowNumber, 1) ; Get the text of the 1st field focused row.
if FocusedRowNumber = Row1 ; if Row1 is chekced
Loop, 4
{
MyIndex := A_Index+1
LV_Modify(MyIndex, "-check") ; uncheck row2, row3, row4 & row5 (if they were checked)
}
return