Complete the following steps to add a C1ContextMenu control to a C1DockingTab control.
To write code in Visual Basic
Visual Basic |
Copy Code
|
---|---|
Private Sub c1DockingTab1_MouseClick(ByVal sender As Object, ByVal e As MouseEventArgs) If (e.Button = System.Windows.Forms.MouseButtons.Left) Then If (e.X > Me.c1DockingTabPage1.Location.X) Then c1ContextMenu1.ShowContextMenu(Me.c1DockingTab1, New Point(e.X, e.Y)) Else Me.c1DockingTab1.ContextMenu = Nothing End If End If End Sub |
To write code in C#
C# |
Copy Code
|
---|---|
private void c1DockingTab1_MouseClick(object sender, MouseEventArgs e) { if (e.Button == System.Windows.Forms.MouseButtons.Left) { if (e.X > this.c1DockingTabPage1.Location.X) { c1ContextMenu1.ShowContextMenu(this.c1DockingTab1, new Point(e.X, e.Y)); } else this.c1DockingTab1.ContextMenu = null; } } |