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 Jul 26, 2014 5:11 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: How to get text of a GtkCheckbutton
PostPosted: Tue Mar 04, 2008 1:45 am 
Offline

Joined: Tue Mar 04, 2008 1:34 am
Posts: 2
Hi there,

Please tell me how to get text of a GtkCheckButton if I've added a label to it before? The reason why I do that is I want to change the font size of the checkbutton. So I create a label with a small font size, and then add it to the checkbutton:


label = gtk_label_new_with_mnemonic ("_Enable");
gtk_widget_modify_font (label , font_desc);
result->chk1 = gtk_check_button_new();
gtk_container_add (GTK_CONTAINER(result->chk1), label);

Now in another place, I need to get the text of it (->"_Enable"); I guess, firstly I have to retrieve the label, and then get text of this label. But I can't in many ways. Please help me out.

Thanks in advance!
Jakov


Top
 Profile  
 
 Post subject:
PostPosted: Wed Mar 05, 2008 1:25 am 
Offline

Joined: Tue Mar 04, 2008 1:34 am
Posts: 2
Thanks. I got it. First, get child list of it, then type cast to GTKLABEL and get text.


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

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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