开发者

Getting the mouse coordinates when ButtonPressEvent occurs

I've wrapped a drawin开发者_Go百科g area in an event box so that I can catch mouse clicks with this function:

protected virtual void OnEventbox1ButtonPressEvent (object o, Gtk.ButtonPressEventArgs args)
{
    Console.WriteLine("Clicked!");
}

How can I find out where the mouse clicked?


Usually that information is stored in the args object. I'm not terribly familiar with Gtk, but I imagine it's not too dissimilar to the .Net click event implementation.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜