About Gtk::Bin?
- From: "BC Zhu" <zhubicen gmail com>
- To: gtkmm-list gnome org
- Subject: About Gtk::Bin?
- Date: Sat, 13 Dec 2008 22:09:00 +0800
I was wondering the reason why the following code cann't work? It
shows nothing, i expect it can show one button.
How to fix this issue?
Thanks in advance.
#include <gtkmm.h>
#include <gtkmm/main.h>
#include <gtkmm/window.h>
class Viewer:public Gtk::Bin
{
public:
Viewer():table_(2, 2), button_("ZHU"){
table_.attach(button_, 0, 1, 0, 1);
show_all_children();
}
private:
Gtk::Table table_;
Gtk::Button button_;
};
class Window:public Gtk::Window
{
public:
Window(){
add(viewer_);
viewer_.show();
}
private:
Viewer viewer_;
};
int main (int argc,char *argv[])
{
Gtk::Main kit(argc, argv);
Window win;
Gtk::Main::run(win);
return 0;
}
--
Best Regards
Bicen.Zhu
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]