Re: Help wth packing
- From: Kjell Ahlstedt <kjell ahlstedt bredband net>
- To: Carlos Lopez Gonzalez <carloslopezgonzalez yahoo es>
- Cc: "gtkmm-list gnome org" <gtkmm-list gnome org>
- Subject: Re: Help wth packing
- Date: Mon, 26 Sep 2011 19:32:35 +0200
Hi Carlos,
Have you tried using Gtk::Alignment? Perhaps something like this:
// Constructor: xalign=0.5, yalign=0.0, xscale=0.0, yscale=0.0
my_alignment(0.5, 0.0, 0.0, 0.0);
my_vbox.pack_start(my_label, Gtk::PACK_SHRINK);
my_vbox.pack_start(my_toolpalette, Gtk::PACK_EXPAND_WIDGET);
my_vbox.pack_start(my_alignment, Gtk::PACK_EXPAND_WIDGET);
my_alignment.add(my_checkbox);
I don't know if the result will be exactly what you want. (I don't use
Gimp, and your reference to it is not very informative to me.) But
Gtk::Alignment gives you many possibilities.
Kjell
sön 2011-09-25 klockan 20:53 +0100 skrev Carlos Lopez Gonzalez:
> Hi,
> I want to pack three widgets vertically in this order:
> 1) Gtk::Label
> 2) Gtk::ToolPalette (width ToolItemGroups inside)
>
> 3) Gtk::CheckBox
>
>
> For that I've prepared a VBox and I've packed the three widgets like
> this:
>
>
> my_vbox.pack_start(my_label, Gtk::PACK_SHRINK);
> my_vbox.pack_start(my_toolpalette, Gtk::PACK_EXPAND_WIDGET);
> my_vbox.pack_start(my_chekbox, Gtk::PACK_SHRINK);
>
>
> Doing this, the check box is always at the bottom of the vBox
> regardless if the size of the
>
> tool palette expanded or not force it.
>
>
> I can expand the tool palette and it will fill all the remaining space
> left by the label and the check box.
>
>
> If I do this:
> my_vbox.pack_start(my_label, Gtk::PACK_SHRINK);
> my_vbox.pack_start(my_toolpalette, Gtk::PACK_SHRINK);
> my_vbox.pack_start(my_chekbox, Gtk::PACK_SHRINK);
>
>
> the check box is always after the tool palette but the tool palette
> available space is limited to the height
>
> given by the number of ToolItemGroups inserted.
>
>
> How do I pack the three widgets to make the check box always placed
> exactly after the tool palette and
>
> at the same time be able to expand the tool palette more than its
> ToolItemGroups size?
>
>
> I would like to have the same behavior than the tool options for the
> Gimp 2.6 series. The 'Brush Dynamics'
> option expands the way I want.
>
>
> Thanks!
> Carlos
> _______________________________________________
> 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]