Click here to Skip to main content
15,909,091 members
Home / Discussions / C#
   

C#

 
AnswerRe: Cross Thread Operation Pin
Mandaar Kulkarni1-May-07 21:02
Mandaar Kulkarni1-May-07 21:02 
Questionhelp here... square program Pin
Missy Glory1-May-07 19:24
Missy Glory1-May-07 19:24 
AnswerRe: help here... square program Pin
stancrm1-May-07 19:40
stancrm1-May-07 19:40 
AnswerRe: help here... square program Pin
Michael1011-May-07 19:40
Michael1011-May-07 19:40 
AnswerRe: help here... square program Pin
Guffa1-May-07 22:27
Guffa1-May-07 22:27 
QuestionC# ASP.NET Printing Puzzle!! Pin
Michael1011-May-07 18:11
Michael1011-May-07 18:11 
AnswerRe: C# ASP.NET Printing Puzzle!! Pin
Christian Graus1-May-07 19:17
protectorChristian Graus1-May-07 19:17 
GeneralRe: C# ASP.NET Printing Puzzle!! Pin
Michael1011-May-07 19:38
Michael1011-May-07 19:38 
QuestionDeserialize an object with XML tags Pin
gsteingr1231-May-07 17:49
gsteingr1231-May-07 17:49 
AnswerRe: Deserialize an object with XML tags Pin
PIEBALDconsult1-May-07 17:55
mvePIEBALDconsult1-May-07 17:55 
AnswerRe: Deserialize an object with XML tags Pin
LongRange.Shooter2-May-07 5:18
LongRange.Shooter2-May-07 5:18 
Questionobject reference not set to an instance of an object Pin
Latheesan1-May-07 16:44
Latheesan1-May-07 16:44 
AnswerRe: object reference not set to an instance of an object Pin
PIEBALDconsult1-May-07 17:08
mvePIEBALDconsult1-May-07 17:08 
GeneralRe: object reference not set to an instance of an object Pin
Latheesan1-May-07 17:23
Latheesan1-May-07 17:23 
GeneralRe: object reference not set to an instance of an object Pin
PIEBALDconsult1-May-07 17:53
mvePIEBALDconsult1-May-07 17:53 
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 

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.