Error: This value of type "Gui.Text" has no method named "Modify".
011: g.OnEvent("Close", (*) => ExitApp())
014: {
▶ 015: LV.Modify(0, "-Check")
016: }
020: {
Code: Select all
#Requires AutoHotkey v2.0
g := Gui("+AlwaysOnTop")
g.Add("Text", "VUncheck cRed", "Uncheck_All").OnEvent('doubleclick', Uncheck_All)
LV := g.AddListView("w400 r12 -readonly checked", ["name","items"])
loop 12
LV.Add(, "Name " A_Index,"Item " A_Index * 10)
LV.modifycol(1, 190)
LV.modifycol(2, 190)
LV.OnEvent("doubleclick", LVClick)
g.Show()
g.OnEvent("Close", (*) => ExitApp())
Uncheck_All(LV, Item,*)
{
LV.Modify(0, "-Check") ; Uncheck all the checkboxes.
}
LVClick(LV, Item,*)
{
{
ItemState := SendMessage(0x102C, item - 1, 0xF000, LV)
if !((ItemState >> 12) - 1)
LV.Modify(item, "Check")
else
LV.Modify(item, "-Check")
}
}