Tab control problem...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Jeti [work]

    Tab control problem...

    I have tab control with several tab pages. Each tab page contains a few
    textboxes filled dynamicly from the code. Everything goes fine, but every
    textbox that is located on a tab page that has hot been selected after the
    form has been activates has no text! Let me try to describe my problem
    further:


    TAB CONTROL
    PAGE PAGE PAGE PAGE
    ------------------------------------
    TXT1 TXT3 TXT5 TXT7
    TXT2 TXT4 TXT6 TXT8
    ------------------------------------

    BUTTON(CLOSE)

    On form load goes:
    TXT1.Text = "my";
    TXT2.Text = "form";
    TXT3.Text = "isnt";
    TXT4.Text = "working";
    TXT5.Text = "right";
    //etc...
    Exactly, textboxes are binded to a strong-typed dataset, but that isnt a
    problem...


    By default, when form openes, the first tab page is focused, and other have
    never been focused. When I close this dialog, and set a breakpoint, i get
    this odd results:

    Button_Close_Cl ick (...)
    {
    Debug.WriteLine (TXT1.Text); // writes "my" - ok.
    Debug.WriteLine (TXT2.Text); // writes "form" - ok
    Debug.WriteLine (TXT3.Text); // writes "" - ????
    Debug.WriteLine (TXT4.Text); // writes "" - ????
    Debug.WriteLine (TXT5.Text); // writes "" - ????
    Debug.WriteLine (TXT6.Text); // writes "" - ????
    // every control that has been on some tab
    // page that was never focused, has no text set!
    // WHY?!
    }



    Sorry for my bad english, i hope you understood me!
    Thank you for replies!


Working...