GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Sat Oct 25, 2014 3:32 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: [SOLVED]Unchecked all gtkradiobuttons
PostPosted: Fri Oct 18, 2013 8:51 am 
Offline
Familiar Face

Joined: Fri Jul 26, 2013 11:29 am
Posts: 5
Hello,
I'm new in this forum and sorry if my english is not very good, I hope you can understand what is my problem. I need your help about the use of gtkradiobutton! In my gtk program I would insert two gtkradiobuttons and as the first value ( at the beginning of the program ) I wish they were both unchecked. I did this in my program:
Code:
GSList *group;
GtkWidget *rd1, *rd2;

rd1 = gtk_radio_button_new_with_label( NULL, "first radio-button");
group = gtk_radio_button_get_group( rd1 );
gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(rd1), FALSE); //cause I want the normal button layout
rd2 = gtk_radio_button_new_with_label( group, "second radio-button");
gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(rd1), FALSE);

But in this case rd1 is already checked and rd2 unchecked, i try to force che state of rd1 unchecked with:
Code:
gtk_toggle_button_set_mode(GTK_TOGGLE_BUTTON(rd1), FALSE);

but the result is the same! Someone can help me please?
Thank you so much!

Ghilander


Last edited by Ghilander on Tue Nov 05, 2013 8:45 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Unchecked all gtkradiobuttons
PostPosted: Wed Oct 23, 2013 2:27 pm 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 764
Location: UK
Hi,

I think the function you want is
Code:
void                gtk_toggle_button_set_inconsistent  (GtkToggleButton *toggle_button,
                                                         gboolean setting);


This would set the toggle button to an inconsistent state, ie. in a state that is not set or un-set.

_________________
E.


Top
 Profile  
 
 Post subject: Re: Unchecked all gtkradiobuttons
PostPosted: Wed Oct 30, 2013 2:13 pm 
Offline
Familiar Face

Joined: Fri Jul 26, 2013 11:29 am
Posts: 5
Yes! Thank you very much!!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group