Re: Newspaper-column list?



On Wed, 2008-02-06 at 11:23 +0000, Colin Watson wrote:
> Hi,
> 
> I have an application with a rather long list currently rendered as a
> GtkTreeView within a GtkScrolledWindow. (For context, it's a list of
> languages supported by an OS installer.) I have had user requests for
> this to be rendered as a newspaper-column list instead, since the number
> of items in the list is such that it should easily fit on one screen
> that way and save users from having to scroll to find their language. In
> other words, I'd like it to look something like this:
> 
>   Item 1    Item 6    Item 11
>   Item 2    Item 7    Item 12
>   Item 3    Item 8    Item 13
>   Item 4    Item 9    Item 14
>   Item 5    Item 10   Item 15
> 
> As far as I can see there's no support for this in GTK. I could probably
> do it with a custom GtkTreeView that figures out how many rows will be
> visible and does some appropriate balancing of columns, but I suspect
> there will be plenty of gotchas involved. Google has been of no help, so
> before diving in and trying to do it myself I thought I'd ask: does
> anyone have sample code that does this already?

I have a container like this in Glom for Glom's details view. It's a
horribly implemented horrible hack (and C++) but it kind of works:
http://svn.gnome.org/viewvc/glom/trunk/glom/utility_widgets/flowtable.h?view=markup

Googling just found me this C# widget which seems very similar, though
it wraps items in rows inside columns rather than just rows in columns:
http://www.medsphere.org/projects/widgets/wiki/FBox


I asked about it before and was told that it needs Height-For-Width
layout to do properly, which makes sense. Height-For-Width (or Natural
Size) seems to be close to going into GTK+.
http://mail.gnome.org/archives/gtk-devel-list/2004-April/msg00233.html

Luckily Mathias Hasselman (who is doing the height-for-width stuff)
works for Openismus now so maybe he'll do a proper container for us in
future.

-- 
murrayc murrayc com
www.murrayc.com
www.openismus.com
> 



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