Re: [gtkmm] No spacing for empty pixbufs in a TreeViewColumn



> Hi,
>
> I'm trying to create a TreeView with two CellRenderers packed into one
> TreeViewColumn. My intention is to make the pixbuf CellRenderer not take
> up any space when the model's data is 0, like in the following example:
>
>              Gtk::TreeModelColumn<Glib::ustring>              col_label;
>              Gtk::TreeModelColumn<Glib::RefPtr<Gdk::Pixbuf> > col_pixbuf;
>              Glib::RefPtr<Gtk::TreeStore>                     treestore;
>
>      Gtk::TreeView::Column* column = new Gtk::TreeView::Column ("");
>
>      Gtk::CellRendererText* label_renderer = new Gtk::CellRendererText;
>      column->pack_start (col_pixbuf, false);
>      column->pack_start (*manage (label_renderer), false);

Doesn't it make _any_ difference when you use false instead of true for
that "expand" argument?

If we don't figure it out here then you know who to ask - gtk-list gnome org 

>
>      column->add_attribute(label_renderer->property_text (), col_label);
>      label_renderer->property_xalign () = 0;
>
>      append_column(*manage (column));
>
> However, labels are still aligned to the pixbuf if the pixbuf is empty,
> like in the following screenshot:
> http://cactus.rulez.org/files/treeview-align.png
>
> So how do I make empty CellRendererPixbufs not take up any space?
>
> Thanks,
>  	Gergo
>
> --
>     .--= ULLA! =---------------------.   `We are not here to give users
> what
>     \     http://cactus.rulez.org     \   they want'  -- RMS, at GUADEC
> 2001
>      `---= cactus cactus rulez org =---'
> 'Criminal Lawyer' is a redundancy.
> _______________________________________________
> 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]