Re: Getting parent Gtk::window
- From: Murray Cumming <murrayc murrayc com>
- To: Pedro Sousa <pasousa ml gmail com>
- Cc: gtkmm-list gnome org
- Subject: Re: Getting parent Gtk::window
- Date: Thu, 15 Jan 2009 17:32:34 +0100
On Thu, 2009-01-15 at 16:04 +0000, Pedro Sousa wrote:
> Hi to all,
>
> I can't find information how to get a pointer to a widget parent
> Gtk::Window. I know that the method "get_parent_window" return the a
> Glib::RefPtr<Gdk::Window>,
Note that get_parent() returns a Gtk::Widget (actually a Gtk::Container)
rather than a Gdk::Widget.
> but this isn't useful because I can't use it
> with the method "set_transient_for" for a local Gtk::Dialog.
> Another task I need to perform with the parent window pointer is to
> enable or disable the sensitivity of the parent window.
[snip]
I think you want Gtk::Widget::get_toplevel(). Just dynamic_cast thre
result to a Gtk::Window*:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGtk_1_1Widget.html#c92a0dc8751c828406ca8755f013b75c
--
murrayc murrayc com
www.murrayc.com
www.openismus.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]