Re: Nbr. of visible rows in a clist?



Hi John, 

Try set_usize(x, y) based on the row height and pack it with no
expansion, not elegant, e.g. in Perl this works for me.

   $clist->set_row_height(18);
   $clist->set_usize(0, 10 * 18);
   $vbox->pack_start($clist, 0, 0, 0);

Gavin

John Schrader <john jrs-software com> writes:

> Hi,
> 
> how can I tell a Clist how many rows should be visible?
> 
> A few details:
> I am combining some widgets - one of which is a clist in a
> scrolled window - into a vbox. The list will usually contain a few
> hundred rows, and the clist widget should always have a 'window' of
> about 10 lines, with a scrollbar on the right side.
> 
> When I set homogeneous=TRUE in gtk_vbox_new, then the clist is
> expanded to the size of the biggest other widget within the vbox
> (which is about the size I want), but then other widgets are too
> big. Otherwise the clist shows only 2 rows, which is too small.
> 
> I can't find a way to set the size of the clist (or the scrolled
> window) to a fixed number of displayed rows (or fixed height).
> 
> This is gtk 1.2.7
> 
> Any hints?
> 
> 	John
> 
> -- 
> John R. Schrader
> Softwareentwicklung fuer industrielle Anwendungen
> john jrs-software com
> http://www.jrs-software.com
> 
> _______________________________________________
> gtk-list mailing list
> gtk-list gnome org
> http://mail.gnome.org/mailman/listinfo/gtk-list




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