Re: dialog positioning enums



On Tue, 13 Jul 2004 09:05:48 +1000, bill <billc netspace net au> wrote:
What is the best way to open a dialog window at the bottom left corner
of the parent window?

I don't think there's an enum that does this for you. 

You can position the dialog yourself: use gdk_window_get_root_origin()
to read the position  of the parent, and
parent->allocation.width/height to get the size; then use
gtk_widget_set_uposition() to hint where you'd like the dialog to
appear.

The child size won't be set until quite late on so you might need to
put the position code into realize or map. And this positioning stuff
can be a bit fragile -- some window managers may ignore your hints or
add and remove title bars and decorations in strange places, so you're
unlikely to get perfect results everywhere.

John



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