Problem adding Tab control to a form

R

Richard Muller

Hi All,

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
 
R

Richard Muller

Hi All,

I got one solution that seems to work. I commented out one generated code
line and substituted another as follows:
// this.tabControl1.Location = new System.Drawing.Point(80, 280); // RLM

this.tabControl1.Dock = System.Windows.Forms.DockStyle.Fill; // RLM

These changes were made in InitializeComponent, which should be proper,
right? That is, they shouldn't confuse the code generator nor get replaced
by future use of the GUI creation mechanism, right?


BTW, why wasn't the Dock property listed in the tabControl properties list?

Regards,
Richard
 
R

Richard Muller

The Properties frame was too small, so I got fooled into thinking there was
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.
 

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