GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Fri Jul 25, 2014 5:40 pm

All times are UTC




Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: [solved]a newbie's question...
PostPosted: Sun Mar 09, 2008 6:22 pm 
Offline
Familiar Face

Joined: Sun Mar 09, 2008 2:23 am
Posts: 7
I am really confused about this. I am using gtkmm and I want to do something really simple. Just add a button to my window!!! I am able to create the window and add the button, but the button is as big as the window. After a little more reading I figure out that I need to use a container. So Gtk::Fixed is what I need. But here is the problem:

I add() the button to the container. Then I add() the container to the window. And then show the window. But nothing is displayed, only the window. How do I display my button(and possibly other widgets)?? can you give an example code? This is driving me crazy. Am I forgetting something?


thank you


Last edited by sledgehammer_999 on Sun Mar 09, 2008 9:27 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sun Mar 09, 2008 9:26 pm 
Offline
Familiar Face

Joined: Sun Mar 09, 2008 2:23 am
Posts: 7
Solved.

I was declaring the container and button in the source file and not the header file. Once I declared these widgets as "protected" members in my window-class prototype in the header file everything worked fine.I can finally sleep!!!


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