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

Re: ListStore and cell rendering



gtk_tree_view_column_pack_start/end() is just what I was referring to
when I wrote:

> I've read that it's possible to pack multiple renderers into a
> column, but it seems to me that requires knowledge of how many
> widgets the column will hold, ahead of time.

Is this the case?  The point is, I don't know how many items each cell 
in a column could/will hold.  I want to string any number of labels 
together in a cell based on the contents of a text string (how else can 
I have different tooltips based on where in the cell the mouse is 
hovering, as requested by the end user ?).

What I'm not comprehending from the documentation is:
A) gtk_tree_view_column_pack_start/end(): this affects an entire column 
at once, does it not?  If not, how do these routines "know" which row 
within a particular column to pack the cell renderers into?

B) I told the ListStore model ahead of time what to expect in each 
column (COLUMN_STRING, COLUMN_STRING... etc) and then used 
gtk_tree_view_append_column() to add the appropriate columns to the 
TreeView object.  I successfully appended columns with single cell 
renderers to the TreeView.. but these seem to be static, pre-defined 
properties.  Can I really pack a different set of column renderers for 
different rows, as each new row is appended onto the list?

--
Ron Lockwood-Childs
VCT Labs, Inc.

David M. Cook wrote:
> On Thu, Mar 04, 2004 at 04:57:40PM -0800, Ron Lockwood-Childs wrote:
> 
> 
>> Is it possible to pack a variable number of widgets into a
>> ListStore cell?
> 
> 
> Yes, just use gtk_tree_view_column_pack_start/pack_end.  The
> terminology here is a bit confusing, because the arguments are
> renderers, which aren't widgets (in brief, the renderer "paints"
> widgets into the view column based on the current state (properties)
> of the renderer), but the analogy with packing widgets into an hbox
> holds.
> 
> Dave Cook
> 
> _______________________________________________ gtk-app-devel-list
> mailing list gtk-app-devel-list@gnome.org 
> http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list




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