728x90
☑️ 체크박스 활성화
🟩 체크박스 비활성화
#NoEnv
#SingleInstance, Force
Gui, Add, GroupBox, w260 h100 Section
Gui, Add, Checkbox, xs+5 ys gonCB_Click Checked hwndhCB1, Breakfast
Gui, Add, Radio, xs+20 ys+20 w100 hwndhRB11, Toast
Gui, Add, Radio, y+12 w100 hwndhRB12, Pancakes
Gui, Add, Radio, y+12 w100 hwndhRB13, Pickles
Gui, Add, GroupBox, xm w260 h100 Section
Gui, Add, Checkbox, xs+5 ys gonCB_Click Checked hwndhCB2, Lunch
Gui, Add, Radio, xs+20 ys+20 w100 hwndhRB21, Sandwich
Gui, Add, Radio, y+12 w100 hwndhRB22, Soup
Gui, Add, Radio, y+12 w100 hwndhRB23, Rack of Lamb
Gui, Show
Children := {}
Children.Push({hwnd: hCB1})
Children.Push({hwnd: hCB2})
Children[1].Push(hRB11)
Children[1].Push(hRB12)
Children[1].Push(hRB13)
Children[2].Push(hRB21)
Children[2].Push(hRB22)
Children[2].Push(hRB23)
Return
GuiClose:
ExitApp
;-------------------------------------------------------------------------------
onCB_Click(hwnd, GuiEvent, EventInfo, ErrLevel := "") {
;-------------------------------------------------------------------------------
global Children
SetFormat, Integer, h
GuiControlGet, state,, % hwnd += 0
Loop, 2
If Children[A_Index].hwnd = hwnd {
Index := A_Index
Break
}
For each, Child in Children[Index]
If Not (Child = hwnd)
GuiControl, % (state ? "Enable":"Disable"), %Child%
}
728x90
'AutoHotKey' 카테고리의 다른 글
한방에_v1 - 자작 아닌 짜집기 20231007 (0) | 2023.10.02 |
---|---|
UrlDownloadToFile 폰트 적용 - 다운로드용 (0) | 2023.09.30 |
하드 디스크 드라이브(HDD) 숨기기 (0) | 2023.09.10 |
[GUI] PING 테스트 (0) | 2023.09.03 |
[GUI] IP on network interfaces (0) | 2023.09.01 |