Re: Problems with widgets



On Fri, 2010-01-08 at 00:14 -0300, Esdras Beleza wrote:

> I've already worked with GTK with C# and MonoDevelop, but I'm
> beginning with gtkmm and trying to create a simple application from
> scratch (without using glade) to understand the process. I'm reading
> the documentation from gtkmm at gnome.org and modifying the examples.
> 
> 
> Until now, all I have is a code where I try to create a simple
> notebook with three pages and a label inside a HPaned. All I get is...
> a blank window.
> 
> 
> I put the code at http://pastebin.com/m626ccd3a to avoid a long email.
> Can anybody give me some advice, please? :)

Maybe this is your problem:

	Gtk::Label testLabel1("Test label 1");
	Gtk::Label testLabel2("Test label 2");
	Gtk::Label testLabel3("Test label 3");
	
	append_page(testLabel1, "Page 1");
	append_page(testLabel2, "Page 2");
	append_page(testLabel3, "Page 3");

Those Gtk::Label instances are automatically destroyed as soon as that
method ends. You might use class members instead, or Gtk::manage(new
Gtk::Label("something")). 


-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]