Re: GtkCList - how to find which cell was clicked?



Dear Oliver!

> I would like to have my application respond to a right-click in any
> particular cell of a GtkCList by displaying further data about that cell's
> contents.  I am responding to a button-press event and seeing if it was the
> right-button that was pressed.
> 
> At present, I can't see how to discover which cell the mouse pointer is in
> when the button-press event occurred.

You are listening for clicks in the CList, right? If you place something
in each cell that can itself create signals (almost anything: you probably
have it in already, unless you're using only Labels in the CList), then
you can attach a listener (the same listener) to each of those. 

I hope I'm right, good luck. It's certainly better than checking for the
(x,y) position, isn't it?

All the best, Mark





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