vb.net - How to Add Click Listener to Programmatically Added Tabcontrol -


in application i'm programmatically adding tab so:

'show searchresults tab if not present if not tabcontrol1.tabpages.contains(tabsearchresults)     tabcontrol1.tabpages.insert(3, tabsearchresults) end if 

now cant seem manually add click event listener tab in design view, , when in codeview nothing happens when click tab.

so question is,.. how add click listener tabsearchresults tab?

i assume tabsearchresults tabpage.
first create function handler of click event

private sub tabsearchresults_click(sender object, e eventargs)     'your code ... end sub 

then after line initialize tabpage add handler:

tabsearchresults = new tabpage() addhandler tabsearchresults.click, addressof tabsearchresults_click 

Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -