翻譯|使用教程|編輯:莫成敏|2020-01-14 10:45:27.667|閱讀 353 次
概述:本文介紹了使用VARCHART XGantt時遇到的常見錯誤——如何禁用上下文菜單。如果您也有這樣的困擾,就跟著小編來了解一下怎么解決吧~(本文回答分為ActiveX版和.NET兩個版本)
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
相關鏈接:
VARCHART XGantt是一個交互式的甘特圖控件,其模塊化的設計讓您可以創建滿足您和您的客戶所需求的應用程序。(我們領先的甘特圖控件VARCHART XGantt可用于.NET,ActiveX和ASP.NET應用程序。)除此之外,同時還具有一個穩定可靠的甘特圖工具,在編寫第一行代碼之前,您就可以知道是否可以滿足客戶的需求。VARCHART XGantt可以快速、簡單地集成到您的應用程序中,幫助您識別性能瓶頸、避免延遲以及高效利用資源,使復雜數據變得更加容易理解。使用VARCHART XGantt,您便具有一個可以生成清晰、靈活的甘特圖的健壯開發工具。它使您實現“從概念到部署”的時間大大縮短,這樣您就可以專注于其他方面的工作。
本文介紹了使用VARCHART XGantt時遇到的常見錯誤——如何禁用上下文菜單。如果您也有這樣的困擾,就跟著小編來了解一下怎么解決吧~(本文回答分為ActiveX版和.NET兩個版本)
答:您可以通過將returnStatus設置為vcRetStatNoPopup來禁用預定義的上下文菜單。
示例代碼
'switching off the context menu of diagram Private Sub VcGantt1_OnDiagramRClick(ByVal x As Long, _ ByVal y As Long, returnStatus As Variant) returnStatus = vcRetStatNoPopup End Sub 'switching off the context menu of links Private Sub VcGantt1_OnLinkRClickCltn(ByVal linkCltn As _ VcGanttLib.VcLinkCollection, _ ByVal x As Long, _ ByVal y As Long, _ returnStatus As Variant) returnStatus = vcRetStatNoPopup End Sub 'switching off the context menu of nodes Private Sub VcGantt1_OnNodeRClick(ByVal node As VcGanttLib.VcNode, _ ByVal location As VcGanttLib.LocationEnum, _ ByVal x As Long, ByVal y As Long, _ returnStatus As Variant) returnStatus = vcRetStatNoPopup End Sub
問:如何禁用默認上下文菜單? (.NET版)
答:您可以通過將returnStatus設置為vcRetStatNoPopup來禁用預定義的上下文菜單。
示例代碼VB.NET
'switching off the context menu of diagram Private Sub VcGantt1_VcDiagramRightClicking(ByVal sender As Object, ByVal e As NETRONIC.XGantt.VcDiagramClickingEventArgs) Handles VcGantt1.VcDiagramRightClicking e.ReturnStatus = VcReturnStatus.vcRetStatNoPopup End Sub 'switching off the context menu of links Private Sub VcGantt1_VcLinksRightClicking(ByVal sender As Object, ByVal e As NETRONIC.XGantt.VcLinksClickingEventArgs) Handles VcGantt1.VcLinksRightClicking e.ReturnStatus = VcReturnStatus.vcRetStatNoPopup End Sub 'switching off the context menu of nodes Private Sub VcGantt1_VcNodeRightClicking(ByVal sender As Object, ByVal e As NETRONIC.XGantt.VcNodeClickingEventArgs) Handles VcGantt1.VcNodeRightClicking e.ReturnStatus = VcReturnStatus.vcRetStatNoPopup End Sub
示例代碼C#
'switching off the context menu of diagram Private Sub VcGantt1_VcDiagramRightClicking(ByVal sender As Object, ByVal e As NETRONIC.XGantt.VcDiagramClickingEventArgs) Handles VcGantt1.VcDiagramRightClicking e.ReturnStatus = VcReturnStatus.vcRetStatNoPopup End Sub 'switching off the context menu of links Private Sub VcGantt1_VcLinksRightClicking(ByVal sender As Object, ByVal e As NETRONIC.XGantt.VcLinksClickingEventArgs) Handles VcGantt1.VcLinksRightClicking e.ReturnStatus = VcReturnStatus.vcRetStatNoPopup End Sub 'switching off the context menu of nodes Private Sub VcGantt1_VcNodeRightClicking(ByVal sender As Object, ByVal e As NETRONIC.XGantt.VcNodeClickingEventArgs) Handles VcGantt1.VcNodeRightClicking e.ReturnStatus = VcReturnStatus.vcRetStatNoPopup End Sub
本文內容到這里就結束了,關于VARCHART XGantt的常見問答還在不斷更新了,感興趣的朋友可以繼續關注我們網站,了解更多產品資訊~您可以下載VARCHART XGantt試用版免費評估~
相關內容推薦:
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@fc6vip.cn
文章轉載自: