Home > Net >  C # TAB page is embedded in the form, set up a close button in the from, how to implement the click
C # TAB page is embedded in the form, set up a close button in the from, how to implement the click

Time:03-17

Novice just into the line, recently made a TAB page embedded in the form of project, add a close button in the form, click this button to close the form and the form of tabpage page, I do not know how to implement, each elder bosses give some opinions
Cited sunnyUI TAB in the control, the control is in itself a close button TAB, click on closed TAB to close the window, click the close button in the form, however, can't realize the closed form and the TAB page

CodePudding user response:

The parent to child form as a parameter, the child form call parent form close method in the closing event, if there is no public parent form close method, then write one by yourself

CodePudding user response:

And the DEV XtraTabControl controls the same,
To write the Text and the Name value, into the Dict dictionary, determine which form open by dictionary, judging open to close, then removed from the Dict dictionary,
No open, add into the Dict, this method has a lot of Demo has been very mature,
  •  Tags:  
  • C #
  • Related