Re: getting real widget sizes how and when



Karl H. Beckers wrote:
[...]
So maybe the solution to your problem is: "Widgets in an area of a
GtkViewport that is not shown (i.e. not in part of the scrolled window)
/dont have a size/".

Well, I've realized that and AM doing a gtk_widget_show before attempting to get the sizes.
But the dialog does not seem to be rendered immediately.

I anticipated that misunderstanding and still managed to not
get across properly, when I say "shown" I really mean "shown",
not flagged with GTK_WIDGET_VISIBLE flag via the gtk_widget_show()
api :)

The viewport probably doesn't care about allocating any space for
a child widget that is not in the viewing area, regardless of
that widget's visibility flag.

Ooops ... just thought of smth....
What I'm doing is check parameters for an app and pop up a modal warning dialog if smth. is wrong. Now, atm I'm doing this before I start the main loop .... does that sound like an explanation?

Yes,
   "configure-event" should work for you, its emitted for resizes in
general, but I believe there is an initial configure-event fired
at allocation time.

Cheers,
                           -Tristan



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