Radio Buttton

Radio Buttton

Anonymous
Not applicable
853 Views
10 Replies
Message 1 of 11

Radio Buttton

Anonymous
Not applicable

Is there a way to deselect a radio button that you selected by mistake?

0 Likes
854 Views
10 Replies
Replies (10)
Message 2 of 11

Moshe-A
Mentor
Mentor
0 Likes
Message 3 of 11

Anonymous
Not applicable

@Moshe-A

 

Really, you are desperate for a solution so bad you post a link in this thread. I will agree you gave a start for my lisp routine, but was not complete. I did finish it, so if you are so eager for a check mark then answer my question.

0 Likes
Message 4 of 11

Moshe-A
Mentor
Mentor

if in your opinion the answer was not complete then why didn't you gave any feedback???

 

there times we can not provide a complete solution cause we do not know all the details on what the OP doing

you did not provide any sample drawing or blocks - did you???  so how can you expect we can provide a complete solution if we can not even test it?!

 

putting you on the right track helped you to finish it on your own should be enough for you to close the thread.

 

 

0 Likes
Message 5 of 11

scot-65
Advisor
Advisor

A1: Add another radio_button with label "none".
(make it the default setting when launching the dialog)

A2: Add a button with label "Clear" and assign an action_tile
which calls a subroutine to iterate thru all of the radio_buttons
and setting them to "0".

Not knowing key names to each radio_button, I'll use simplified.
(foreach x (list "01" "02" "03" "04")
(set_tile (strcat "RadioButton" x) "0")
);foreach

One will not be able to "talk to the container" when trying to clear
a radio_button - at least one radio button will always be set.
If not, then mode_tile = 1 the accept button until one is selected
(this strategy is for advanced design of a dialog...).

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes
Message 6 of 11

doaiena
Collaborator
Collaborator

Nobody in this forum owes you a complete solution. You should actually take the time to thank @Moshe-A for the code he provided, instead of complaining that it is not exactly what you wanted.

 

In this forum, and many others, you have professional programmers sharing their years of knowledge with people for free. You would be surprised, how many people here would help with code examples or even complete solutions if you only ask politely and show an honest effort to solve the problem on your own.

 

PS:

@scot-65  just gave you the answer for clearing the radio buttons.

0 Likes
Message 7 of 11

JamesMaeding
Advisor
Advisor

@Anonymous 

That is a mistake if a radio button is unselected.

The fact that you want that says you need to use check boxes, and handle things so only one is selected.

That will allow the user to uncheck all.

This is UI design 101, so don't pick on @Moshe-A 


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

0 Likes
Message 8 of 11

Moshe-A
Mentor
Mentor

@doaiena 

@JamesMaeding 

 

thank you guys for your support.

 

Guess the OP can not show any gratitude for the free help he gets here and maybe he should turn to others who charge payment and have the right to complain.

 

have a nice day all 😀

moshe

 

 

 

 

0 Likes
Message 9 of 11

Anonymous
Not applicable

Apologizes, was a rough day.

0 Likes
Message 10 of 11

JamesMaeding
Advisor
Advisor

@Anonymous 

No worries, as we see this a lot where a new programmer tries to do what is essentially magic and it don't go so well.

It gets better if you stick to it.


internal protected virtual unsafe Human() : mostlyHarmless
I'm just here for the Shelties

0 Likes
Message 11 of 11

scot-65
Advisor
Advisor
Perhaps you want behavior as described in message 10?

- None
- One
- or Other
- Not Both

using 2 toggles?
It can be done with a little work using action_tile...

???

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.

0 Likes