Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
4766 | May 29,2003 11:05 PM UTC | May 30,2003 05:58 AM UTC | WinForms | 1 |
![]() |
Tags: GridControl |
tabBarSplitterControl1.Bar.MouseUp += new MouseEventHandler(tabbar_MouseUp);
3) event code to display the menu
private void tabbar_MouseUp(object sender, MouseEventArgs e) { if(e.Button == MouseButtons.Right) this.contextMenu1.Show(this.tabBarSplitterControl1.Bar, new Point(e.X, e.Y)); }4)Have your delete menu selection handler use code like this. You should explicitly dispose of any grid controls (If you don't, the close button on your form won't work ????).
private void menuItem1_Click(object sender, System.EventArgs e) { foreach(Control c in this.tabBarSplitterControl1.ActivePage.Controls) { if(c is GridControlBase) c.Dispose(); } this.tabBarSplitterControl1.TabBarPages.Remove(this.tabBarSplitterControl1.ActivePage); }
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.