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 Dec 20, 2014 11:44 pm

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 
Offline
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{
private:
void HBox1();
void NameFrame();
protected:

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


public:
Contacts();
virtual ~Contacts();
}; //class
} // namespace
#endif

jme::Contacts::Contacts(){
try{
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(){

frmName->add(dynamic_cast<Gtk::Widget&>(*lblFirstName));
}
void jme::Contacts::HBox1(){
hbox1->set_border_width(50);

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

hbox1->show_all_children(true);
}
============
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!


Top
 Profile  
 
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] and 5 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:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group