Re: Popup calendar windows coordinates



Tomek wrote:

Hi!
I'd like to popup a calendar widget just under button, which opens it.
The calendar widget is located in window object with no windowmanager
frame. So on the button click signal, the window->show() is triggered.

That works well, but I'd like to pass coordinates to this window to make
it appear just under the calling button. So i need button height and
width and it's top/left coordinates. How to obtain this info?

Maybe you know some application written in C++ using gtkmm/glademm, that has
this functionality done?

Regards
Teel


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


Use the Gtk::Widget::get_window() method to obtain a Glib::RefPtr<Gdk::Window> pointer to the Gdk::Window of your button widget. Then use the Gdk::Window::get_geometry() method to get top/left and height.

See the following on the get_geometry method syntax: http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGdk_1_1Window.html#a20

Bob Caryl



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