TabControl created dynamically won't show

Discussion in 'Questions (Windows Mobile)' started by willisgt, Mar 14, 2008.

  1. willisgt

    willisgt Active Member Licensed User

    Anyone else run into this?

    I have a completely blank form. On this form, I create a label at the top; a scrollbar along the right side, and a TabControl which occupies the remainder of the form.

    For each object/control, I am first adding it using AddObject, then New, etc.

    I create four tab pages. On each page, I create a panel. On each panel, I create a series of labels, and maybe a button or two.

    When the form is closed, every control on the form gets disposed of.

    No problem so far.

    If I try to re-open the form, my TabControl doesn't show. The label shows up, the scrollbar shows up... no errors are reported anywhere. The TabControl just doesn't appear. I know it's there, though - if I MsgBox out the top, left, width, and height of the TabControl, I get the same four values as when it did appear.

    Why would dynamic creation of a TabControl work properly only once?


    Gary

    :sign0085:
     
    Last edited: Mar 14, 2008
  2. willisgt

    willisgt Active Member Licensed User

    Code

    I thought it might me helpful to post part of the code. The MsgBox'es around line 460 are for diagnostic purposes.

    Gary
     
  3. agraham

    agraham Expert Licensed User

    Sorry but for me there's too much missing and what is there is too arcane to get any sense out of this code. Can you post some simple code that actually runs and displays the problem?
     
  4. willisgt

    willisgt Active Member Licensed User

    Working (?) Code

    This code actually works... (sorry, this is what I should have posted before)

    Gary
     

    Attached Files:

  5. specci48

    specci48 Well-Known Member Licensed User

    ./data/colors.bmp is still missing... :(
     
  6. willisgt

    willisgt Active Member Licensed User

    colors.bmp

    Sorry...

    :sign0161:
     

    Attached Files:

  7. agraham

    agraham Expert Licensed User

    I suspect a visibility bug in TabControl. See the fully pared down demo I've posted in the Bugs forum.
     
  8. agraham

    agraham Expert Licensed User

  9. willisgt

    willisgt Active Member Licensed User

    Wow. Thanks to everyone who helped track this down, and special thanks to Erel for the quick fix!

    Gary
     
Loading...