Re: GtkCList, and insensitive GtkNotebook pages



On Tue, Oct 20, 1998 at 05:07:37PM -0400, Elliot Lee wrote:
> * I'm wanting a function gtk_clist_columns_autosize() that will calculate
> the width of all the columns contents & titles, and set the widths to fit
> the widest, and also return the total width of the clist.

Ok, auto_resize does currently not consider column titles. I can change that.
To do something like your "gtk_clist_columns_autosize", you have to call:

for (i = 0; i < clist->columns; i++)
  {
    width = gtk_clist_optimal_column_width (clist,i);
    gtk_clist_set_columns_width (clist, i, width);
    sum += width;
  }

Do you want a special function for this ? I'll add it then.

> gtk_clist_set_column_autosize() just seems to make the columns infinitely
> wide - am I misusing it? If it's not already there, would anyone mind me
> making one?

gtk_clist_set_column_auto_resize toggles the auto_resize flag of one
column. This column then automatically resizes to its optimal width
every time this width changes. ... That's what it should do. What do
you mean with "infinitely wide" ? Maybe there's a bug in the new code...

> * If there's not a way to make individual notebook pages insensitive (I
> looked, couldn't see one), could someone create this? (I have no clue how,
> sorry).

Mmmh, I think what we really need is a:

GtkWidget * gtk_notebook_nth_page (GtkNotebook *notebook, gint page_num);

Is that ok for you ?

bye,
  Lars



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