Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

LETS SEE IF YOU KNOW

Status
Not open for further replies.

alta77

Programmer
Jan 20, 2009
6
I have craeted optionbuttons and placed them in Groups. The problem is that I can't clear the selection on the optionbutton. If you click on a button how do I clear the button so its empty. Thank you
 
Did you try to set the value of the frame to Null ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 

If you have option buttons on the Form - one of them should always be picked/selected.

If you want to have all of your options cleared, have another option called "None" and select this one.

At least that's my approach to option buttons.

Look at any other windows application and find one that will work the way you wanted yours to work - where there are option buttons and none of them are selected.

Have fun.

---- Andy
 
I agree with Andy in that having "None" is a legitimate Option, and if applicable, a valid design route.

I do not agree with Andy in that:

"If you have option buttons on the Form - one of them should always be picked/selected. "

is not quite correct. Although, granted, it is the word "should".

IF the default value of Option buttons (grouped) is blank (Null) - the default state when you create them - then when a userform is displayed, all Option buttons are blank.

However, once ANY Option button is selected, then one of them will always be selected (True). It does not matter which one (that can change), but from then on, one of them will be selected.

Which is why I agree with Andy. "None" is a valid option to be able to set. Selecting "None" becomes an explicit instruction - rather than an implicit state.

Gerry
 
Apple's, Microsoft's and Sun's Java user interface guidelines all agree with Andy ...
 
LOL

I guess he is in good company...

Gerry
 

I don’t know if I should take it as a complement or an insult….? :)

My point is: why would you want to have all options set to False at the start? And if you have it that way, you choose something and go “I want to have all of them False” – no way to go back.

And in VB.NET if you make a group of radio buttons (why they keep changing the names of common controls?) and you don’t have any set to True, VB will set one for you at run time.


Have fun.

---- Andy
 
Good heavens, do not take it as an insult!!!

I emphasized the IF, in: "IF the default value of Option buttons (grouped) is blank (Null) - the default state when you create them - then when a userform is displayed, all Option buttons are blank."

So your point: "My point is: why would you want to have all options set to False at the start? "

can be replied to with...you may not "want" to, but IF you do not explicitly make one of them True, then - by default - they are False. Therefore...all of them will start out blank.

Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top