Re: SOLVED CList vs. List



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






        




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