Click here to Skip to main content
15,887,683 members
Home / Discussions / C#
   

C#

 
GeneralRe: object reference not set to an instance of an object Pin
Latheesan1-May-07 18:07
Latheesan1-May-07 18:07 
GeneralRe: object reference not set to an instance of an object Pin
PIEBALDconsult1-May-07 18:23
mvePIEBALDconsult1-May-07 18:23 
GeneralRe: object reference not set to an instance of an object Pin
Latheesan1-May-07 18:37
Latheesan1-May-07 18:37 
GeneralRe: object reference not set to an instance of an object Pin
PIEBALDconsult1-May-07 19:08
mvePIEBALDconsult1-May-07 19:08 
GeneralRe: object reference not set to an instance of an object Pin
Christian Graus1-May-07 19:19
protectorChristian Graus1-May-07 19:19 
GeneralRe: object reference not set to an instance of an object Pin
PIEBALDconsult1-May-07 17:57
mvePIEBALDconsult1-May-07 17:57 
GeneralRe: object reference not set to an instance of an object Pin
Latheesan1-May-07 18:02
Latheesan1-May-07 18:02 
GeneralRe: object reference not set to an instance of an object Pin
PIEBALDconsult1-May-07 18:50
mvePIEBALDconsult1-May-07 18:50 
Here's my version: (I used a RichTextBox because I don't know what that other thing is.)

private void AddTabs ( int tabNumber )
{
    System.Windows.Forms.TabPage tabPage = null ;
    System.Windows.Forms.RichTextBox shtb;

    tabControl.SuspendLayout() ;

    tabControl.Controls.Clear() ;

    for (int i = 0; i < tabNumber; i++)
    {
        // Create a new tab
        tabPage = new System.Windows.Forms.TabPage();
        tabPage.Location = new System.Drawing.Point(4, 22);
        tabPage.Name = "tabPage" + i.ToString();
        tabPage.Padding = new System.Windows.Forms.Padding(3);
        tabPage.Size = new System.Drawing.Size(403, 386);
        tabPage.TabIndex = i;
        tabPage.Text = "tabPage " + i.ToString();
        tabPage.UseVisualStyleBackColor = true;

        // Create a new RichTextBox inside the tab
        shtb = new System.Windows.Forms.RichTextBox();
        shtb.Name = "shtb" + i.ToString();
        shtb.Location = new System.Drawing.Point(0, 0);
        shtb.Dock = System.Windows.Forms.DockStyle.Fill;

        // Add Tab and RichTextBox Control
        tabPage.Controls.Add(shtb);
        tabControl.Controls.Add(tabPage);

        // Reset of tabControl
        tabPage.SuspendLayout();
        tabPage.ResumeLayout(false);
    }

    this.Text = "TabText1 - " + tabPage.Text;

    tabControl.SelectedIndex = tabControl.Controls.Count - 1;

    tabControl.ResumeLayout() ;
}

GeneralRe: object reference not set to an instance of an object Pin
Latheesan1-May-07 17:27
Latheesan1-May-07 17:27 
GeneralRe: object reference not set to an instance of an object Pin
Latheesan1-May-07 17:35
Latheesan1-May-07 17:35 
QuestionControl Customization/ New User Controls? Pin
Rocky#1-May-07 15:53
Rocky#1-May-07 15:53 
AnswerRe: Control Customization/ New User Controls? Pin
Christian Graus1-May-07 19:21
protectorChristian Graus1-May-07 19:21 
GeneralRe: Control Customization/ New User Controls? Pin
Rocky#4-May-07 8:56
Rocky#4-May-07 8:56 
Questionworking with VarBinary type field (SQL 2000) in C# 2.0 Pin
Rocky#1-May-07 15:46
Rocky#1-May-07 15:46 
AnswerRe: working with VarBinary type field (SQL 2000) in C# 2.0 Pin
PIEBALDconsult1-May-07 18:58
mvePIEBALDconsult1-May-07 18:58 
GeneralRe: working with VarBinary type field (SQL 2000) in C# 2.0 Pin
Rocky#4-May-07 8:50
Rocky#4-May-07 8:50 
QuestionHelp with XML design. Pin
Lord Kixdemp1-May-07 14:27
Lord Kixdemp1-May-07 14:27 
AnswerRe: Help with XML design. Pin
PIEBALDconsult1-May-07 15:09
mvePIEBALDconsult1-May-07 15:09 
GeneralRe: Help with XML design. Pin
Lord Kixdemp2-May-07 1:42
Lord Kixdemp2-May-07 1:42 
GeneralRe: Help with XML design. Pin
mikker_1232-May-07 6:19
mikker_1232-May-07 6:19 
GeneralRe: Help with XML design. Pin
Lord Kixdemp2-May-07 14:28
Lord Kixdemp2-May-07 14:28 
Questionconvert an object to string and back (in a culture independent fashion) Pin
Super Lloyd1-May-07 14:17
Super Lloyd1-May-07 14:17 
QuestionChanging what BindingSource references Pin
mikker_1231-May-07 13:48
mikker_1231-May-07 13:48 
QuestionWebservice in C# - please help Pin
jhinze1-May-07 13:19
jhinze1-May-07 13:19 
AnswerRe: Webservice in C# - please help Pin
coolestCoder1-May-07 18:33
coolestCoder1-May-07 18:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.