[prev in list] [next in list] [prev in thread] [next in thread] 

List:       gtk-app-devel
Subject:    Re: SOLVED CList vs. List
From:       Elizabeth Barham <lizzy () soggytrousers ! net>
Date:       2003-03-31 1:12:51
[Download RAW message or body]

Hi,

   I should have posted this on gtk-list; I recently subscribed to it
and most likely shall ask my general, non-specific gtk questions on
it. However, I'd like to take this opportunity to mention how I was
able to overcome my dilemma.

         Gtk::CList * med_list;

   One is able to turn off the title listing with (Gtkmm):

         med_list->column_titles_hide();

   And one can also set the minimum width which automatically stops
the horizontal scroll problem I mentioned:

         med_list->column(0).set_min_width(100);

Note, however, that there is only one column in this particular CList.

   One thing that helped is the get_optimal_width() function that
tells us what a column's ideal width is:

         int ow = med_list->column(0).get_optimal_width();

which is called after modifying the list (but before thaw()). By
taking this into account, a simple call of:

         med_list->column(0).set_width(ow);
         med_list->thaw();

made the width of the CList just the right amount and the scroll bars
work perfectly.

   Thank you,
   Elizabeth






	

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic