programatically resizing a scrolledwindow/viewport
- From: "Karl H. Beckers" <karl h beckers gmx net>
- To: gtk-app-devel-list gnome org
- Subject: programatically resizing a scrolledwindow/viewport
- Date: Mon, 04 Oct 2004 16:45:55 +0200
Hi all,
in a dialog window I'm trying to have a number of widgets (each
represents an error) in a vbox which is contained in a scrolledwindow
and a viewport. When I request a minimum width for the error widgets the
viewport nicely calculates its width to the error widget's width and
thus displays it without need to scroll.
This does not happen quite as nicely for height, though.
I always get a default height of smth. like 60 or so which isn't even
enough for one error widget (at a width of a couple of hundreds).
Now, my desired behaviour would be: If the size of all combined error
widgets is less than some sensible number (e.g. 400) make the viewport
exactly as large. If it exceeds this value set it to the maximum and scroll.
I don't get real values for the vbox's height until I show the dialog.
This is inconvenient because if I resize the viewport from 60 to 400
after the window has been positioned, it's probably going to grow out of
the lower end of the screen.
A workaround might be to first set the viewport's size to the maximum
value, thus causing the dialog to be positioned alright for a worst case
and making the viewport smaller after showing the window. However,
nothing I try seems to be able to make the scrolledwindow/viewport
smaller again.
Any hints?
Or do I have to go with a static viewport size?
TIA,
Karl.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]