Problem adding Tab control to a form

R

Richard Muller

Hi All,


NOTE: This is a cross-post. If you're willing to respond, please visit the
microsoft.public.dotnet.languages.csharp newsgroup for my post with the same
title. Thanks.

I'm running MSDE 2002, ver. 7.0.9466 with Net Framework 1.0, ver. 1.0.3705
over Win2000ProSP4.

I created a new Visual C# project using the Windows Application template.

I'm trying to create a form (or dialog, I don't care which, for the moment)
which has a vertical splitter with the left half containing a few tabbed
pages and the right half a Rich Text Edit control.

I added a Panel and docked it to the left and added the TabControl to the
panel, along with a couple of tabs. I added a Splitter, which was generated
to right of the panel. I added the Rich Text Edit control to the right of
the splitter and gave it Fill docking.

That worked pretty well except that the tab control did not occupy the full
panel: it was docked to the lower right corner of the panel.

How can I correct this? Are there some patches I should be adding to my
configuration?

--
TIA,
Richard

640K ought to be enough for anybody.
Bill Gates, 1981
 
J

John Elliot

Hi Richard,

I don't subscribe to microsoft.public.dotnet.languages.csharp so I'll just
answer on this group.

To fix your problem you should dock your TabControl to Fill inside its
panel. Docking applies to the container, not the form, and the Panel serves
as a container.

The other tip when working with docking is that it relies on the z-order, so
if things aren't docking the way you want, then try "Bring to Front" and
"Send to Back"..

John.
 
R

Richard Muller

Hi John,

Thanks for your info.

After I posted on this list, I applied a little brain power and added code
to set the Dock property to Fill. Then, after some more playing around, I
discovered the real cause of my problem:

The Properties frame was too small, so I got fooled into thinking there
were only one or two properties. I just realized that and discovered,
happily, that there was a Dock property that I could have clicked, and
which is set to "Fill" as a consequence of my manual code changes. Oh well,
live and
learn.

Regards,
Richard
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top