Re: Implementing gnome canvas items




> I'm trying to implement a "background item" for the canvas which is invisible,
> but catches all events on the background. I need it so I can change the
> behaviour of the normal canvas event handling (which is to catch all events,
> whether or not they are caught by an item). Unfortunatly, my new item doesn't
> catch any event. I can't figure out why. I just took the image item and stripped
> out all the rendering code... while making my new item "infinite". I'm sending
> the code in attachment. Does anyone have an idea of what I did wrong?

You need to put the item->x1,y1,x2,y2 init code in the ::update
method just after you call your parent update method, not in the
::init method.

Best wishes,
Miguel.



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