Re: Can a treeview do this?
I may not have explained myself very well in my question to the world. To describe it in words, I want: (1) the first child to be in the column next to the parent. (2) subsequent children to be below the first child (3) parent cells are to vertically span the child rows (4) I need visible borders between the cells (5) Just to be difficult, I want to code in csharp (mono and friends) (6) Accommodate thousands of rows with responsive performance. Kim On Mon, 2006-02-27 at 20:56 +1000, kadil wrote: I don't think a treeview can render this tree structured data that way I wanted. The way I want it and the type of data is shown below: | Function | Funct Failure| Failure Mode | |to be able |slow leak | worn washer | |control the| |-| |rate of fl-| | damaged seat| |uid passing|--|-| |thru the |unable to control | seized | |device |flow at all |-| | | | frozen | || Any ideas, comments warmly received. Kim ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Can a treeview do this?
kadil wrote: I may not have explained myself very well in my question to the world. To describe it in words, I want: (1) the first child to be in the column next to the parent. (2) subsequent children to be below the first child (3) parent cells are to vertically span the child rows (4) I need visible borders between the cells (5) Just to be difficult, I want to code in csharp (mono and friends) (6) Accommodate thousands of rows with responsive performance. | Function | Funct Failure| Failure Mode | |to be able |slow leak | worn washer | |control the| |-| |rate of fl-| | damaged seat| |uid passing|--|-| |thru the |unable to control | seized | |device |flow at all |-| | | | frozen | || I think your sketch is quite clear. Your demands 1 to 4 can be fulfilled by using a GtkTable with GtkLabels inside GtkFrames in each cell, as I described. I don't know about late developments in GTK+ bindings for C# but I think there should be support for it. At least this is being worked on, AFAIK. As I prefer easiness over difficulty and native performance over losings related to emulation, I stick with C when programming GTK+. Only weak point in the GtkTable based concept may be your demand of much content in the table. However, I'd say you should give it a try. I think building such a structure of thousands of widgets is the main performance bottleneck. Display and navigation within such a GtkScrolledWindow isn't necessarily that slow since GTK+ 2.x should contain some appropriate optimizations to handle this, I think. ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Can a treeview do this?
Gus Koppel wrote: kadil wrote: [...] (1) the first child to be in the column next to the parent. (2) subsequent children to be below the first child (3) parent cells are to vertically span the child rows (4) I need visible borders between the cells (5) Just to be difficult, I want to code in csharp (mono and friends) (6) Accommodate thousands of rows with responsive performance. | Function | Funct Failure| Failure Mode | |to be able |slow leak | worn washer | |control the| |-| |rate of fl-| | damaged seat| |uid passing|--|-| |thru the |unable to control | seized | |device |flow at all |-| | | | frozen | || [...] Only weak point in the GtkTable based concept may be your demand of much content in the table. However, I'd say you should give it a try. I think building such a structure of thousands of widgets is the main performance bottleneck. Display and navigation within such a GtkScrolledWindow isn't necessarily that slow since GTK+ 2.x should contain some appropriate optimizations to handle this, I think. To allocate multiple widgets for every single entry in a dataset of over 1000 entries doesnt make sence to me, putting a huge GtkTable into a scrolled window is one thing, and probably scrolls fine (unless you're already swapping out...); having enough memory to allocate all those widgets is another (remember also that GTK will not politely tell you that your dataset is too large... it will call abort() in the OOM condition) (3) parent cells are to vertically span the child rows This is something that treeviews IFAICS dont do... I remember having similar requirements (I wanted to put one bigger row with jpeg and more information than other rows... only for some highlighted data, and figured out a way I could do so with a custom cell-renderer), we ended up exploring other avenues because we didnt have time to write cell renderer implementations (it would've been doable and clean though). Maybe you could write a custom treeview implementation to use with GtkTreeStore (seems you would only have to place your cells differently than treeview does); but then... i dont know about doing that in Gtk#. What I've seen a few apps do for this kind of situation, if I understand the situation right; is they put one simplified treeview intended only to display some row-data to select, and then put some complex GtkTable below it filled with buttons, entries and labels, fill it with the selected row data. Cheers, -Tristan ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Can a treeview do this?
Tristan Van Berkom [EMAIL PROTECTED] wrote: Maybe you could write a custom treeview implementation to use with GtkTreeStore (seems you would only have to place your cells differently than treeview does); but then... i dont know about doing that in Gtk#. The custom treeview implementation seems to be the correct approach. Treestore is ideal to store the data, but a treeview objectives are different from my spec. (Treeview does an excellent job for what it is intended. I have done trials of putting thoudands of rows into a store and performance is excellent.) I should get the treeview.c code out and start hacking away. Kim ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Can a treeview do this?
On Thu, 2006-03-02 at 13:43 +1100, [EMAIL PROTECTED] wrote: Tristan Van Berkom [EMAIL PROTECTED] wrote: Maybe you could write a custom treeview implementation to use with GtkTreeStore (seems you would only have to place your cells differently than treeview does); but then... i dont know about doing that in Gtk#. The custom treeview implementation seems to be the correct approach. Treestore is ideal to store the data, but a treeview objectives are different from my spec. (Treeview does an excellent job for what it is intended. I have done trials of putting thoudands of rows into a store and performance is excellent.) I should get the treeview.c code out and start hacking away. Kim ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list gtksheet from gtk extra looks promising. Don't know about getting it to work with csharp? ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Can a treeview do this?
I don't think a treeview can render this tree structured data that way I wanted. The way I want it and the type of data is shown below: | Function | Funct Failure| Failure Mode | |to be able |slow leak | worn washer | |control the| |-| |rate of fl-| | damaged seat| |uid passing|--|-| |thru the |unable to control | seized | |device |flow at all |-| | | | frozen | || Any ideas, comments warmly received. Kim ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Can a treeview do this?
kadil wrote: I don't think a treeview can render this tree structured data that way I wanted. The way I want it and the type of data is shown below: | Function | Funct Failure| Failure Mode | |to be able |slow leak | worn washer | |control the| |-| |rate of fl-| | damaged seat| |uid passing|--|-| |thru the |unable to control | seized | |device |flow at all |-| | | | frozen | || Any ideas, comments warmly received. No, I don't think a GtkTreeview can display this sort of structure. However, this sort of layout can perfectly be achieved by utilizing a GtkTable (instead of GtkTreeview). The Row Span property of cell widgets in a GtkTable is to be set here. It's the very same as in HTML 4 tables, for instance. By doing this you're also not limited to simple drawn items like texts or bitmaps in the cells but can easily put any widget into them, i.e. buttons. To get closest to the appearance you sketched I suggest to use a GtkLabel in a GtkFrame for each cell. Main drawback is that if you're about to use more than 50 rows like this via a GtkTable, some performance degradation may start to take place. But for structures with limited numbers of cells this is negligible. Btw, GtkTable should be put into a GtkScrolledWindow, to handle the situation when there are more rows (or columns) to be displayed than the window dimensions allow - offer scrollbars in that case. It's the same way original GtkTreeViews work. I already created an example of your desired layout type but I'm afraid its Glade XML or .c code is a bit too long to include here (~10 KB). ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
Re: Can a treeview do this?
On Mon, 2006-02-27 at 16:29 +0100, Gus Koppel wrote: kadil wrote: I don't think a treeview can render this tree structured data that way I wanted. The way I want it and the type of data is shown below: | Function | Funct Failure| Failure Mode | |to be able |slow leak | worn washer | |control the| |-| |rate of fl-| | damaged seat| |uid passing|--|-| |thru the |unable to control | seized | |device |flow at all |-| | | | frozen | || Any ideas, comments warmly received. No, I don't think a GtkTreeview can display this sort of structure. However, this sort of layout can perfectly be achieved by utilizing a GtkTable (instead of GtkTreeview). The Row Span property of cell widgets in a GtkTable is to be set here. It's the very same as in HTML 4 tables, for instance. By doing this you're also not limited to simple drawn items like texts or bitmaps in the cells but can easily put any widget into them, i.e. buttons. To get closest to the appearance you sketched I suggest to use a GtkLabel in a GtkFrame for each cell. Main drawback is that if you're about to use more than 50 rows like this via a GtkTable, some performance degradation may start to take place. But for structures with limited numbers of cells this is negligible. Btw, GtkTable should be put into a GtkScrolledWindow, to handle the situation when there are more rows (or columns) to be displayed than the window dimensions allow - offer scrollbars in that case. It's the same way original GtkTreeViews work. I already created an example of your desired layout type but I'm afraid its Glade XML or .c code is a bit too long to include here (~10 KB). ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list Thanks Gus. I am looking at thousands of rows, so I might have to do something a bit more complicated. Maybe mapping this data to a gtktable dynamically to reduce the overheads. Kim ___ gtk-app-devel-list mailing list gtk-app-devel-list@gnome.org http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list