Re: Mouse position in custom cellrenderer



On Tue, Apr 7, 2009 at 5:18 PM, Dirk Vanden Boer <dirk vdb gmail com> wrote:
> Hi,
>
> Is it possible to obtain mouse movement events in my custom
> cellrenderer? Currently the render function of the cellrenderer gets
> called when the mouse enters or exits a cell, but I would like to
> repaint my cell based on the location of the mouse pointer. Can it be
> done?
>
I managed to do it by inheriting from Gtk::treeview, calling
add_events(Gdk::POINTER_MOTION_MASK) on the treeview and then
overriding the on_event method. There you can store the mouse pointers
and call queue_draw_area to repaint the part of a cell based on the
mouse location.

Best Regards,
Dirk


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