Re: Alignment of Gtk::Label texts in Gtk::Table(s)...



I think the problem is the SHRINK attribute :

http://library.gnome.org/devel/gtkmm/2.22/group__gtkmmEnums.html#gad0ae047e9bb4f262003dbb94468f5d81

Without FILL, the label stays as short as necessary and thus centered. With FILL it should use the available extra space and its inner alignment should become relevant.

yann

On 07/03/11 14:12, Glus Xof wrote:
Not runs...

     Gtk::Label l_card ("Card : ");
     Gtk::Label l_ctry ("Country Code :");
     l_idecart.set_alignment (0.0, 0.0);
     l_country.set_alignment (0.0, 0.0);

     Gtk::Table m_table (2, 2, false);

     m_table.attach (l_card, 0, 1, 0, 1, Gtk::SHRINK, Gtk::SHRINK, 5, 5);
     m_table.attach (l_ctry, 0, 1, 1, 2, Gtk::SHRINK, Gtk::SHRINK, 5, 5);

l_card&  l_ctry texts appear centered...

Glus

2011/3/7 Yann Leydier<yann leydier info>:
Hi,

perhaps set_alignment() (inherited by Label from Misc) will do the trick…

yann

On 07/03/11 13:32, Glus Xof wrote:

Hi,

(simple question... I think...)

Is there any way to control the alignment of Gtk::Label(s) text when
they are attached in a Gtk::Table ?

By default, they are aligned centered, and Gtk::Alignment seems not
work...

Glus
_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list



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