Re: geometry calculation delayed until ... when?



On Mon, Jul 29, 2002 at 10:10:01AM +0100, Axel Simon wrote:
On Sun, Jul 28, 2002 at 07:05:34PM -0700, Frank Cusack wrote:

BTW,

    show_all(box) ;
    [ get geometry, calculcate new position ]
    set_position(box, POS_NONE);
    set_uposition(box, x, y);
    show_all(box)

does display the widget and then you see it move.

There must be another way. Have you consulted
gtk+-2.0.5/docs/sizing-test.txt
in the source code directory?

I'm using gtk+-1.2.10, which does not contain that file.  But that file
seems to suggest that I could realize() the window first.  Which I didn't
have good luck with.

Anyway, just moving the set_position() call before show_all() works
(show_all() also forces realization).  I guess setting POS_NONE and
having no x,y position set means the window isn't drawn.  (The code before
this doesn't bother to set the x,y position since it uses POS_CENTER.)

/fc




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