[MonoDevelop] 2 widgets in the same container using form designer?

Adam Tauno Williams awilliam at whitemice.org
Mon Aug 30 08:39:06 EDT 2010


On Wed, 2010-08-25 at 13:27 +0200, Rampage wrote:
> Michael Hutchinson ha scritto:
> > On Tue, Aug 24, 2010 at 6:55 AM, Anirudh <anirudh at anirudhsanjeev.org> wrote:
> >>>>> i think the subject pretty explains it all, i was wondering if by using
> >>>>> the
> >>>>> designer it was possible to add 2 widgets in the same container and then
> >>>>> from the source of my application manage the display of one or the other
> >>>>> using the show() and hide() methos.        
> >> I used to use a VBox or a HBox and drag many widgets. Then Use the
> >> visible property to swap between them. Of course, this isn't a correct
> >> way to do it, but it's a rough hack.
> >> I'd done a similar variation in some older code, which you can see here:
> >> http://github.com/ninjagod/splatter/blob/master/Frontend/AddQueryDialog.cs#L144
> > Another reasonably common solution to this is to use a Notebook with
> > the tabs disabled, then programmatically change the page.
> Seems to be the cleanest way.... i like it, i'm gonna try this out
> thank you very much to everyone for the help :)

I use that trick all the time.  Although an hbox/vbox would expected to
work the same way when I hide/show to swap the widget pair sizing
doesn't seem to work as well as when they are in a Notebook.



More information about the Monodevelop-list mailing list