DrawingArea - allocating needed space
- From: Piotr Zurek <p zurek gmail com>
- To: gtk-sharp-list lists ximian com, gtk-list gnome org
- Subject: DrawingArea - allocating needed space
- Date: Fri, 10 Nov 2006 19:59:51 +1300
First of all, sorry for crossposting, but slowly losing hope for getting
any answer from gtk-sharp-list. Maybe someone will prove me wrong...
Anyway, I need a word of advice on using DrawingArea.
In my application the user is supposed to draw all elements in all
directions around one central element. Let's say that I start with an
empty drawing and I draw the first element in the center of the area
allocated for the my drawing. The application automatically places all
elements so that they do not overlap. Sooner or later the user hits a
point where the allocated area is not enough. I have to allocate some
more space. It's not a problem if it grows to the right or down - I can
use SetSizeRequest to grow it. But what if it has to grow to the left or
up? Do I have to move the the central element from the initial position
evey time I need to make some more space for elements above or on the
left? I think I could probably do it that way but maybe somehow I can
use the SizeAllocate (or something else) and use negative values for my
I hope I described it clear enough but if not, please let me know.
] [Thread Prev