Re: [gtk-list] CList events




On Thu, 6 Aug 1998, Jeremy Wise wrote:
> 
> I have set up a CList with only one row.  I want to be able to capture
> button presses on that item.  Previously, with CLists, I've used the
> "select_row" event to trigger my function.  That works with this, but
>

Just get a button_press_event; then in your callback look at 
event->x and event->y; CList has a function to translate those into 
a row/column. You can also look at event->button if you want to 
do different things for different buttons.

Your callback should be something like:
gint button_press_cb(GtkWidget* clist, GdkEventButton* event, 
	             gpointer data)

IIRC.

HTH,

Havoc Pennington ==== http://pobox.com/~hp




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