2357
|
Specify the size of the Columns panel

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.HeaderHeight = 24
.HeaderAppearance = 4
With .Columns
.Add "City"
.Add("Start").Visible = False
.Add("End").Visible = False
End With
.ColumnsFloatBarRect = ",,96"
.ColumnsFloatBarVisible = 34 ' ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleAsChild Or ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeCheckColumns
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2356
|
Show a vertical line between pivot and Columns panel (EBN color)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.VisualAppearance.Add 1,"gBFLBCJwBAEHhEJAAEhABRsIQAAYAQGKIYBkAKBQAGaAoDDUNQxQwAAxwfBMKgBBCLIxhEYobgmGIXRpFICQTIcBhaGIZRiAKCRTDmHwyRCNIwCLD8QxtDqBY4gOZZX" & _
"hal4cJTgMaBYi+Pw3DZHcbvBRkewzHQAKgnSjoDhEMg1CTVVYTDKdOSzDyEX7sIAACpOIZQVJVEY1VT8cyxIyEZimSypWqiYJ0Ty6cQwTAIgI"
.Background(87) = &H1000000
.HeaderHeight = 24
.HeaderAppearance = 4
With .Columns
.Add "City"
.Add("Start").Visible = False
.Add("End").Visible = False
End With
.ColumnsFloatBarVisible = 34 ' ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleAsChild Or ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeCheckColumns
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2355
|
Change the background of the Columns panel (EBN color)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.VisualAppearance.Add 1,"gBFLBCJwBAEHhEJAAEhABNoCg6AADACAxRDAMgBQKAAzQFAYahqGKGAAGOD4JhUAIIRZGMIjFDcEwxC6NIpAWLoJDCH4mSTHYxgJIMWwzDiBZgkCA4fiGEYnThCIxzT" & _
"J0aw1CKbYRAKCUKoUAJFsSnQAJIgOO4lULPMIhDDQKQTIKBahoehqIhaEQyDSJNb2DCIahhMSEbKtCooDhGFZUWzLVxTJJNawHJqJJDuOTpSjKH4+RjWFKUXR9b4BJSN" & _
"AgqeCQTiSWZEVxRUS0XbGCyZLSQY7uAAMKgOVoDYzdGLwHTtOwrMa1QAsDSbKqWZ5uRpHcQ5aAGN5DPbMbqwOaqLznAaLQLtG4RTikVRPTDYaj437+OaHGyNbI6HTNPp" & _
"TlWDJWjYXI8l8C4fg6GYAAEEISgGJJGHQOocgyIwYnqKhYAAIQTH2MYRjQJBRAmZptmEAYIjGU5dk8UgOFgBJUgCTQIBYBoBmCCAmAqApghgDJUDmYQFCCZoEk2OBUm+" & _
"BZPCgZgagaYZIHYHoHmGWBcm8NwiEiFJVgmYgji4Kg6GKSI2C6C5jAiRgygwIojiycINkyeJmAYPJjkiTg+g+ZAIkCdIQkyWQWDuDxkBkJhKguZAzlIRQzGQc5ODWFJl" & _
"EkVhWhWZYJFYTYTmUE4yF6F5mAmBhihiZhJhYX4WmQaAUnWGpOlmNhuhuZwJkYcocmcSY4naHZlkmKhrDuJ5JnYfofmgCgGgKIJnlmXJ2h4TQKBosRokoNoOiOaQKDSd" & _
"4kmiChMncPBpgoZoaiaaZKHaHonmmE5iiKJRpDicomimaoKiaKoqmqSoeiIPgogqPotiyaxKlYPA+GuCqbBMa5KnaPovmwCwGj6LgP24RIhiyCwmkqMpsksNpKD6LQLB" & _
"qOIzi0SxWlaHZtAOahPssM5Wi+IYtlsXpijKbZ5lyTo5mAE4UlqOpjHOQpEjubyanKPJvEuNgVj2TY1CCao+k2G52AyP5wAwBp9DYZZ1CCaxsAABAEICA"
.Background(87) = &H1000000
.HeaderHeight = 24
.HeaderAppearance = 4
With .Columns
.Add "City"
.Add("Start").Visible = False
.Add("End").Visible = False
End With
.ColumnsFloatBarVisible = 34 ' ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleAsChild Or ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeCheckColumns
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2354
|
Change the background of the Columns panel (solid color)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.HeaderHeight = 24
.HeaderAppearance = 4
With .Columns
.Add "City"
.Add("Start").Visible = False
.Add("End").Visible = False
End With
.ColumnsFloatBarVisible = 34 ' ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleAsChild Or ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeCheckColumns
.Background(87) = RGB(240,240,240)
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2353
|
Change the visual appearance of the Columns panel

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.VisualAppearance.Add 1,"gBFLBCJwBAEHhEJAAEhABNoCg6AADACAxRDAMgBQKAAzQFAYahqGKGAAGOD4JhUAIIRZGMIjFDcEwxC6NIpAWLoJDCH4mSTHYxgJIMWwzDiBZgkCA4fiGEYnThCIxzT" & _
"J0aw1CKbYRAKCUKoUAJFsSnQAJIgOO4lULPMIhDDQKQTIKBahoehqIhaEQyDSJNb2DCIahhMSEbKtCooDhGFZUWzLVxTJJNawHJqJJDuOTpSjKH4+RjWFKUXR9b4BJSN" & _
"AgqeCQTiSWZEVxRUS0XbGCyZLSQY7uAAMKgOVoDYzdGLwHTtOwrMa1QAsDSbKqWZ5uRpHcQ5aAGN5DPbMbqwOaqLznAaLQLtG4RTikVRPTDYaj437+OaHGyNbI6HTNPp" & _
"TlWDJWjYXI8l8C4fg6GYAAEEISgGJJGHQOocgyIwYnqKhYAAIQTH2MYRjQJBRAmZptmEAYIjGU5dk8UgOFgBJUgCTQIBYBoBmCCAmAqApghgDJUDmYQFCCZoEk2OBUm+" & _
"BZPCgZgagaYZIHYHoHmGWBcm8NwiEiFJVgmYgji4Kg6GKSI2C6C5jAiRgygwIojiycINkyeJmAYPJjkiTg+g+ZAIkCdIQkyWQWDuDxkBkJhKguZAzlIRQzGQc5ODWFJl" & _
"EkVhWhWZYJFYTYTmUE4yF6F5mAmBhihiZhJhYX4WmQaAUnWGpOlmNhuhuZwJkYcocmcSY4naHZlkmKhrDuJ5JnYfofmgCgGgKIJnlmXJ2h4TQKBosRokoNoOiOaQKDSd" & _
"4kmiChMncPBpgoZoaiaaZKHaHonmmE5iiKJRpDicomimaoKiaKoqmqSoeiIPgogqPotiyaxKlYPA+GuCqbBMa5KnaPovmwCwGj6LgP24RIhiyCwmkqMpsksNpKD6LQLB" & _
"qOIzi0SxWlaHZtAOahPssM5Wi+IYtlsXpijKbZ5lyTo5mAE4UlqOpjHOQpEjubyanKPJvEuNgVj2TY1CCao+k2G52AyP5wAwBp9DYZZ1CCaxsAABAEICA"
.Background(92) = &H1000000
.Background(93) = RGB(246,246,246)
.BackColorHeader = &H1000000
.HeaderHeight = 24
.HeaderAppearance = 4
With .Columns
.Add "City"
.Add("Start").Visible = False
.Add("End").Visible = False
End With
.Description(26) = "Show/Hide"
.ColumnsFloatBarVisible = 2
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2352
|
Defines the symbol used to indicate repeated captions, providing a clear visual cue for identical entries (ditto mark)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.HeaderAppearance = 4
.HeaderHeight = 24
.DrawGridLines = -2
.Columns.Add("Country").ShowIdem = "<fgcolor gray>〃"
With .Items
.AddItem "Spain"
.AddItem "Spain"
.AddItem "Spain"
.AddItem "Spain"
.AddItem "Germany"
.AddItem "Germany"
.AddItem "Germany"
.AddItem "Germany"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2351
|
Defines the symbol used to indicate repeated captions, providing a clear visual cue for identical entries (space)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.HeaderAppearance = 4
.HeaderHeight = 24
.DrawGridLines = -2
.Columns.Add("Country").ShowIdem = " "
With .Items
.AddItem "Spain"
.AddItem "Spain"
.AddItem "Spain"
.AddItem "Spain"
.AddItem "Germany"
.AddItem "Germany"
.AddItem "Germany"
.AddItem "Germany"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2350
|
Displays a glitch funnel for drop-down filter buttons (empty or active)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
With .VisualAppearance
.RenderType = -1
.Add 1,"gBFLBCJwBAEHhEJAAEhABa8IQAAYAQGKIYBkAKBQAGaAoDDUNQxQwAAxwfBMKgBBCLIxhEYobgmGIXRpFMbxCKQahLEiTIhGUYJHgmK4tRiAUgxVDkBxrECZYqjcBZO" & _
"iwLQ2TxDM7DNKUCBnIoABhGOaYDh+IQNQjUFKwTRFGRxK4EIRKAyTDLQdRyGSMMbjdQpBCbMiMRqhESKRq2UwYRYCFS1NalaztO6BUAvK67YrWez/YBfF+SfwGeqDYRe" & _
"WAPfgWERnQrGMLxbD8KwZAKTRjkGJ4XhuB41TbQMqufL9ByXHKSSDpGjaXjeO5VVjYNAvS69UzXNq3bhtQAOXCMEwCgI="
.Add 2,"CP:1 -2 0 0 0"
End With
.DrawGridLines = -1
.GridLineStyle = 512
.ShowFocusRect = False
.Background(0) = &H2000000
.Background(41) = &H2000001
.HeaderAppearance = 4
.BackColorHeader = RGB(255,255,255)
.HeaderHeight = 24
.HeaderVisible = 1
With .Columns.Add("1st col")
.DisplayFilterButton = True
.DisplayFilterPattern = False
.Filter = "Item B"
.FilterType = 240
End With
.Columns.Add "2nd col"
With .Items
.AddItem "Item A"
.AddItem "Item B"
.AddItem "Item C"
End With
.ApplyFilter
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2349
|
Stack vs Cascade

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.ScrollBySingleLine = True
.HeaderAppearance = 1
.Columns.Add "Type"
.BackColorAlternate = RGB(240,240,240)
With .Chart
.LevelCount = 2
.AllowCreateBar = 1
.AllowLinkBars = False
.ResizeUnitScale = 65536
.PaneWidth(False) = 128
.FirstVisibleDate = #1/1/2001#
With .Bars.Copy("Task","T1")
.OverlaidType = 4
.Def(3) = "<%=%9%>"
End With
With .Bars.Copy("Task","T2")
.OverlaidType = 515 ' OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or OverlaidBarsTypeEnum.exOverlaidBarsStack
.Def(3) = "<%=%9%>"
End With
End With
With .Items
h = .AddItem("Cascade")
.AddBar h,"T1",#1/2/2001#,#1/4/2001#,"A1"
.AddBar h,"T1",#1/3/2001#,#1/5/2001#,"A2"
.AddBar h,"T1",#1/4/2001#,#1/7/2001#,"A3"
.AddBar h,"T1",#1/2/2001#,#1/7/2001#,"A4"
.AddBar h,"T1",#1/8/2001#,#1/12/2001#,"A5"
.AddBar h,"T1",#1/8/2001#,#1/12/2001#,"A6"
.AddBar h,"T1",#1/8/2001#,#1/12/2001#,"A7"
.AddBar h,"T1",#1/8/2001#,#1/12/2001#,"A8"
.AddBar h,"T1",#1/8/2001#,#1/12/2001#,"A9"
.AddBar h,"T1",#1/8/2001#,#1/12/2001#,"AA"
h = .AddItem("Stack-AutoArrange")
.AddBar h,"T2",#1/2/2001#,#1/4/2001#,"A1"
.AddBar h,"T2",#1/3/2001#,#1/5/2001#,"A2"
.AddBar h,"T2",#1/4/2001#,#1/7/2001#,"A3"
.AddBar h,"T2",#1/2/2001#,#1/7/2001#,"A4"
.AddBar h,"T2",#1/8/2001#,#1/12/2001#,"A5"
.AddBar h,"T2",#1/8/2001#,#1/12/2001#,"A6"
.AddBar h,"T2",#1/8/2001#,#1/12/2001#,"A7"
.AddBar h,"T2",#1/8/2001#,#1/12/2001#,"A8"
.AddBar h,"T2",#1/8/2001#,#1/12/2001#,"A9"
.AddBar h,"T2",#1/8/2001#,#1/12/2001#,"AA"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2348
|
Horizontally(left) align the multi-line caption of the bar

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.Columns.Add "Task"
.HeaderAppearance = 4
With .Chart
.FirstVisibleDate = #1/1/2001#
.PaneWidth(False) = 128
.LevelCount = 2
End With
With .Items
.SelectableItem(.AddItem()) = False
h = .AddItem("Task 1")
.ItemHeight(h) = 42
.AddBar h,"Task",#1/2/2001#,#1/7/2001#,"K1","This is a bit of 1'st line<br>2'nd line<br>3'rd line"
.ItemBar(h,"K1",4) = 0
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2347
|
Defines the colors, to display overlapping links

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.Columns.Add "Name"
.AntiAliasing = True
.OverlapLinksColors = "black,gray,lightgray"
With .Chart
.LevelCount = 2
.FirstVisibleDate = #12/28/2000#
.PaneWidth(False) = 64
.ShowLinks = 642 ' ShowExtendedLinksEnum.exChangeColorOnOverlap Or ShowExtendedLinksEnum.exPreventOverlapMixt Or ShowExtendedLinksEnum.exShowDefaultLinks
.NonworkingDays = 0
.LinksStyle = 0
End With
With .Items
.AddItem ""
h1 = .AddItem("Item 1")
.AddBar h1,"Task",#1/3/2001#,#1/6/2001#,"A"
.AddBar h1,"Task",#1/8/2001#,#1/11/2001#,"B"
.AddBar h1,"Task",#1/13/2001#,#1/16/2001#,"C"
.AddBar h1,"Task",#1/18/2001#,#1/21/2001#,"D"
.AddLink "Link1",h1,"D",h1,"A"
.AddLink "Link2",h1,"C",h1,"B"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2346
|
The exPreventOverlapMixt option can be combined with the exChangeColorOnOverlap flag, allowing overlapping links to alternately adjust their width while also changing colors

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.Columns.Add "Name"
.AntiAliasing = True
With .Chart
.LevelCount = 2
.FirstVisibleDate = #12/28/2000#
.PaneWidth(False) = 64
.ShowLinks = 642 ' ShowExtendedLinksEnum.exChangeColorOnOverlap Or ShowExtendedLinksEnum.exPreventOverlapMixt Or ShowExtendedLinksEnum.exShowDefaultLinks
.NonworkingDays = 0
.LinksStyle = 0
End With
With .Items
.AddItem ""
h1 = .AddItem("Item 1")
.AddBar h1,"Task",#1/3/2001#,#1/6/2001#,"A"
.AddBar h1,"Task",#1/8/2001#,#1/11/2001#,"B"
.AddBar h1,"Task",#1/13/2001#,#1/16/2001#,"C"
.AddBar h1,"Task",#1/18/2001#,#1/21/2001#,"D"
.AddLink "Link1",h1,"D",h1,"A"
.AddLink "Link2",h1,"C",h1,"B"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2345
|
The exChangeColorOnOverlap flag changes the color for links in areas where they overlap with other links, enhancing clarity and distinction between them

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.AntiAliasing = True
.Columns.Add "Name"
With .Chart
.LevelCount = 2
.FirstVisibleDate = #12/28/2000#
.PaneWidth(False) = 64
.ShowLinks = 514 ' ShowExtendedLinksEnum.exChangeColorOnOverlap Or ShowExtendedLinksEnum.exShowDefaultLinks
.NonworkingDays = 0
.LinksStyle = 0
End With
With .Items
.AddItem ""
h1 = .AddItem("Item 1")
.AddBar h1,"Task",#1/3/2001#,#1/6/2001#,"A"
.AddBar h1,"Task",#1/8/2001#,#1/11/2001#,"B"
.AddBar h1,"Task",#1/13/2001#,#1/16/2001#,"C"
.AddBar h1,"Task",#1/18/2001#,#1/21/2001#,"D"
.AddLink "Link1",h1,"D",h1,"A"
.AddLink "Link2",h1,"C",h1,"B"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2344
|
How can I assign a multiple-lines caption to an bar

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.Columns.Add "Task"
.HeaderAppearance = 4
With .Chart
.FirstVisibleDate = #1/1/2001#
.PaneWidth(False) = 128
.LevelCount = 2
End With
With .Items
.SelectableItem(.AddItem()) = False
h = .AddItem("Task 1")
.ItemHeight(h) = 42
.AddBar h,"Task",#1/2/2001#,#1/7/2001#,"K1"
.ItemBar(h,"K1",3) = "This is a bit of 1'st line<br>2'nd line<br>3'rd line"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2343
|
The text on the chart overlap the rest of the bars, while using OverlaidType property on exOverlaidBarsStack

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
With .Chart
.PaneWidth(False) = 48
.FirstVisibleDate = #1/3/2002#
.LevelCount = 2
.FirstWeekDay = 1
.Bars.Add("Text").Def(4) = 0
With .Bars.Item("Task")
.Def(4) = 0
.OverlaidType = 4611 ' OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption Or OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or OverlaidBarsTypeEnum.exOverlaidBarsStack
.OverlaidGroup = "Text,Task"
End With
End With
.Columns.Add "Task"
With .Items
h = .AddItem("Default")
.AddBar h,"Text",#1/4/2002#,#1/4/2002#,"","This is another text"
.AddBar h,"Task",#1/6/2002#,#1/8/2002#,"A","This is a bit of text"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2342
|
We are running our application on an Azure server using RDP, with the server language set to English. However, my client has their national language set to Swedish, but the tooltip is displaying dates in the English format (mm/dd/yyyy) instead of the Swedish format (yyyy-mm-dd) (method 2)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.Columns.Add "Def"
With .Chart
.AllowCreateBar = 0
.PaneWidth(False) = 64
.LevelCount = 2
.FirstVisibleDate = #1/1/2010#
.Bars.Item("Task").Def(6) = "<%=`Start: ` + (date(%1) format `yyyy-MM-dd` )%>"
End With
With .Items
h = .AddItem("Task")
.AddBar h,"Task",#1/2/2010#,#1/5/2010#,"A","A"
.AddBar h,"Task",#1/5/2010#,#1/8/2010#,"B","B"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2341
|
We are running our application on an Azure server using RDP, with the server language set to English. However, my client has their national language set to Swedish, but the tooltip is displaying dates in the English format (mm/dd/yyyy) instead of the Swedish format (yyyy-mm-dd) (method 1)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.Columns.Add "Def"
With .Chart
.AllowCreateBar = 0
.PaneWidth(False) = 64
.LevelCount = 2
.FirstVisibleDate = #1/1/2010#
.Bars.Item("Task").Def(6) = "<%=`Start: ` + year(%1) + `-` + (month(%1) lpad `00`) + `-` + (day(%1) lpad `00`)%>"
End With
With .Items
h = .AddItem("Task")
.AddBar h,"Task",#1/2/2010#,#1/5/2010#,"A","A"
.AddBar h,"Task",#1/5/2010#,#1/8/2010#,"B","B"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2340
|
How can I replace or add an icon at runtime

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.ReplaceIcon "gAAAABgYACEHgUJFEEAAWhUJCEJEEJggEhMCYEXjUbjkJQECj8gj8hAEjkshYEpk8kf8ClsulsvAExmcvf83js5nU7nkCeEcn8boMaocXosCB9Hn09pkzcEuoL/fE+O" & _
"kYB0gB9YhIHrddgVcr9aktZADAD8+P8CgIA=="
.ReplaceIcon "C:\images\favicon.ico",0
.Columns.Add "Task"
With .Chart
.FirstVisibleDate = #1/1/2001#
.PaneWidth(False) = 128
.LevelCount = 2
End With
With .Items
h = .AddItem("Task 1")
.AddBar h,"Task",#1/2/2001#,#1/6/2001#,"K1"
.ItemBar(h,"K1",3) = "<img>1</img>"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2339
|
How can I define the sensitivity for link selection when the user clicks or selects a link
<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_MouseMove(Button,Shift,X,Y)
With G2antt1
alert( .Chart.LinkFromPoint(-1,-1) )
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.Columns.Add "Task"
With .Chart
.FirstVisibleDate = #12/29/2000#
.PaneWidth(False) = 64
.LevelCount = 2
.LinksWidth = 1026
End With
With .Items
h1 = .AddItem("Task 1")
.AddBar h1,"Task",#1/2/2001#,#1/4/2001#,"K1"
.AddItem
h2 = .AddItem("Task 2")
.AddBar h2,"Task",#1/8/2001#,#1/10/2001#,"K2"
.AddLink "L1",h1,"K1",h2,"K2"
.AddItem
h3 = .AddItem("Task 3")
.AddBar h3,"Task",#1/14/2001#,#1/16/2001#,"K3"
.AddLink "L2",h2,"K2",h3,"K3"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2338
|
How can I let the user to create task-bars for leaf0-items only, when AllowCreateBar is exCreateBarAuto
<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_CreateBar(Item,DateStart,DateEnd)
With G2antt1
With .Items
alert( "Call RemoveBar if the ChildCount property returns a non-zero value" )
alert( .ChildCount(Item) )
.RemoveBar Item,"newbar"
End With
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.LinesAtRoot = -1
.HeaderVisible = 1
.HeaderAppearance = 4
With .Chart
.AllowCreateBar = 1
.LevelCount = 2
.PaneWidth(False) = 128
End With
.Columns.Add "Task"
With .Items
h = .AddItem("Root")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2337
|
How can I convert the exBarStart/exBarEnd property to a string (by default it returns as VARIANT/VT_DATE type, method 3)

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_BarResizing(Item,Key)
With G2antt1
alert( "Start" )
alert( Key )
alert( .Items.ItemBar(Item,Key,547) )
alert( "End" )
alert( Key )
alert( .Items.ItemBar(Item,Key,548) )
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.Columns.Add "Tasks"
.Debug = True
With .Chart
.FirstVisibleDate = #9/20/2006#
.LevelCount = 2
.PaneWidth(0) = 96
.ResizeUnitScale = 1048576
End With
With .Items
.AddBar .AddItem("Task 1"),"Task",#9/21/2006#,#9/24/2006#,"K1"
.AddBar .AddItem("Task 2"),"Task",#9/22/2006#,#9/25/2006#,"K2"
.AddBar .AddItem("Task 3"),"Task",#9/23/2006#,#9/26/2006#,"K3"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2336
|
How can I convert the exBarStart/exBarEnd property to a string (by default it returns as VARIANT/VT_DATE type, method 2)

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_BarResizing(Item,Key)
With G2antt1
alert( "Start" )
alert( Key )
alert( .FormatABC("dateF(value)",.Items.ItemBar(Item,Key,1)) )
alert( "End" )
alert( Key )
alert( .FormatABC("dateF(value)",.Items.ItemBar(Item,Key,2)) )
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.Columns.Add "Tasks"
.Debug = True
With .Chart
.FirstVisibleDate = #9/20/2006#
.LevelCount = 2
.PaneWidth(0) = 96
.ResizeUnitScale = 1048576
End With
With .Items
.AddBar .AddItem("Task 1"),"Task",#9/21/2006#,#9/24/2006#,"K1"
.AddBar .AddItem("Task 2"),"Task",#9/22/2006#,#9/25/2006#,"K2"
.AddBar .AddItem("Task 3"),"Task",#9/23/2006#,#9/26/2006#,"K3"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2335
|
How can I convert the exBarStart/exBarEnd property to a string (by default it returns as VARIANT/VT_DATE type, method 1)

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_BarResizing(Item,Key)
With G2antt1
alert( "Start" )
alert( Key )
alert( .FormatABC("date(value) format `MM/dd/yyyy HH:mm:ss`",.Items.ItemBar(Item,Key,1)) )
alert( "End" )
alert( Key )
alert( .FormatABC("date(value) format `MM/dd/yyyy HH:mm:ss`",.Items.ItemBar(Item,Key,2)) )
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.Columns.Add "Tasks"
.Debug = True
With .Chart
.FirstVisibleDate = #9/20/2006#
.LevelCount = 2
.PaneWidth(0) = 96
.ResizeUnitScale = 1048576
End With
With .Items
.AddBar .AddItem("Task 1"),"Task",#9/21/2006#,#9/24/2006#,"K1"
.AddBar .AddItem("Task 2"),"Task",#9/22/2006#,#9/25/2006#,"K2"
.AddBar .AddItem("Task 3"),"Task",#9/23/2006#,#9/26/2006#,"K3"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2334
|
Add/Remove/Updates the item-bar's resources

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_Click()
With G2antt1
With .Items
h = .SelectedItem(0)
.ItemBar(h,.FirstItemBar(h),49) = "+R4[10%]"
End With
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.HeaderAppearance = 4
.HeaderHeight = 24
With .Chart
.PaneWidth(False) = 96
.LevelCount = 2
.FirstVisibleDate = #1/1/2001#
With .Bars.Item("Task")
.Def(4) = 18
.Def(3) = "<%=%49%>"
End With
End With
.Columns.Add "Machines"
With .Items
h = .AddItem("Machine 1")
.AddBar h,"Task",#1/6/2001#,#1/12/2001#,"K1"
.ItemBar(h,"K1",49) = "R1,R2"
h = .AddItem("Machine 2")
.AddBar h,"Task",#1/4/2001#,#1/14/2001#,"K2"
.ItemBar(h,"K2",49) = "R2[75%],R3"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2333
|
Distributes resources to a bar

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.HeaderAppearance = 4
.HeaderHeight = 24
With .Chart
.PaneWidth(False) = 96
.LevelCount = 2
.FirstVisibleDate = #1/1/2001#
With .Bars.Item("Task")
.Def(4) = 18
.Def(3) = "<%=%49%>"
End With
End With
.Columns.Add "Machines"
With .Items
h = .AddItem("Machine 1")
.AddBar h,"Task",#1/6/2001#,#1/12/2001#,"K1"
.ItemBar(h,"K1",49) = "R1,R2"
h = .AddItem("Machine 2")
.AddBar h,"Task",#1/4/2001#,#1/14/2001#,"K2"
.ItemBar(h,"K2",49) = "R2[75%],R3"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2332
|
How can I display additional information about a time zone when the user clicks on it (expandable)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
With .Chart
.PaneWidth(False) = 0
.LevelCount = 2
.FirstVisibleDate = #12/20/2009#
.MarkTimeZone "TZ",#1/1/2010#,#1/3/2010#,65280,"1;;<c>TimeZone<b><off -4><a ;exp=just more info about>*</a></b>;1"
End With
End With
End Function
</SCRIPT>
</BODY>
|
2331
|
How can I have a tooltip for a marked TimeZone

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_MouseMove(Button,Shift,X,Y)
With G2antt1
.ShowToolTip .Chart.TimeZoneFromPoint(-1,-1),"",,"+8"
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
With .Chart
.PaneWidth(False) = 0
.LevelCount = 2
.FirstVisibleDate = #12/28/2009#
.MarkTimeZone "Top",#1/1/2010#,#1/5/2010#,16711680,"1;;<fgcolor=FFFFFF>Top;1"
.MarkTimeZone "Partial",#1/8/2010#,#1/12/2010#,16711680,"50;;<fgcolor=FFFFFF>Partial;1"
.MarkTimeZone "Default",#1/15/2010#,#1/19/2010#,16711680,";;<fgcolor=FFFFFF>Default;1"
End With
End With
End Function
</SCRIPT>
</BODY>
|
2330
|
Can I set a filter that automatically adds a * before and after the word, so the user can just search for 'cat' and it becomes '*cat*' automatically

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.HeaderAppearance = 4
.HeaderHeight = 24
.LinesAtRoot = -1
With .Columns.Add("Items")
.DisplayFilterButton = True
.DisplayFilterPattern = True
.Def(21) = "*<%filter%>*"
.FilterType = 3
.Filter = "1"
End With
With .Items
h = .AddItem("Root 1")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
.ExpandItem(h) = True
h = .AddItem("Root 2")
.InsertItem h,,"Child 1"
.InsertItem h,,"Child 2"
End With
.ApplyFilter
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2329
|
The fine dotted lines in the control appear much thicker than the standard ones we've been using. How can we fix this

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.HeaderAppearance = 4
.HeaderHeight = 24
.DrawGridLines = -1
.GridLineStyle = 512
With .Chart
.GridLineStyle = 512
.DrawGridLines = -1
End With
.ColumnAutoResize = False
.Columns.Add "Column 1"
.Columns.Add "Column 2"
.Columns.Add "Column 3"
.Columns.Add "Column 4"
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2328
|
Load data as a tree using a parent-id relationship

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.ColumnAutoResize = False
.HeaderAppearance = 4
.HeaderHeight = 24
.DrawGridLines = 2
.LinesAtRoot = -1
Set rs = CreateObject("ADODB.Recordset")
With rs
.Open "Select * FROM Employees WHERE 1=0","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.mdb",3,3
End With
.DataSource = rs
.Columns.Item(0).Width = 128
Set rs = CreateObject("ADODB.Recordset")
With rs
.Open "Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.mdb",3,3
End With
.PutItems rs.GetRows(),";0;17"
.Items.ExpandItem(0) = True
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2327
|
Is there a way to change the contents of the drop down editor based on a value in another column

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_AddItem(Item)
With G2antt1
.Items.CellEditorVisible(Item,0) = 1
.Items.CellEditorVisible(Item,1) = 1
End With
End Function
</SCRIPT>
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_EditOpen()
With G2antt1
With .Items
v = .CellValue(.FocusItem,0)
c = .CellCaption(.FocusItem,0)
End With
With .Columns.Item(1).Editor
.ClearItems
.AddItem v,c
End With
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.HeaderAppearance = 4
.HeaderHeight = 24
.GridLineStyle = 512
With .Columns.Add("DropDownList")
With .Editor
.EditType = 3
.AddItem 1,"First"
.AddItem 2,"Second"
.AddItem 3,"Third"
End With
End With
.DrawGridLines = -1
.Columns.Add("DropDownList-Related").Editor.EditType = 3
With .Items
.CellValue(.AddItem(1),1) = -1
.CellValue(.AddItem(2),1) = -1
.CellValue(.AddItem(3),1) = -1
.LockedItemCount(2) = 1
h = .LockedItem(2,0)
.ItemDivider(h) = 0
.ItemDividerLineAlignment(h) = 2
.CellEditorVisible(h,0) = False
.CellSingleLine(h,0) = False
.CellValueFormat(h,0) = 1
.CellValue(h,0) = "The drop down editor in the second column is filled during the <b>EditOpen event</b>, and the values are based on the selection" & _
" on the first column."
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2326
|
Highlight the editable fields

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_Change(Item,ColIndex,NewValue)
With G2antt1
.Refresh
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.FreezeEvents True
.BeginUpdate
.HeaderAppearance = 4
.HeaderHeight = 24
.LinesAtRoot = -1
With .ConditionalFormats
With .Add("%CE1")
.Bold = True
.BackColor = RGB(245,245,245)
.ApplyTo = 1 ' &H1
End With
With .Add("%CE2")
.Bold = True
.BackColor = RGB(245,245,245)
.ApplyTo = 2 ' &H2
End With
With .Add("%CE3")
.Bold = True
.BackColor = RGB(245,245,245)
.ApplyTo = 3 ' &H3
End With
End With
With .Columns
.Add "Description"
With .Add("Qty")
.Editor.EditType = 4
.Def(20) = "sum(current,rec,%1)"
End With
With .Add("Price")
.Def(20) = "avg(current,rec,%2)"
.Editor.EditType = 4
End With
With .Add("Amount")
.ComputedField = "%1 * %2"
.Def(20) = "sum(current,rec,%3)"
End With
End With
With .Items
r = .AddItem("Root")
g1 = .InsertItem(r,,"Group 1")
h = .InsertItem(g1,,"Item 1")
.CellValue(h,1) = 1
.CellValue(h,2) = 10
h = .InsertItem(g1,,"Item 2")
.CellValue(h,1) = 2
.CellValue(h,2) = 11
g2 = .InsertItem(r,,"Group 2")
h = .InsertItem(g2,,"Item 1")
.CellValue(h,1) = 3
.CellValue(h,2) = 12
h = .InsertItem(g2,,"Item 2")
.CellValue(h,1) = 4
.CellValue(h,2) = 13
.ExpandItem(0) = True
End With
.EndUpdate
.FreezeEvents False
End With
End Function
</SCRIPT>
</BODY>
|
2325
|
Highlight the total fields

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_Change(Item,ColIndex,NewValue)
With G2antt1
.Refresh
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.FreezeEvents True
.BeginUpdate
.HeaderAppearance = 4
.HeaderHeight = 24
.LinesAtRoot = -1
With .ConditionalFormats
With .Add("%CT1")
.ForeColor = RGB(128,128,128)
.ApplyTo = 1 ' &H1
End With
With .Add("%CT2")
.ForeColor = RGB(128,128,128)
.ApplyTo = 2 ' &H2
End With
With .Add("%CT3")
.ForeColor = RGB(128,128,128)
.ApplyTo = 3 ' &H3
End With
End With
With .Columns
.Add "Description"
With .Add("Qty")
.Editor.EditType = 4
.Def(20) = "sum(current,rec,%1)"
End With
With .Add("Price")
.Def(20) = "avg(current,rec,%2)"
.Editor.EditType = 4
End With
With .Add("Amount")
.ComputedField = "%1 * %2"
.Def(20) = "sum(current,rec,%3)"
End With
End With
With .Items
r = .AddItem("Root")
g1 = .InsertItem(r,,"Group 1")
h = .InsertItem(g1,,"Item 1")
.CellValue(h,1) = 1
.CellValue(h,2) = 10
h = .InsertItem(g1,,"Item 2")
.CellValue(h,1) = 2
.CellValue(h,2) = 11
g2 = .InsertItem(r,,"Group 2")
h = .InsertItem(g2,,"Item 1")
.CellValue(h,1) = 3
.CellValue(h,2) = 12
h = .InsertItem(g2,,"Item 2")
.CellValue(h,1) = 4
.CellValue(h,2) = 13
.ExpandItem(0) = True
End With
.EndUpdate
.FreezeEvents False
End With
End Function
</SCRIPT>
</BODY>
|
2324
|
Highlight the leaf items

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.ConditionalFormats.Add("%CC0=0").ForeColor = RGB(128,128,128)
.HeaderAppearance = 4
.HeaderHeight = 24
.LinesAtRoot = -1
With .Columns
.Add("Item").Width = 16
.Add "Desc"
End With
With .Items
hR = .AddItem("Root")
.CellValue(hR,1) = "The root directory /"
.ExpandItem(hR) = True
h = .InsertItem(hR,,"Home")
.CellValue(h,1) = "The home directory with user directories Alice and Bob"
.InsertItem h,,"Alice"
.InsertItem h,,"Bob"
.ExpandItem(h) = True
h = .InsertItem(hR,,"Etc")
.CellValue(h,1) = "The etc directory with one configuration file"
h = .InsertItem(h,,"nginx.conf")
.CellValue(.InsertItem(hR,,"Var"),1) = "The var directory"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2323
|
Highlight the parent items

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.ConditionalFormats.Add("%CC0").ForeColor = RGB(255,0,0)
.HeaderAppearance = 4
.HeaderHeight = 24
.LinesAtRoot = -1
With .Columns
.Add("Item").Width = 16
.Add "Desc"
End With
With .Items
hR = .AddItem("Root")
.CellValue(hR,1) = "The root directory /"
.ExpandItem(hR) = True
h = .InsertItem(hR,,"Home")
.CellValue(h,1) = "The home directory with user directories Alice and Bob"
.InsertItem h,,"Alice"
.InsertItem h,,"Bob"
.ExpandItem(h) = True
h = .InsertItem(hR,,"Etc")
.CellValue(h,1) = "The etc directory with one configuration file"
h = .InsertItem(h,,"nginx.conf")
.CellValue(.InsertItem(hR,,"Var"),1) = "The var directory"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2322
|
Highlight the item being expanded or collapsed

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.ConditionalFormats.Add("%CX0").Bold = True
.HeaderAppearance = 4
.HeaderHeight = 24
.LinesAtRoot = -1
With .Columns
.Add("Item").Width = 16
.Add "Desc"
End With
With .Items
hR = .AddItem("Root")
.CellValue(hR,1) = "The root directory /"
.ExpandItem(hR) = True
h = .InsertItem(hR,,"Home")
.CellValue(h,1) = "The home directory with user directories Alice and Bob"
.InsertItem h,,"Alice"
.InsertItem h,,"Bob"
.ExpandItem(h) = True
h = .InsertItem(hR,,"Etc")
.CellValue(h,1) = "The etc directory with one configuration file"
h = .InsertItem(h,,"nginx.conf")
.CellValue(.InsertItem(hR,,"Var"),1) = "The var directory"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2321
|
I am using exTotalColumn. Is there an option to exclude specific cells to display the total

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_Change(Item,ColIndex,NewValue)
With G2antt1
.Refresh
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.FreezeEvents True
.BeginUpdate
.HeaderAppearance = 4
.HeaderHeight = 24
.LinesAtRoot = -1
With .Columns
.Add "Description"
With .Add("Qty")
.Editor.EditType = 4
.Def(20) = "sum(current,rec,%1)"
End With
With .Add("Price")
.Def(20) = "avg(current,rec,%2)"
.Editor.EditType = 4
End With
With .Add("Amount")
.ComputedField = "%1 * %2"
.Def(20) = "sum(current,rec,%3)"
End With
End With
With .Items
r = .AddItem("Root")
g1 = .InsertItem(r,,"Group 1")
.FormatCell(g1,2) = "`<average missing>`"
.CellEditorVisible(g1,2) = False
.CellBold(g1,2) = True
.CellForeColor(g1,2) = RGB(255,0,0)
h = .InsertItem(g1,,"Item 1")
.CellValue(h,1) = 1
.CellValue(h,2) = 10
h = .InsertItem(g1,,"Item 2")
.CellValue(h,1) = 2
.CellValue(h,2) = 11
g2 = .InsertItem(r,,"Group 2")
h = .InsertItem(g2,,"Item 1")
.CellValue(h,1) = 3
.CellValue(h,2) = 12
h = .InsertItem(g2,,"Item 2")
.CellValue(h,1) = 4
.CellValue(h,2) = 13
.ExpandItem(0) = True
End With
.EndUpdate
.FreezeEvents False
End With
End Function
</SCRIPT>
</BODY>
|
2320
|
How can I add a total column

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_Change(Item,ColIndex,NewValue)
With G2antt1
.Refresh
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.FreezeEvents True
.BeginUpdate
.HeaderAppearance = 4
.HeaderHeight = 24
.LinesAtRoot = -1
With .Columns
.Add "Description"
With .Add("Qty")
.Editor.EditType = 4
.Def(20) = "sum(current,rec,%1)"
End With
With .Add("Price")
.Def(20) = "avg(current,rec,%2)"
.Editor.EditType = 4
End With
With .Add("Amount")
.ComputedField = "%1 * %2"
.Def(20) = "sum(current,rec,%3)"
End With
End With
With .Items
r = .AddItem("Root")
g1 = .InsertItem(r,,"Group 1")
h = .InsertItem(g1,,"Item 1")
.CellValue(h,1) = 1
.CellValue(h,2) = 10
h = .InsertItem(g1,,"Item 2")
.CellValue(h,1) = 2
.CellValue(h,2) = 11
g2 = .InsertItem(r,,"Group 2")
h = .InsertItem(g2,,"Item 1")
.CellValue(h,1) = 3
.CellValue(h,2) = 12
h = .InsertItem(g2,,"Item 2")
.CellValue(h,1) = 4
.CellValue(h,2) = 13
.ExpandItem(0) = True
End With
.EndUpdate
.FreezeEvents False
End With
End Function
</SCRIPT>
</BODY>
|
2319
|
Is it possible when I move the horizontal scroll bar, that the whole chart scrolls live during move the horizontal scroll bar. Not it scrolls just when I release the left mouse, not during change the horizontal scroll position
<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
With .Chart
.PaneWidth(False) = 0
.LevelCount = 2
.ToolTip = ""
End With
End With
End Function
</SCRIPT>
</BODY>
|
2318
|
The exLinkStyle is not valid (the style of the link is still solid) if the link's width is greater than 1. What can be done
<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.Columns.Add "Task"
With .Chart
.FirstVisibleDate = #1/1/2001#
.PaneWidth(False) = 128
End With
.AntiAliasing = True
With .Items
h1 = .AddItem("Task 1")
.AddBar h1,"Task",#1/2/2001#,#1/4/2001#,"K1"
h2 = .AddItem("Task 2")
.AddBar h2,"Task",#1/5/2001#,#1/7/2001#,"K2"
.AddLink "L1",h1,"K1",h2,"K2"
.Link("L1",9) = 2
.Link("L1",10) = 2
h3 = .AddItem("Task 4")
.AddBar h3,"Task",#1/8/2001#,#1/10/2001#,"K3"
.AddLink "L2",h2,"K2",h3,"K3"
.Link("L2",9) = 1
.Link("L2",10) = 2
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2317
|
How can I change the tooltip's margins (method 2)

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_MouseMove(Button,Shift,X,Y)
With G2antt1
.ShowToolTip .Chart.BarFromPoint(-1,-1)
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.ToolTipMargin = "16,8"
.Columns.Add "Def"
With .Chart
.AllowCreateBar = 0
.PaneWidth(False) = 64
.LevelCount = 2
.FirstVisibleDate = #1/1/2010#
.Bars.Item("Task").Def(6) = "..."
End With
With .Items
h = .AddItem("Task")
.AddBar h,"Task",#1/2/2010#,#1/5/2010#,"A","A"
.AddBar h,"Task",#1/5/2010#,#1/8/2010#,"B","B"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2316
|
Are there any properties to set text margins at tooltip, like Margins="5,5" (method 1). Margins is used to get some space between text and the tooltips border

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_MouseMove(Button,Shift,X,Y)
With G2antt1
.ShowToolTip .Chart.BarFromPoint(-1,-1)
End With
End Function
</SCRIPT>
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.ToolTipMargin = "16,8"
.Columns.Add "Def"
With .Chart
.AllowCreateBar = 0
.PaneWidth(False) = 64
.LevelCount = 2
.FirstVisibleDate = #1/1/2010#
.Bars.Item("Task").Def(6) = "..."
End With
With .Items
h = .AddItem("Task")
.AddBar h,"Task",#1/2/2010#,#1/5/2010#,"A","A"
.AddBar h,"Task",#1/5/2010#,#1/8/2010#,"B","B"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2315
|
exShowExtendedLinks

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.DefaultItemHeight = 24
.HeaderHeight = 20
.HeaderAppearance = 4
.AntiAliasing = True
.Columns.Add "Task"
With .Chart
.PaneWidth(False) = 48
.LevelCount = 2
.UnitScale = 65536
.FirstVisibleDate = #1/10/2024#
With .Level(1)
.DrawTickLines = 0
.DrawTickLinesFrom 0,1
End With
.AllowResizeChart = -1 ' &Hfffffef9 Or ResizeChartEnum.exAllowChangeUnitScale Or ResizeChartEnum.exAllowResizeChartMiddle Or ResizeChartEnum.exAllowResizeChartHeader
.ShowLinks = 1
End With
With .Items
.AddBar .AddItem("T1"),"Task",#1/10/2024 10:00:00 AM#,#1/10/2024 10:20:00 AM#,"T1"
.AddBar .AddItem("T2"),"Task",#1/10/2024 9:00:00 AM#,#1/10/2024 0:00:00 PM#,"T2"
.AddBar .AddItem("T3"),"Task",#1/10/2024 8:00:00 AM#,#1/10/2024 8:30:00 AM#,"T3"
.AddBar .AddItem("T4"),"Task",#1/10/2024 8:00:00 AM#,#1/10/2024 8:30:00 AM#,"T4"
.AddLink "L13",.ItemByIndex(0),"T1",.ItemByIndex(2),"T3"
.AddLink "L14",.ItemByIndex(0),"T1",.ItemByIndex(3),"T4"
.AddLink "L24",.ItemByIndex(1),"T2",.ItemByIndex(3),"T4"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2314
|
According to the documentation of the ShowExtendedLinksEnum value exShowExtendedLinks (1) it is possible to distinctly visualise links (rather than showing them one over another) when two or more links start or end on the same bar

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.DefaultItemHeight = 24
.HeaderHeight = 20
.HeaderAppearance = 4
.AntiAliasing = True
.Columns.Add "Task"
With .Chart
.PaneWidth(False) = 48
.LevelCount = 2
.UnitScale = 65536
.FirstVisibleDate = #1/10/2024#
With .Level(1)
.DrawTickLines = 0
.DrawTickLinesFrom 0,1
End With
.AllowResizeChart = -1 ' &Hfffffef9 Or ResizeChartEnum.exAllowChangeUnitScale Or ResizeChartEnum.exAllowResizeChartMiddle Or ResizeChartEnum.exAllowResizeChartHeader
End With
With .Items
.AddBar .AddItem("T1"),"Task",#1/10/2024 10:00:00 AM#,#1/10/2024 10:20:00 AM#,"T1"
.AddBar .AddItem("T2"),"Task",#1/10/2024 9:00:00 AM#,#1/10/2024 0:00:00 PM#,"T2"
.AddBar .AddItem("T3"),"Task",#1/10/2024 8:00:00 AM#,#1/10/2024 8:30:00 AM#,"T3"
.AddBar .AddItem("T4"),"Task",#1/10/2024 8:00:00 AM#,#1/10/2024 8:30:00 AM#,"T4"
.AddLink "L1",.ItemByIndex(0),"T1",.ItemByIndex(2),"T3"
.AddLink "L2",.ItemByIndex(1),"T2",.ItemByIndex(3),"T4"
.Link("L2",15) = 4
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2313
|
How to use arrows key left/right to move the cursor left/right inside the text
<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
With .Columns.Add("Edit").Editor
.EditType = 1
.Option(20) = False
.Option(21) = False
End With
With .Items
.AddItem "000"
.AddItem "111"
.AddItem "222"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2312
|
How can I force the cursor to jump to the end of the editor once the user clicks the cell
<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.SelBackColor = .BackColor
.SelForeColor = .ForeColor
With .Columns.Add("Edit").Editor
.EditType = 1
.Option(48) = -1
End With
With .Items
.AddItem "000"
.AddItem "111"
.AddItem "222"
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2311
|
How can I show the overview with a different color except or outside the selection

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.VisualAppearance.Add 1,"gBFLBCJwBAEHhEJAAEhABVIDg6AADACAxRDAMgBQKAAzAJBIYhiGgcYCgMZBSDeCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADE2YAoJDUN4nDKMMDybBkRxtDCPIDnGQoD" & _
"iGI4nSbKIzSCKMQhrEKZZrnaLJFgOTY8ABLEBvfSgASof6MKBlKhKGoiUo2SCFEaBTBNHxDL6raqqWJ5HDINQlWzbcjjKKFYRbOqTZDkGj4XqKTo3YBAdZSXJsXwTGKk" & _
"ji3ZgMOR3HaQaTjOgINpuDZdRzkUYZUDFSwSDqQIRtCpbJqzFZDZbLNbYBYME47AayID0CbdCgmaalSZHNxbVa0BzpXrFLw1TLoDy8AJ+ABseKzfo9PxdIygZRzKJ8ao" & _
"fE+YxynIfJcC8QgbCmL5eiEPIKH6RABlibJpicW4/FcAx/HOYRGmud4+CcHxdmiDhkGEIIIEkQJSGMHQHFGSBlFEUITEmewAAQIQ2AYRpDGQJAoEIXhXCkCB5kmSAdmg" & _
"VZPmgZJ8gaT4oHSeIHk8aIEnWCJiEiFgmgmYoIiYJIIE8aB8niB0pmyfIGE+ZYmDQPpjgOUg6DqY5DgYPg2mQAxqEKEJkEkFhGhGZIJA4QA2mOY4GDwOsumCe4NAACJK" & _
"DoPQOFkZJThaSoZHSGYXmYCYGGKGJmEmFhmCsJoDFYag5iaSISDIAAjAkPJLhyS4JlYbA5iSeZmHqHpnkmdh+hOZx5lSOAzGgSQ+DAAAimkNIkiKTh6DSbIjmkChGhKJ" & _
"JpEoVoWiSaJThyKImmSWI4ACCwNkqBhgDsahKhaJopmqComiqKpqkqEhghKYpAAIJIQmYA46jaLZrgqZo6i6a5KnaPotiZRQkiyIg6lIXw7myCwmkqMpsksNpOjObQLC" & _
"KQYQiwOpOEKGAPAsZpajabZLHaXo3m4C4GlmNJNisVpFjWZZzkaao6m6S42m6O5vAuRpyjqLhLhidYxgmE5KnqPpvkudp+j+cAMAcAo+i8WIOkSPZuguZwDkKcJMDafp" & _
"BE8XAengPJxEwVwWkWcYMGcGpGnGTBTBCRIwhkXwikichMhcJpJnKDIPB+NYNimAgqkucwMkcMoInKO4fC2F5ikyZw6k6c5MncPpPnOLJXAiTZJhOXxGlGdINCcSpSnS" & _
"TQ3E6UY0CuYgulSdRNFcVpVnWDRnFSVBwh0axeledgNFsXJRA+HYXGaWZ2g2JxqlqdpNjcZZYmYCJDHKXJ3E2K4doux3gbE8OEF4ygtjuH6L8eAHAHgFGCO8bY2QZgZD" & _
"iBwJ4FRijxE4G8DoxBxj6B6EINwTADjvBaMseYHBng1GaPMTg7wepxA4J4Rx8RjgfCYFMeoEQ6BpGqPUTob2MD2A6IQLoNAKiHAuG0WYAAJCVBCCETAHR3DMFWPgDwD2" & _
"9j4E8CoV4sw7imAIIcJASggAHBeBIJw5grikCmHoSYNxWjrH2BMAoNgqAZE8O0GYEg5DgAIG8DgxwjhXGaCYZIcgnxBGSDILgmwTjKHkJMNwqgjCREoGEC4RRMifHqJc" & _
"YokQ6BgEYJEUIaQOhlHIIESAECAg="
.BackColorLevelHeader = .BackColor
.Background(199) = RGB(1,0,0)
.Background(200) = RGB(240,240,240)
.Chart.OverviewSelBackColor = RGB(255,255,255)
.Background(201) = &H1000000
With .Chart
.FirstVisibleDate = #6/21/2001#
.PaneWidth(False) = 48
.OverviewVisible = 31746 ' &H400 Or OverviewVisibleEnum.exOverviewShowSelMargins Or OverviewVisibleEnum.exOverviewShowMargins Or OverviewVisibleEnum.exOverviewShowDateTimeScaleBottom Or OverviewVisibleEnum.exOverviewShowAllVisible
.OverviewHeight = 64
.LevelCount = 2
.UnitScale = 4096
.Label(65536) = ""
.Label(1048576) = ""
.Label(16777216) = ""
.AllowOverviewZoom = 1
End With
.Columns.Add "Column"
With .Items
.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/11/2001#
.AddBar .AddItem("Item 2"),"Task",#7/2/2001#,#7/11/2001#
.AddBar .AddItem("Item 3"),"Task",#11/2/2001#,#11/11/2001#
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2310
|
Resize the chart using the overview's selection left and right margins (blue)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.BackColorLevelHeader = .BackColor
.Background(199) = RGB(0,0,255)
With .Chart
.FirstVisibleDate = #6/21/2001#
.PaneWidth(False) = 48
.OverviewVisible = 31746 ' &H400 Or OverviewVisibleEnum.exOverviewShowSelMargins Or OverviewVisibleEnum.exOverviewShowMargins Or OverviewVisibleEnum.exOverviewShowDateTimeScaleBottom Or OverviewVisibleEnum.exOverviewShowAllVisible
.OverviewHeight = 64
.LevelCount = 2
.UnitScale = 4096
End With
.Columns.Add "Column"
With .Items
.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/11/2001#
.AddBar .AddItem("Item 2"),"Task",#7/2/2001#,#7/11/2001#
.AddBar .AddItem("Item 3"),"Task",#11/2/2001#,#11/11/2001#
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2309
|
Resize the chart using the overview's selection left and right margins (black)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.BackColorLevelHeader = .BackColor
.Background(199) = RGB(1,0,0)
With .Chart
.FirstVisibleDate = #6/21/2001#
.PaneWidth(False) = 48
.OverviewVisible = 31746 ' &H400 Or OverviewVisibleEnum.exOverviewShowSelMargins Or OverviewVisibleEnum.exOverviewShowMargins Or OverviewVisibleEnum.exOverviewShowDateTimeScaleBottom Or OverviewVisibleEnum.exOverviewShowAllVisible
.OverviewHeight = 64
.LevelCount = 2
.UnitScale = 4096
End With
.Columns.Add "Column"
With .Items
.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/11/2001#
.AddBar .AddItem("Item 2"),"Task",#7/2/2001#,#7/11/2001#
.AddBar .AddItem("Item 3"),"Task",#11/2/2001#,#11/11/2001#
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2308
|
Disable temporarily the column's sort, resize and drag and drop

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.OnResizeControl = 1
.SortBarVisible = True
.SortBarCaption = "<fgcolor 808080><c>the header and the sort-bar are disabled (no drag and drop is allowed)"
.AllowGroupBy = True
.HeaderEnabled = False
.HeaderAppearance = 4
.Columns.Add("Index").FormatColumn = "1 index ``"
.Columns.Add("Pos").FormatColumn = "1 apos ``"
.Columns.Add("Edit").Editor.EditType = 1
.GridLineStyle = 512
.DrawGridLines = 2
.GridLineColor = RGB(224,224,224)
With .Chart
.AllowCreateBar = 1
.LevelCount = 2
.FirstVisibleDate = #12/28/2000#
.PaneWidth(False) = 196
.GridLineStyle = 512
.DrawGridLines = -1
With .Level(1)
.DrawGridLines = True
.GridLineColor = G2antt1.GridLineColor
End With
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2307
|
Adds a Finish-Start(FS) link (method 3)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.Columns.Add "Name"
With .Chart
.LevelCount = 2
.FirstVisibleDate = #12/28/2000#
.PaneWidth(False) = 64
End With
With .Items
h1 = .AddItem("Item 1")
.AddBar h1,"Task",#1/3/2001#,#1/6/2001#
h2 = .AddItem("Item 2")
.AddBar h2,"Task",#1/3/2001#,#1/6/2001#
.AddLink "Link1",h1,"",h2,""
.SchedulePDM 0,""
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2306
|
Adds a Start-Start(SS) link (method 3)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.Columns.Add "Name"
With .Chart
.LevelCount = 2
.FirstVisibleDate = #12/28/2000#
.PaneWidth(False) = 64
End With
With .Items
h1 = .AddItem("Item 1")
.AddBar h1,"Task",#1/3/2001#,#1/6/2001#
h2 = .AddItem("Item 2")
.AddBar h2,"Task",#1/3/2001#,#1/6/2001#
.AddLink "Link1",h1,"",h2,""
.Link("Link1",6) = 0
.Link("Link1",7) = 0
.SchedulePDM 0,""
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2305
|
Adds a Finish-Finish(FF) link (method 3)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.Columns.Add "Name"
With .Chart
.LevelCount = 2
.FirstVisibleDate = #12/28/2000#
.PaneWidth(False) = 64
End With
With .Items
h1 = .AddItem("Item 1")
.AddBar h1,"Task",#1/3/2001#,#1/6/2001#
h2 = .AddItem("Item 2")
.AddBar h2,"Task",#1/3/2001#,#1/6/2001#
.AddLink "Link1",h1,"",h2,""
.Link("Link1",6) = 2
.Link("Link1",7) = 2
.SchedulePDM 0,""
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2304
|
Adds a Start-Finish(SF) link (method 3)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.Columns.Add "Name"
With .Chart
.LevelCount = 2
.FirstVisibleDate = #12/28/2000#
.PaneWidth(False) = 64
End With
With .Items
h1 = .AddItem("Item 1")
.AddBar h1,"Task",#1/3/2001#,#1/6/2001#
h2 = .AddItem("Item 2")
.AddBar h2,"Task",#1/3/2001#,#1/6/2001#
.AddLink "Link1",h1,"",h2,""
.Link("Link1",6) = 0
.Link("Link1",7) = 2
.SchedulePDM 0,""
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2303
|
Adds a Finish-Start(FS) link (method 2)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.Columns.Add "Name"
With .Chart
.LevelCount = 2
.FirstVisibleDate = #12/28/2000#
.PaneWidth(False) = 64
End With
With .Items
h1 = .AddItem("Item 1")
.AddBar h1,"Task",#1/3/2001#,#1/6/2001#
h2 = .AddItem("Item 2")
.AddBar h2,"Task",#1/3/2001#,#1/6/2001#
.ItemBar(h2,"",270) = "1FS"
.SchedulePDM 0,""
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2302
|
Adds a Start-Start(SS) link (method 2)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.Columns.Add "Name"
With .Chart
.LevelCount = 2
.FirstVisibleDate = #12/28/2000#
.PaneWidth(False) = 64
End With
With .Items
h1 = .AddItem("Item 1")
.AddBar h1,"Task",#1/3/2001#,#1/6/2001#
h2 = .AddItem("Item 2")
.AddBar h2,"Task",#1/3/2001#,#1/6/2001#
.ItemBar(h2,"",270) = "1SS"
.SchedulePDM 0,""
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|
2301
|
Adds a Finish-Finish(FF) link (method 2)

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>
<SCRIPT LANGUAGE="VBScript">
Function Init()
With G2antt1
.BeginUpdate
.Columns.Add "Name"
With .Chart
.LevelCount = 2
.FirstVisibleDate = #12/28/2000#
.PaneWidth(False) = 64
End With
With .Items
h1 = .AddItem("Item 1")
.AddBar h1,"Task",#1/3/2001#,#1/6/2001#
h2 = .AddItem("Item 2")
.AddBar h2,"Task",#1/3/2001#,#1/6/2001#
.ItemBar(h2,"",270) = "1FF"
.SchedulePDM 0,""
End With
.EndUpdate
End With
End Function
</SCRIPT>
</BODY>
|