原創|其它|編輯:郝浩|2013-01-22 15:17:37.000|閱讀 893 次
概述:不知道你是否在甘特圖開發和使用中遇到了困難呢?本文為你總結了六個甘特圖開發和使用過程中經常遇到的問題,希望對你有所幫助。
# 界面/圖表報表/文檔/IDE等千款熱門軟控件火熱銷售中 >>
甘特圖是一種線條圖,一般用橫軸表示時間,縱軸表示活動,線條表示在計劃期間活動的安排以及完成情況。不知道你是否也在甘特圖開發和使用中遇到了困難呢?本文為你總結了六個甘特圖開發和使用過程中的常見問題,希望對你有所幫助。
1、如何在Windows SharePoint中使用VARCHART XGantt?
答:在 ASP.NET網頁中提供一個可實現所需甘特圖功能的Web應用程序。Web部件元素PageViewer在Windows SharePoint中顯示您的應用程序。你只需要傳遞一個連接到您的網頁中。然后你就可以在Windows SharePoint中使用PageViewer了。你可以將你的應用程序放在SharePoint服務器上或任何其他Web服務器上。
2、如何通過點擊方式將Bar移到Gantt Graph甘特圖中?
答:甘特圖中的OnNodeLClick事件同時捕捉表或圖中的節點和信息。點擊表時,會檢索節點相關的日期,并通過ScrollToDate 方法傳遞到VARCHART XGantt對象中。
代碼示例:
Private Sub VcGantt1_OnNodeLClick (ByVal node As VcGanttLib.VcNode, ByVal location As VcGanttLib.LocationEnum, ByVal x As Long, ByVal y As Long, returnStatus As Variant) Dim myDataDef As VcDataDefinition Dim myDataDefTable As VcDataDefinitionTable Dim myDataField As VcDefinitionField Dim myIndex As Integer If location = vcInTable Then // if the index of the field "Start" is unknown Set myDataDef = VcGantt1.DataDefinition Set myDataDefTable = myDataDef.DefinitionTable(vcMaindata) Set myDataField = myDataDefTable.FieldByName("Start") myIndex = myDataField.ID VcGantt1.ScrollToDate node.DataField(myIndex), vcLeftAligned, 2 End If End Sub
答:在甘特圖軟件中,將returnStatus設置為cRetStatNoPopup,可以防止甘特圖中彈出上下文菜單中。
下面的示例代碼適用于ActiveX版本和VB6:
//switching off the context menu of the 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
答:VARCHART ActiveX中無法打印或者無法設置打印機時,請檢查vcprct32.dll文件是否存在,并且,確認是否設置了Windows默認打印機。
5、請問DUNDAS里的甘特圖只能提供展示功能?它都有哪些功能呢?
答:Dundas中的甘特圖只能實現基本的數據展現,并不支持數據的交互,如拖拽等功能,如需使用甘特圖的交互性的功能,推薦您使用GTP.NET。
答:甘特圖控件本身不支持,只能通過自建彈出窗體定義其內容和方法。
如果以上問題依然不能解決你的甘特圖選型問題,建議你到慧都控件問答免費咨詢控件專家。
本站文章除注明轉載外,均為本站原創或翻譯。歡迎任何形式的轉載,但請務必注明出處、不得修改原文相關鏈接,如果存在內容上的異議請郵件反饋至chenjj@ke049m.cn
文章轉載自:慧都控件網