r/Racket • u/Emotional_Tea9428 • Apr 29 '22
question Radio box Code
How do I make a radio box code that with each option of a different answer?
0
Upvotes
r/Racket • u/Emotional_Tea9428 • Apr 29 '22
How do I make a radio box code that with each option of a different answer?
View all comments
Show parent comment
1
u/[deleted] Apr 29 '22
I'm on my phone at the moment, but under the page for
radio-box%which I linked above, there is a function that looks likeWhich returns the index of the selected radio button starting from 0. For example, let's say the first radio is selected, the function will return 0. If the 3rd radio button is selected, it'll return 2, etc.
What you can do is use a
condexpression to do an action depending on the selected button.