Re: get_window() question



On Wed, 22 Feb 2006 15:31:34 -0700, Andrew Shafer <shafer realmsys com> wrote:



I have classes derived from Gtk::Button packed inside of a VBox inside
of an EventBox.

When I call get_window() on any of the buttons, I don't get back the
Gdk::Window that encloses the button.  The window is the size of the
Vbox/EventBox.

I can see the buttons have their own X windows running xwininfo, but I
can't seem to get a hold of individual Gdk::Windows.

I'm not familiar with xwininfo but afaik a Gtk::Button does not have a
Gdk::Window, you can check this with Gtk::Widget::has_no_window().
I believe that a button has an input only window for catching events,
maybe that's what xwininfo shows.

My main question is how can I get the individual windows? And a
secondary but related question is, why does get_window() return the
parent window?

get_window() on a windowless widget returns its parents window, so
i think your solution would be to put each individual button in an
EventBox.

--
Marco





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