TabPage.Text property write only? lol

  • Thread starter Thread starter Steve Twors
  • Start date Start date
S

Steve Twors

// do this in dotnet ...

newtabpage = new System.Windows.Forms.TabPage();
newtabpage.Text = "this does not work";

tempstring = newtabpage.Text; // << put breakpoint here

Text property says its "Form1" even though I just set it to "this does not
work".
It correctly displays "this does not work" on my computer screen though.

What up with this crap? thanks,
 
// do this in dotnet ...

newtabpage = new System.Windows.Forms.TabPage();
newtabpage.Text = "this does not work";

tempstring = newtabpage.Text; // << put breakpoint here

Text property says its "Form1" even though I just set it to "this does not
work".
It correctly displays "this does not work" on my computer screen though.

What up with this crap? thanks,

It sounds like it's probably a debugger problem rather than a TabPage
problem. For instance, this example works fine:

using System;
using System.Windows.Forms;

public class Test
{
static void Main()
{
TabPage foo = new TabPage();
foo.Text = "hello";
Console.WriteLine (foo.Text);
foo.Text = "there";
Console.WriteLine (foo.Text);
}
}
 
Back
Top