Re: Display simple box indicating position on mouse click?



Hey Toralf,

You can connect a callback to your signal_button_press_event that would displaying the mouse coordinates in a Gtk::MessageDialog that has no buttons added to it and with all its decorations turned off... that would make it resemble a tool tip; and, since it would have focus, you could close it when it receives the release event. Just a thought.

Bob Caryl

Toralf Lund wrote:

In one of my applications, I'd like to display the pointer position (within the widget) when a certain mouse button (I haven't decided which) is clicked, in some kind of a popup box. Any suggestions about how to achieve this? I mean, to capture the actual click and get the position, I can probably just connect to signal_button_press_event() - or possibly signal_button_release_event(), but what's the best way of actually displaying the information? Maybe I want something rather like the standard tooltips, but I don't know how to force display of those...

- Toralf

_______________________________________________
gtkmm-list mailing list
gtkmm-list gnome org
http://mail.gnome.org/mailman/listinfo/gtkmm-list





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