tags:

views:

281

answers:

1

I am creating multiple tabs dynamically when my application starts up. Put it this way, if my tabcontrol have two tabs in it, which calls Notepad and ms paint.

when the notepad is closed.... I want my tab respective to notepad to be closed in my tabcontrol.

How ?

+1  A: 

Do you mean to say that you want a tab removed? Tabs aren't really open or closed.

Here's how you'd remove a tab:

myTabControl.TabPages.Remove(notepadTab);

where notepadTab is a reference to the tab associated with the notepad application. You've stated that pages are created dynamically - have a look at the function overloads of Remove( ) to find one that suits your needs.

Charlie Salts