Jump to content

Sky Slate Blueberry Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate
Photo

[SOLVED] Trouble getting radio buttons to work



  • Please log in to reply
2 replies to this topic
mikek
  • Members
  • 161 posts
  • Last active: Nov 09 2015 05:02 PM
  • Joined: 21 Nov 2008
Hi all, I'm having some trouble getting my radio buttons to work. When I click on the "Lookup" button, I want to be able to check to see which radio button is selected. I am trying to have a message box tell me the value of the two radio buttons, but it is always showing nothing. Any idea what I'm doing wrong here?

- Mike
gui, font, s8, Courier New
Gui, Add, Edit, r1 -WantReturn vMyEdit, Job Number or Search Text

Gui, Add, Radio, vMyRadioGroup1 Checked group, Line Items
Gui, Add, Radio, vMyRadioGroup2, Drop Dates

Gui, Add, Button, Default, Lookup
Gui, Add, Button, , Cancel
Gui, Show, AutoSize Center, Lookup Job
Return

ButtonCancel:
ExitApp
Return

ButtonLookup:
Gui, Submit, NoHide
MsgBox  Radio 1 = "%vMyRadioGroup1%"`nRadio 2 = "%vMyRadioGroup2%"
Return


Morpheus
  • Members
  • 475 posts
  • Last active: Oct 21 2014 11:08 AM
  • Joined: 31 Jul 2008
✓  Best Answer
Use:
MsgBox,  Radio 1 = "%MyRadioGroup1%"`nRadio 2 = "%MyRadioGroup2%"


mikek
  • Members
  • 161 posts
  • Last active: Nov 09 2015 05:02 PM
  • Joined: 21 Nov 2008
Thank you, Morpheus. I appreciate your help.

- Mike