Re: getting real widget sizes how and when



Tristan Van Berkom wrote:

Karl H. Beckers wrote:

Hi all,


Hi,
     I'm afraid I havent the time to try and deciepher your
email, I can see that your having trouble getting the allocated
size of your widgets in a viewport.

There is a good chance that a widget will never get an allocation
untill its actualy shown. I'm not very familliar with the
GtkViewport but its the parenting container's responsability to
give the child an allocation (at initialization and resizes etc).

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.

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?

Karl.




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