Hello,
I would like to "auto-resize" the column on demand. I'll be using a
combination of gtk_clist_optimal_column_width (to get the width of my
column) and gtk_clist_set_column_width (to set it).
I want to have this feature working like on most spreadshits :
double-clicking on the line separating 2 columns will auto-resize the left
column.
I didn't find any relevant signal to bind this feature to. I've looked in
the gtk_clist.c source file and it seems that they are using internal
properties of the clist to do the job and binding the signal button_press.
In the source they do something like that : in the button_press callback
for (i = 0; i < clist->columns; i++)
if (clist->column[i].resizeable && clist->column[i].window &&
event->window == clist->column[i].window)
So they are testing for each column if it is resizeable AND if it has its
own gdk_window set AND if the gdk_window involved in the event is the same
as the column one. I can do the same test on a customized button_press event
callback that I will attached to my clist widget instance, and do the trick.
But I find it unsafe because I'm using internal data. Do you know of any
better way?
I hope I've been clear enough. I'm sorry for my english and if you don't
understand you can always ask me to say it again differently :-)
Thank you in advance for any help,
Best regards,
---
Jean-Christophe Berthon
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list