statusbar components don't remain attached to the left corner of the window
- From: Anca Mitrica <ancamitrica yahoo com>
- To: gtkmm-list gnome org
- Subject: statusbar components don't remain attached to the left corner of the window
- Date: Mon, 21 Nov 2005 23:59:45 -0800 (PST)
Hi,
In my gtkmm application, for some considerents, i need to introduce into the statusbar some labels and alignments , ones that display the sistem date/time, and others - the full path of a file (the application is a text editor).
The problem is that, when i try to resize the main window (in wich the statusbar is included) the component of the statusbar don't resize with the rest of the mainwindow, they remain with fixed size. I need that all components of the statusbar resize when all the main window is resized (for example the main window is maximised)
The statusbar is made with the folowing code:
timelabel = new Gtk::Label();
leftlabel = new Gtk::Label();
leftalign = new Gtk::Alignment(Gtk::ALIGN_LEFT,Gtk::ALIGN_CENTER,0.0,0.0);
rightalign = new Gtk::Alignment(Gtk::ALIGN_RIGHT,Gtk::ALIGN_CENTER,0.0,0.0);
leftalign->set_size_request(450,8);
rightalign->set_size_request(400,8);
leftalign->add(*leftlabel);
rightalign->add(*timelabel);
statusBar->pack_start(*leftalign,Gtk::PACK_EXPAND_WIDGET);
statusBar->pack_start(*rightalign,Gtk::PACK_EXPAND_WIDGET);
statusBar->set_resize_mode(Gtk::RESIZE_IMMEDIATE);
leftalign->resize_children();
rightalign->resize_children();
statusBar->resize_children();
statusBar->show_all_children();
....................................
And the main window pack all its components into a VBox :
............................
mainBox.pack_end(*(status.statusBar),Gtk::PACK_SHRINK);
Here is the result as atachement:
Thank you for your help.
Anca
Yahoo! FareChase - Search multiple travel sites in one click.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]