GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Nov 26, 2015 12:14 am

All times are UTC

Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Displaying packed widgets
PostPosted: Thu Nov 10, 2005 8:17 pm 
Familiar Face

Joined: Thu Sep 22, 2005 12:23 pm
Posts: 20
I have a class that derives from Gtk::VBox, called jme::Contacts; jme::Contacts is in turn used by the jme::MainWin class as one of its attributes, named 'contact'. However, when the object 'contact' is passed to a Gtk::Notebook as one of its tabs:

notebook->append_page(*contacts, "Contacts");

none of the characteristics of the object 'contacts'(Frame and title of the frame) are displayed.

Below is a quick snip of the class in question.
#include <gtkmm/box.h>
#include <gtkmm/frame.h>

namespace jme{

class Contacts : virtual public Gtk::VBox{
void HBox1();
void NameFrame();

Gtk::HBox* hbox1;
Gtk::Frame* frmName;

virtual ~Contacts();
}; //class
} // namespace

hbox1 = new Gtk::HBox();
frmName = new Gtk::Frame("Name");
catch ( std::bad_alloc & x ) {std::cout << x.what() << std::endl; }

this->NameFrame(); //Add more attributes to the frame

this->HBox1(); // Add objects to this->hbox1
void jme::Contacts::NameFrame(){

void jme::Contacts::HBox1(){

hbox1->pack_start(*frmName, Gtk::PACK_EXPAND_WIDGET);

Having stated that, after compiling and linking the application using the MinGW-GCC-c++, I get the following message which reads:

Info: resolving Gtk::Stock::APPLY by linking to __imp___ZN3Gtk5Stock5APPLYE (auto-import)
Info: resolving Gtk::Stock::CLOSE by linking to __imp___ZN3Gtk5Stock5CLOSEE (auto-import)
Info: resolving Gtk::Stock::HELP by linking to __imp___ZN3Gtk5Stock4HELPE (auto-import)

Now, I know that ther only part of the program that can cause any of these messages is:
---- snip ---
this->btnApply = new Gtk::Button(Gtk::Stock::APPLY);
this->btnQuit = new Gtk::Button(Gtk::Stock::CLOSE);
this->btnHelp = new Gtk::Button(Gtk::Stock::HELP);
this->notebook = new Gtk::Notebook();

but why would this be causing this err-message?

Please note that I am using WinXP as the developing platform
Thanks for your help folks! you have been very helpful in my GTKmm learning process.

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

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] 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