How can I add image before the label like a warning sign?? and how can I make bold the label?? Thanks!

OkCancelDialog::OkCancelDialog():Gtk::Dialog( "Clear all calls", false ){
	Gtk::VBox * vbox = get_vbox();
	Gtk::Table * table = new Gtk::Table( 2, 1, false );
	Gtk::Label * label = new Gtk::Label( "Please Confirm..." );
	//Gtk::Image * image = new Gtk::Image("dialog-warning.png");    <----this is wrong!

	vbox->pack_start( *table, false, false );
	
	add_button( Gtk::Stock::CANCEL, Gtk::RESPONSE_CANCEL );
	add_button( Gtk::Stock::OK, Gtk::RESPONSE_OK );
	//table->attach( *image, 0, 1, 1, 2 );
	table->attach( *label,  1, 2, 1, 2 );
	vbox->show_all();
	set_default_size(100, 80);
}

Recommended Answers

All 4 Replies

and please can someone tell me how this code done:

list< MRef<PhoneBookPerson *> > persons = phonebook->getPersons();

I dont understand it. Thanks! =)

help help help

what is MRef in c++?

I haven't got a clue. It's not C++, it's probably something from GTK. Where did you get the code from?

help help help

Don't do that. It makes me very sad when people do that.:icon_frown:

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.