Re: Specialized TreeView.
- From: Tristan Van Berkom <tristan van berkom gmail com>
- To: Harring Figueiredo <harringf yahoo com>
- Cc: GTK app-devel <gtk-app-devel-list gnome org>
- Subject: Re: Specialized TreeView.
- Date: Thu, 6 Jan 2005 11:54:04 -0500
On Wed, 5 Jan 2005 17:18:37 -0800 (PST), Harring Figueiredo
[...]
Hmm,
After reading the tutorial I have a much better idea about how
treeviews work, but still I'm a little insecure; this is what I think
I should do to achieve my goal:
- Create a GtkTreeStore with, lets say 5 columns; each of G_TYPE_STRING
- Write a custom cell renderer that draws something different depending on
what string was passed:
"pixbuf: ...location"
"string: string to write"
So one row could look like:
"pixbuf: jacketfile", "string: AC/DC bla \n bla bla", "string: 1/10", "", ""
And its child row could look like:
"string: AC/DC featured albums", "pixbuf: album1", "pixbuf: album2",
"pixbuf: album3", ""
While they would all be columns of the same "type" (G_TYPE_STRING), the
custom cell renderer will treat it differently because of the string content.
If the treeview is "fixed_height_mode" FALSE, then the slim "song title" rows
wont get expanded to fit the heigh of the ultra sized "featured albums" rows
What kind of impact will this have on the width ?
I noticed there is no "fixed_width_mode" on treeviews, does this mean that
I'm stuck with a fixed column width across rows ?
If thats the case, does it make sence to write it with one column of type
G_TYPE_STRING and a custom cell renderer that parses a string which
represents the entire row ?
Cheers,
-Tristan
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]