Re: Gtk::Bin::set_justify(Left)??



Hi ArbolOne,

On Tue, 09 Nov 2010 11:52:37 -0500 you wrote:
> 
> //Left Label and properties
> lblIntTxt = Gtk::manage(new Gtk::Label());
>      lblIntTxt->set_text("int");
>      lblIntTxt->set_justify(Gtk::JUSTIFY_LEFT);
>      lblIntTxt->set_alignment(Gtk::ALIGN_LEFT,Gtk::ALIGN_LEFT);
>      lblIntTxt->property_xalign() = 0.0f;
> 
> //Attach Left Label to the Table and pack it
>      tblTable->attach(*lblIntTxt, 0,1,0,1,Gtk::EXPAND,Gtk::EXPAND,0,0);
>      vbBase->pack_start(*tblTable);

So you're expanding (meaning that the widget "nominally" occupies the whole cell) but you're not filling. Try using

>      tblTable->attach(*lblIntTxt, 0,1,0,1,Gtk::EXPAND|Gtk::FILL,Gtk::EXPAND,0,0);

or actually, since it's the default, you could use

>      tblTable->attach(*lblIntTxt, 0,1,0,1);

Rob


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