Re: scrollable gtk_table with header
- From: Rob Alblas <ralblas aimcom nl>
- To: Tristan Van Berkom <tvb gnome org>
- Cc: gtk-list gnome org
- Subject: Re: scrollable gtk_table with header
- Date: Fri, 08 Aug 2008 17:48:40 +0200
Uh...,
No, sorry, I ment treeview.
mail I got:
(-----mail start------)
if you intend to create your table with treeview, then you already
have title row at the top. And if you put your treeview inside
scrolled window, the column headers remain fixed at the top.
If you don't need your column headers to be buttons, you can replace
them with desired widget by calling gtk_tree_view_column_set_widget()
(http://library.gnome.org/devel/gtk/stable/GtkTreeViewColumn.html#gtk-tree-view-column-set-widget).
(-----mail end------)
That's basically the same as the second suggestion of you.
Thanks,
Rob.
Tristan Van Berkom wrote:
> If you are refering to this:
> http://library.gnome.org/devel/gtk/stable/GtkTree.html,
> I would strongly advise against it, if you want the labels to follow the columns
> just do it this way:
>
> container { vbox { hbox { labels... }, scrolledwindow { table } } }
>
> And then use GtkSizeGroup to make the labels size to the widgets in
> the columns of the first row (you might do fancy stuff like give them
> shadow-in/out edges using viewports and alignments...).
>
> Note, if you are manipulating a potentially large dataset (arbitrary number
> of rows in your table ?), then I strongly suggest biting the bullet and using
> a treeview, treeview will allocate minimal resources for the task, while
> allocated offscreen widgets still cost memory.
>
> Why I strongly suggest you dont use GtkTree is because its long gone
> deprecated, unsupported and wont be available in 3.0.
>
> Cheers,
> -Tristan
>
>
> On Fri, Aug 8, 2008 at 3:32 AM, Rob Alblas <ralblas aimvalley nl> wrote:
>
>> Tristan Van Berkom wrote:
>>
>>> On Thu, Aug 7, 2008 at 6:06 AM, Rob Alblas <ralblas aimcom nl> wrote:
>>>
>>>
>>>> Hi,
>>>> Is it possible to define a scrollable table, where the first row (acting
>>>> as header) is fixed, i.e., is not part of the vertical scrollable part?
>>>>
>>>>
>>> yes, youll be using a layout like this:
>>>
>>> container { vbox { header label, scrolledwindow { table } } }
>>>
>>>
>>>
>> I don't think this is the solution. The header should be part of the
>> table column; i.e, it should contain per-column text.
>> Got another solution (not replied to the list) which should work: using
>> gtk_tree to make a table instead of gtk_table.
>>
>> Thanks anyway,
>> Rob.
>>
>> --
>> This message has been scanned for viruses and is believed to be clean
>>
>>
>>
>
>
--
This message has been scanned for viruses and is believed to be clean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]