Пример #1
0
 private void MyMdi_MouseUp(object sender, MouseEventArgs e)
 {
     if (e.Button == MouseButtons.Right && ActiveMdiChild != null)
     {
         DevExpress.XtraTab.ViewInfo.BaseTabHitInfo hInfo = myMdi.CalcHitInfo(e.Location);
         //右键点击位置:在Page上且不在关闭按钮内
         if (hInfo.IsValid && hInfo.Page != null && !hInfo.InPageControlBox)
         {
             this.closeMenu.ShowPopup(Control.MousePosition);//在鼠标位置弹出,而不是e.Location
         }
     }
 }
Пример #2
0
        private void xtraTabbedMdiManager1_MouseDown(object sender, MouseEventArgs e)
        {
            if (e.Button != MouseButtons.Right)
            {
                return;
            }

            DevExpress.XtraTab.ViewInfo.BaseTabHitInfo hi = xtraTabbedMdiManager1.CalcHitInfo(new Point(e.X, e.Y));
            if (hi.HitTest == DevExpress.XtraTab.ViewInfo.XtraTabHitTest.PageHeader)
            {
                popupMenu1.ShowPopup(Cursor.Position);
            }
        }
Пример #3
0
 private void OnXtraTabbedMdiManagerMouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
 {
     DevExpress.XtraTab.ViewInfo.BaseTabHitInfo hi = manager.CalcHitInfo(new Point(e.X, e.Y));
     if (hi.HitTest == DevExpress.XtraTab.ViewInfo.XtraTabHitTest.PageHeader)
     {
         if (clickTick == -1)
         {
             clickTick    = System.Environment.TickCount;
             previousPage = hi.Page;
         }
         else
         {
             if (System.Environment.TickCount - clickTick < SystemInformation.DoubleClickTime && hi.Page == previousPage)
             {
                 TabHeaderDoubleClickEventArgs args = new TabHeaderDoubleClickEventArgs(hi.Page);
                 RaiseTabHeaderDoubleClick(args);
             }
             clickTick = -1;
         }
     }
 }
 private bool InButtons(Point location)
 {
     DevExpress.XtraTab.ViewInfo.BaseTabHitInfo hi = CalcHitInfo(location);
     return(hi.HitTest == DevExpress.XtraTab.ViewInfo.XtraTabHitTest.PageHeaderButtons);
 }