Default RadioButton Question 
Author Message
 Default RadioButton Question

I have two radio buttons grouped in a box. When I start the
application, none of them are checked. It should be in a mutually
exclusive relationship so at least one has to be checked at any given
time. How do I select a radio button when I start up the application?

Jason

Sent via Deja.com http://www.*-*-*.com/
Before you buy.



Sun, 23 Feb 2003 12:11:13 GMT  
 Default RadioButton Question
I have two radio buttons grouped in a box. When I start the
application, none of them are checked. It should be in a mutually
exclusive relationship so at least one has to be checked at any given
time. How do I select a radio button when I start up the application?

Jason

Sent via Deja.com http://www.deja.com/
Before you buy.



Sun, 23 Feb 2003 12:10:46 GMT  
 Default RadioButton Question

Hi,
Try this:

1. Set corect right tab (menu Layout->Tab Order)
2. In the first radio bt. set Group proprietes (uncheck this option in the
other
 radio buttons in the group)
3. Using Class Wizard add int  Member Variable for the first radio bt. (with
group option),
4. In constructor of your dialog, change:
  //{{AFX_DATA_INIT(CMy123Dlg)
 m_MyVariable = -1;
 //}}AFX_DATA_INIT

to

  //{{AFX_DATA_INIT(CMy123Dlg)
 m_MyVariable = 0;
 //}}AFX_DATA_INIT

Set this varaible to 0 or to any other value to select other radio bt.

Ragards,
Radek



Sun, 23 Feb 2003 14:03:03 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. RadioButton group binding?

2. Help With Casting A Control Item To RadioButton

3. RadioButton: REALLY URGENT!!

4. Subclassed RadioButton hanging when clicked!

5. RadioButton

6. RADIOBUTTON BOX SIZE

7. Grouping RadioButton

8. TreeView: RadioButton style how?

9. Grouping Radiobutton

10. Changing the Background color of RadioButton

11. RadioButton-frustration (switch-problems)

12. Radiobutton visible/unvisible

 

 
Powered by phpBB® Forum Software