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

Michael Hutchinson m.j.hutchinson at gmail.com
Tue Aug 24 12:15:14 EDT 2010


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.

-- 
Michael Hutchinson
http://mjhutchinson.com


More information about the Monodevelop-list mailing list