Re: [gtk-list] Window Size



Brian C. Lane wrote:

>   I seem to be having a problem getting the size of my main window.
> Everything I try is returning 1x1...
>
>   I create the main window, realize it, create some hboxes and a vbox
> and
> pack them into the window, showing them after they are packed. I pack
> a
> bunch of buttons into the boxes, showing them after they are packed. I
>
> then call gdk_window_get_size( window->window, &width, &height) to get
> the
> size of the window. I get 1x1. I've also tried looking directly at
> window->allocate.width/height with the same result.
>
>   It does the same thing when I show the main window before doing the
> size
> check.
>
>   I've stepped through it with gdb, and the width/heigh never get
> changed.
> What actually updates these values? Does it wait until the main gtk
> loop
> is entered?
>
>   Arrg?!
>



Why don't you use gtkwidget_set_usize......something like that (iforgot
the actual syntax, but you can esily look it up).

>   Brian
>
> -------
> -------------------------------------------------------------------
> Nexus Computing
> http://www.tatoosh.com/nexus
> Software & Electronics for Linux
> nexus@tatoosh.com
> Inside is a chilly 69.47 F and Outside is a chilly 47.27 F
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com <
> /dev/null





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