How to change cursor



Hi there, my name is Alan.

I have a custom widget and I want to change mouse cursor while it exists
on some (custom) area of my widget. So ANSI art:

+-----------------+
|  Custom widget  |
|    +------+     |
|    | area |     |
|    +------+     |
+-----------------+

I need to change cursor from "pointer (arrow)" to "hand" when mouse cursor hovers over that area.

I think, I need to capture "motion_notify_event" and check where cursor
places, but how to change cursor image? I found a "gdk_window_set_cursor"
function, but it takes "widget->window" as a parameter (not area).
I'm really sorry, but now I can't check it. Is it a right way?

Thank you.



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