Inheritance question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Adrian

    Inheritance question

    Why does text box 1 not show "Hello"?
    Thank you,
    Adrian

    In MainForm:

    if (......) new Trial(1);

    internal string tb1
    {
    get { return this.textBox1.T ext; }
    set { this.textBox1.T ext = value; }
    }


    Trial:

    public partial class Trial : MainForm
    {
    int arg;
    public Trial(int arg )
    {
    this.arg = arg;
    InitializeCompo nent();
    if (arg == 1) base.tb1 = "Hello";
    }
    }


  • Adrian

    #2
    Re: Inheritance question

    Sorry I found out.
    It needs this.Show();
    Adrian

    "Adrian" <not@all.access iblewrote in message
    news:454f3a13$0 $736$5fc3050@dr eader2.news.tis cali.nl...
    Why does text box 1 not show "Hello"?
    Thank you,
    Adrian
    >
    In MainForm:
    >
    if (......) new Trial(1);
    >
    internal string tb1
    {
    get { return this.textBox1.T ext; }
    set { this.textBox1.T ext = value; }
    }
    >
    >
    Trial:
    >
    public partial class Trial : MainForm
    {
    int arg;
    public Trial(int arg )
    {
    this.arg = arg;
    InitializeCompo nent();
    if (arg == 1) base.tb1 = "Hello";
    }
    }
    >
    >

    Comment

    Working...