On 11/26/05, Stefan Kost <[EMAIL PROTECTED]> wrote:
> >>Therefore the scrollable windows is needed if the height of the
> >>window would exceed the screen height. Anyway if it does not,
> >>I'd prefer to make the window as tall as possible to show the
> >>entries without needing to scroll.
> >>
> >>I am not be able to achive this yet.
> >
> >
> > I suppose gtk_window_maximize () doesn't match your notion of "make the
> > window as tall as possible"?
>
> No, I want as tall as needed to display content without scrolling.
I think I know what you mean, I have a scrolled area in a game I'm making.
I attached the whole function of what I did, but the short form is:
....
scroll=gtk_scrolled_window_new (NULL, NULL);
wind = gtk_window_new (GTK_WINDOW_TOPLEVEL);
pwind = gtk_window_new (GTK_WINDOW_TOPLEVEL);
widg = gtk_drawing_area_new();
....
gtk_widget_set_size_request(scroll,
                        24*board_game::scale+50,14*board_game::scale);
....
gtk_widget_show_all(wind);
gtk_widget_show_all(pwind);
gtk_widget_set_size_request(scroll,
                        10*board_game::scale,5*board_game::scale);

Create the widgets, pack up set initial size requests, then after I
show the toplevel windows I set the size request to something smaller
so the user can shrink the window if he wants to.

http://developer.gnome.org/doc/API/2.0/gtk/GtkWidget.html#gtk-widget-set-size-request
also mentions that for windows you can use
http://developer.gnome.org/doc/API/2.0/gtk/GtkWindow.html#gtk-window-set-default-size
..

http://developer.gnome.org/doc/API/2.0/gtk/GtkWindow.html#gtk-window-set-geometry-hints
and
http://developer.gnome.org/doc/API/2.0/gdk/gdk-Windows.html#gdk-window-set-geometry-hints
might be the more powerful things to call though.

--
http://dmoz.org/profiles/pollei.html
http://sourceforge.net/users/stephen_pollei/
http://www.orkut.com/Profile.aspx?uid=2455954990164098214
http://stephen_pollei.home.comcast.net/
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to