Controls.Clear() fail

J

Jens O

I have a TabPage control in a Form that I want to
add/remove TabPages to/from like:

TabControl tabControl1;
TabPage tabPage1;
TabPage tabPage2;

// Add tabs
tabControl1.TabPages.Add(tabPage1);
tabControl1.TabPages.Add(tabPage2);

I now want to remove tabPage2:
tabControl1.TabPages.Remove(tabPage2);

Now clicking the 'X' on the caption bar fails to close the
window. I DO NOT want to Dispose tabPage2, which may fix
the bug. Do You have a solution? Is this a known bug? When
will it be fixed?
Thanks, Jens
 
G

Gabriele G. Ponti

Hi,

I tried to reproduce the problem, with no success. After removing the second
tab the form closes regularly. Can you post your source code?

Gabriele
 
G

Gabriele G. Ponti

Hi,

I used your code, and I'm still able to close the form after removing the
tab. Can you describe the steps to reproduce the problem?

Gabriele
 
G

Gabriele G. Ponti

I'm using 1.1 here.

Jens O said:
Hi!

I just press the button "button1", which removes the tab.
After that, the close button (X) stops working.

I am using Microsoft .NET Framework 1.0 Version 1.0.3705.

Jens
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top