[Gtk-sharp-list] Manual layout in GtkSharp
Fri, 29 Oct 2004 16:53:05 -0700
On Fri, 2004-10-29 at 23:40 +0000, george moudry wrote:
> I am interested in having a visual designer within VisualStudio, which could
> allow similar design tasks as Glade -
> I would like a novice user to be able to paste a button into a Gtk form and
> double-click to write the 'Click' function (but without adding hboxes and
> When searching through this list, I came across Miguel's post
> where he says:
> >The first thing to keep in mind is that the use of absolute positioning on
> >a form is not recommended when using Gtk.
> >The problem arises when a user changes his font, or is using the
> >application in another country. For example the common "Ok" button would
> >become "Aceptar" in spanish. So any absolute positioning is considered a
> >bad idea.
> Agreeing that absolute layout has its problems, I still want to experiment
> with it.
> Miguel seems to say that 'it is not recommended' - implying that it is
> possible - can anyone show me how?
> I tried C# code such as:
> Gtk.Button btn = new Button();
> btn.Label = "Button1";
> But the button occupies the entire GtkForm ...
> Any ideas?
> George Moudry, Los Angeles
Look at Gtk.Layout.
Basically you would create a Gtk.Layout and add that to your window,
then add your button to the layout.
Note, i am *pretty* sure that is how it works, ive never tried, Absolute
positioning is dead as far as im concerned.