Re: need spacer



hi;

On Wed, 2006-12-13 at 19:11 +0700, beast wrote:
I would like to have 10px space between next and cancel.

[ back ] [ next ]       [cancel]

however, this following code gives more spaces than what I need. I think 
its due to homogeneous settings.

my $hbbox = Gtk2::HButtonBox->new();
$hbbox->set_layout("end");
$hbbox->set_spacing(2);
$hbbox->set_homogeneous(FALSE);

my $spacer = Gtk2::Label->new();
$spacer->set_size_request(0,8);

$hbbox->add($back);
$hbbox->add($next);
$hbbox->add($spacer);
$hbbox->add($cancel);

drop the button box and use a Gtk2::Alignment:

 Gtk2::HBox
 +---- Gtk2::Button [back]
 +---- Gtk2::Button [next]
 +---- Gtk2::Alignment
       +---- Gtk2::Button [cancel]

set the alignment to full right and add a padding of 10 px on the left;
this should solve your problem.

ciao,
 Emmanuele.

-- 
Emmanuele Bassi,  E: ebassi gmail com
W: http://www.emmanuelebassi.net
B: http://log.emmanuelebassi.net




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