VARCHART XGantt是一个交互式的甘特图控件,其模块化的设计让您可以创建满足您和您的客户所需求的应用程序。(我们领先的甘特图控件VARCHART XGantt可用于.NET,ActiveX和ASP.NET应用程序。)除此之外,同时还具有一个稳定可靠的甘特图工具,在编写第一行代码之前,您就可以知道是否可以满足客户的需求。VARCHART XGantt可以快速、简单地集成到您的应用程序中,帮助您识别性能瓶颈、避免延迟以及高效利用资源,使复杂数据变得更加容易理解。
VARCHART XGantt正式版
如何限制时标宽度(ActiveX版)
如果在按住鼠标左键的同时触摸可见区域最左端的时间刻度以扩大时间刻度,则可以轻松达到远远超过1000%的因数。若要控制这一点,请使用OnTimeScaleSectionRescale事件。以下示例显示了如何最大程度地扩大两倍。
示例代码
Private Sub VcGantt1_OnTimeScaleSectionRescale(ByVal timeScale As _ VcGanttLib.VcTimeScale, ByVal sectionIndex As _ Integer, ByVal newBasicUnitWidth As Long, _ returnStatus As Variant) Dim nOldUnitWidth As Long nOldUnitWidth = timeScale.Section(sectionIndex).UnitWidth If newBasicUnitWidth > (2 * nOldUnitWidth) Then timeScale.Section(sectionIndex).UnitWidth = 2 * nOldUnitWidth returnStatus = vcRetStatFalse End IfEnd Sub
如何限制时标宽度.NET版)
如果在按住鼠标左键的同时触摸可见区域最左端的时间刻度以扩大时间刻度,则可以轻松达到远远超过1000%的因数。 若要控制这一点,请使用VcTimeScaleSectionRescaling事件。以下示例显示了如何最大程度地扩大两倍。
示例代码VB.NET
Private Sub VcGantt1_VcTimeScaleSectionRescaling(ByVal sender As Object,ByVal e As NETRONIC.XGantt.VcTimeScaleSectionRescalingEventArgs) HandlesVcGantt1.VcTimeScaleSectionRescaling Dim nOldUnitWidth As Long Dim returnStatus As VariantType nOldUnitWidth = e.TimeScale.Section(0).UnitWidth If (e.NewBasicUnitWidth > (2 * nOldUnitWidth)) Then nOldUnitWidth = 2 * nOldUnitWidth returnStatus = e.ReturnStatus.vcRetStatFalse End IfEnd Sub
示例代码C#
private void VcGantt1_VcTimeScaleSectionRescaling(object sender,NETRONIC.XGantt.VcTimeScaleSectionRescalingEventArgs e) { long nOldUnitWidth = e.TimeScale.get_Section(0).UnitWidth; object returnStatus = e.ReturnStatus; if (e.NewBasicUnitWidth > (2 * nOldUnitWidth)) { nOldUnitWidth = 2 * nOldUnitWidth; } }
相关内容推荐:
VARCHART XGantt 使用教程>>>
VARCHART XGantt 常见问题>>>
想要购买VARCHART XGantt正版授权,或了解更多产品信息请点击【咨询在线客服】
标签:
声明:本站部分文章及图片源自用户投稿,如本站任何资料有侵权请您尽早请联系jinwei@zod.com.cn进行处理,非常感谢!