GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Gtk::RadioButtons??!!

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming
Author Message
Jamiil
Familiar Face


Joined: 22 Sep 2005
Posts: 20

PostPosted: Tue Nov 22, 2005 3:19 am    Post subject: Gtk::RadioButtons??!! Reply with quote

Hi folks!
I have a few Gtk::RadioButton in my application which when displayed are active,
but I want'em to displayed inactive. How can I make this radio buttons first
display unselected and then, when the user makes the selection, appear selected.

TIA
Back to top
pasture
Familiar Face


Joined: 21 Nov 2005
Posts: 5

PostPosted: Tue Nov 22, 2005 1:48 pm    Post subject: Reply with quote

Did you try "gtk_toggle_button_set_active"? If that doesn't work, I don't have any ideas.
Back to top
irvm
Familiar Face


Joined: 21 Sep 2005
Posts: 12

PostPosted: Tue Nov 22, 2005 8:14 pm    Post subject: Radio Buttons? Reply with quote

Hi:

Just create the first radiobutton (in each group) and don't add it to the container.
This 'dummy' button will be selected, but invisible, leaving the rest of the buttons
in the group unselected, until clicked.

use Gtk (*) # Example in Qu:

app = application("Radio Test")
win = window(app.name)

panel = vbox()
win.add(panel)

btn = [0]*4
btn[0] = radio_button('dummy')
btn[1] = radio_button('One')
btn[2] = radio_button('Two')
btn[3] = radio_button('Three')

panel.add(btn[1..3])
win.show_all
app.main
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> GTK+ Programming All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP