1 Feb 2007 22:27
DrawingArea that listens to mouse click signals?
<jim <at> droog.sdf-eu.org>
2007-02-01 21:27:12 GMT
2007-02-01 21:27:12 GMT
Hi, I'm new to Gtk2hs & GUI programming in haskell generally...I have a DrawingArea canvas that displays a piece in a board game & which I want to be something the user can click on (when I will draw it with rotation) or drag and drop. I started out with the `drawing' demo and am customising it...I can get the DrawingArea object to listen to mouse motion events (onEnter) but not clicks - is it only Buttons that can have an onClicked handler? How then to respond to mouse clicks? I then tried to use buttonSetImage to draw the canvas onto a button, but this didn't seem to work. Is there any demo/sample code I could look at for this? Many thanks. jim <at> sdf-eu.org SDF-EU Public Access UNIX System - http://sdf-eu.org ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier. Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
Duncan
RSS Feed