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 

[solved]a newbie's question...

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


Joined: 09 Mar 2008
Posts: 6

PostPosted: Sun Mar 09, 2008 6:22 pm    Post subject: [solved]a newbie's question... Reply with quote

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
Back to top
sledgehammer_999
Familiar Face


Joined: 09 Mar 2008
Posts: 6

PostPosted: Sun Mar 09, 2008 9:26 pm    Post subject: Reply with quote

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!!!
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