 |
GTK+ Forums Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
|
|
|
| Author |
Message |
|
|
sledgehammer_999 Familiar Face
Joined: 09 Mar 2008 Posts: 7
|
Posted: Sun Mar 09, 2008 6:22 pm Post subject: [solved]a newbie's question... |
|
|
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: 7
|
Posted: Sun Mar 09, 2008 9:26 pm Post subject: |
|
|
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 |
|
 |
|
Powered by phpBB © 2001, 2005 phpBB Group CodeBB 1.0 Beta 2
|