Troubles with containers



Hi,
I'm trying to build a small dialog for an othello / reversi game using
gtkmm, here is the constructor of my Gtk::Dialog :


NewGameDialog::NewGameDialog()
{
	Gtk::Entry entry;
	Gtk::Label label("Name");
	Gtk::VBox vbox_a;
	vbox_a.pack_start(label, Gtk::PACK_SHRINK);
	vbox_a.pack_start(entry, Gtk::PACK_SHRINK);

	Gtk::RadioButton radiobtn_a("Human");
	Gtk::RadioButtonGroup group = radiobtn_a.get_group();
	Gtk::RadioButton radiobtn_b(group, "Bot (CPU)");
	Gtk::VBox vbox_b;
	vbox_b.pack_start(radiobtn_a, Gtk::PACK_SHRINK);
	vbox_b.pack_start(radiobtn_b, Gtk::PACK_SHRINK);

	Gtk::ComboBoxText combobox;
	combobox.append_text("Bot::Stupid");
	combobox.append_text("Bot::Normal");
	combobox.append_text("Bot::God");
	Gtk::HBox hbox_a;
	hbox_a.pack_start(vbox_b, Gtk::PACK_EXPAND_PADDING);
	hbox_a.pack_start(combobox, Gtk::PACK_EXPAND_PADDING);

	Gtk::VBox vbox_c;
	vbox_c.pack_start(vbox_a, Gtk::PACK_EXPAND_PADDING);
	vbox_c.pack_start(hbox_a, Gtk::PACK_EXPAND_PADDING);

	get_vbox()->add(vbox_c);
	set_default_size(268, 128);
	show_all();
}

currently the dialog is showing up with its correct size, but there's
nothing in it.
Can anyone help me with this ?


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