关闭TabControl选项卡: Private Sub TabControl_Main_CloseButtonClick(sender As Object, e As EventArgs) Handles TabControl_Main.CloseButtonClick Dim TpA As DevExpress.XtraTab.ViewInfo.ClosePageButtonEventArgs = e For Each P1 As DevExpress.XtraTab.XtraTabPage
再具体说一下现在的需求: 如上界面:在新闻发布界面有一个按钮,在点击按钮的时候我需要直接把这个打开的选项卡关闭 实现思路: 1)关闭选项卡对应的页面 2)去除上方选项卡 3)激活前一个选项卡 1)关闭选项卡对应的界面: 使用jquery我们很容易想到window.close()关闭当前界面,但是此时浏览器报了警告提示: Scripts may close only the windows that were opened by it 而且也并没有能够关闭我想关闭的界面,百度之后
1. 关闭TabControl选项卡: Private Sub TabControl_Main_CloseButtonClick(sender As Object, e As EventArgs) Handles TabControl_Main.CloseButtonClick Dim TpA As DevExpress.XtraTab.ViewInfo.ClosePageButtonEventArgs = e For Each P1 As DevExpress.XtraTab.XtraTabP