TabControl winform c#

Posted by Steve on Stack Overflow See other posts from Stack Overflow or by Steve
Published on 2010-12-21T11:33:30Z Indexed on 2010/12/21 11:54 UTC
Read the original article Hit count: 327

Filed under:
|

Hi,

Does anyone know why my tabcontrol will not display on this form? Have a feeling it maybe something simple but at the moment i just get a blank form.

Thanks

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace test_project_3
{
    public partial class TabTest : Form
    {
        public TabTest()
        {
            InitializeComponent();

            WebBrowser WB = new WebBrowser();
            WB.Navigate("www.google.com");

            TabControl tc = new TabControl();
            tc.Dock = DockStyle.Fill;
            tc.Show();

            TabPage tp = new TabPage();
            tp.Text = "test";
            tp.Show();
            tp.Controls.Add(WB);

            tc.TabPages.Add(tp);
        }
    }
}

© Stack Overflow or respective owner

Related posts about winforms

Related posts about tabcontrol