Re: Signal when clicking on canva



On Mon, 2010-05-03 at 23:41 +0200, Baptiste Lafontaine wrote:
> Hello,
> 
> I'm looking for a code to draw rectangle on a canvas when a user do a
> "drag'n'drop".
> What I am looking for : The user clic on canvas, and when he release a
> rectangle is drawn.
> 
> Is it possible with goocanvas ?

Yes, that sounds fairly easy. Connect to the "button-release-event"
signal of the root item (see goo_canvas_get_root_item()) and create a
new GooCanvasRect item at the given coordinates.

Damon



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