[Mono-list] help!!!
Michael Hutchinson
m.j.hutchinson at gmail.com
Sun Mar 29 01:46:16 EDT 2009
2009/3/27 Aric Holland <aricholland2003 at gmail.com>:
> Hello,
>
> I am new to mono. I was trying to write an software project in C#, but my
> project is GUI based, so I have to rely on mono's gui designer. Well you see
> the problem is, the grid container control, which I add to my form does not
> allow me to precisely align my controls to the grid. I don't know what im
> doing wrong, but it's quite annoying. I'm basically looking for a grid
> system comparable to Visual Studio's.
GTK# has a fixed layut container, called Gtk.Fixed, that allows you to
align your controls on a grid, with pixel-exact sizes and positions.
However, MonoDevelop's GTK# designer doesn't support using this fixed
layout, because fixed layout is strongly discouraged in GTK.
The reason is simple -- GTK supports container layout, which is far
superior. It means that if the user resizes the window, the controls
will resize to use the available space. If the system font size
changes, making all text bigger, or if you translate your app and the
translated labels are a different length, the layout will adjust.
> Also, when I resize my forms in the GUI Designer, and run the compiled
> result. Guess what? The dimensions of what are set in the gui designer, DO
> NOT match the actual compiled result. Leaving me in complete fusturation.
Again, unless you're using "fixed" layout, expect GTK# to adjust
controls to make use of available space. Controls "request" the size
they want, but the container may give them more (or less) space if
it's available. (or not).
http://www.mono-project.com/GtkSharp:_Widget_Layout_and_Packing will
introduce you to GTK container-based layout.
--
Michael Hutchinson
http://mjhutchinson.com
More information about the Mono-list
mailing list