TabControl created dynamically won't show

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:

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
 

willisgt

Active Member
Licensed User
Working (?) Code

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

Gary
 

Attachments

  • problem.sbp
    22.7 KB · Views: 203

willisgt

Active Member
Licensed User
colors.bmp

Sorry...

:sign0161:
 

Attachments

  • problem.zip
    7.2 KB · Views: 179

willisgt

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

Gary
 
Top