GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Wed Oct 22, 2014 9:39 am

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Gtk::RadioButtons??!!
PostPosted: Tue Nov 22, 2005 3:19 am 
Offline
Familiar Face

Joined: Thu Sep 22, 2005 12:23 pm
Posts: 20
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

_________________
* You cannot exercise your power to a point of humiliation.
- Jean Chretien

* It's amazing how the small seeds of distrust and misunderstanding
can yield a crop of hate and death...

Ma'assalama! Adiós! bye!


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 22, 2005 1:48 pm 
Offline
Familiar Face

Joined: Mon Nov 21, 2005 9:31 am
Posts: 5
Did you try "gtk_toggle_button_set_active"? If that doesn't work, I don't have any ideas.


Top
 Profile  
 
 Post subject: Radio Buttons?
PostPosted: Tue Nov 22, 2005 8:14 pm 
Offline
Familiar Face

Joined: Wed Sep 21, 2005 1:43 pm
Posts: 12
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:
Code:
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


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:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group