[Gtk-sharp-list] Absolute positioning using Gtk.Fixed container
jo at lumumba.uhasselt.be
Thu Aug 25 10:24:58 EDT 2005
I'm working on a generic layout management mechanism for different
widget sets, relying only on absolute positioning. For this reason, I
would like to use absolute positioning with Gtk#, and use my layout
manager to automatically set the position and size of widgets.
I really want to use absolute positioning btw. I know that's bad, but my
widget set independent layout manager will solve the resulting issues.
Absolute positioning is the only dependency of my layout manager, so
that it's possible to support widgets sets that don't provide a layout
mechanism (e.g. System.Windows.Forms).
Gtk.Fixed seems to solve some of my problems. I could embed a Gtk.Fixed
container in each other container (Gtk.Frame for example), scaled to the
size of the upper container (the Gtk.Frame in this case). Then I could
position all widgets in the Gtk.Fixed container as if they were
positioned inside the upper container.
My method requires that I can get the position of each widget at all
times. I haven't found how to do this in Gtk# though. The Gtk.Fixed
class only allows to position (or re-position) widgets, while a widget
itself has no clue about it's position. The same is needed for the size
of each widget. I have to be able to resize it, and get it's current
size. It seems SetSizeRequest and SizeRequest don't represent the same
value, one represents the minimum size and the other the preferred size
(according to the Gtk# documentation).
I was also wondering if it's possible to to only set the x and y or
width and height properties respectively?
Any help would be greatly appreciated!
Thanks in advance,
More information about the Gtk-sharp-list