To: lablgtk at kaba.or.jp Subject: button_press events in drawing_area From: Christoph Bauer Date: Wed, 30 Apr 2003 20:57:47 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Hi all, my application (lablgtk2) doesn't get a button_press event. There is a drawing_area let area = GMisc.drawing_area ~width:(8*30) ~height:(8*30) ?packing () in .... and the expose event works fine. ignore( area#event#connect#expose ~callback:(s#draw)) (It draws a chess board on the drawing_area. Then I want to move the pieces.) So I added a simple test to determine how to catch the events. ignore( area#event#connect#button_press ~callback:(fun key -> print_string "bing"; print_newline (); true)) But my callback routine isn't called. Thank for help, Christoph Bauer -- proc self {} {foreach c [split [info body self] ""] d {14 -7 0 0 4 -67 4 73 11 69 24 -83 -15 6 -4 -84 78 20 11 -78 -1 -1 79 19 -8 4} { binary scan $c c c if {[catch {append r [format %c [expr $c+$d]]}]} {return $r};}};puts [self]