Setting a Radio Button

Discuss the future of the AutoHotkey language
User avatar
kczx3
Posts: 563
Joined: 06 Oct 2015, 21:39

Setting a Radio Button

11 May 2018, 15:20

In v2, is there any way to check a radio button in a radio control group without giving a name to each of them? By only giving one a variable name and using Submit(), we can get the position of the currently selected radio. But I don't see a way to set the selected radio button based on position. In v1.1, you could set it by passing the radio button's text as the ControlID parameter of GuiControl though I'd prefer using position.
lexikos
Posts: 5943
Joined: 30 Sep 2013, 04:07
GitHub: Lexikos

Re: Setting a Radio Button

11 May 2018, 16:31

If you don't want to assign a name, you can use the ClassNN or store each radio button (returned by Gui.Add) in an array.
User avatar
kczx3
Posts: 563
Joined: 06 Oct 2015, 21:39

Re: Setting a Radio Button

11 May 2018, 18:48

Sounds good. Thanks for your reply!

Return to “AutoHotkey v2 Development”

Who is online

Users browsing this forum: No registered users and 2 guests