2357
Specify the size of the Columns panel

With AxG2antt1
	.BeginUpdate()
	.HeaderHeight = 24
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	With .Columns
		.Add("City")
		.Add("Start").Visible = False
		.Add("End").Visible = False
	End With
	.ColumnsFloatBarRect = ",,96"
	.ColumnsFloatBarVisible = EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleAsChild Or EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeCheckColumns
	.EndUpdate()
End With
2356
Show a vertical line between pivot and Columns panel (EBN color)

With AxG2antt1
	.BeginUpdate()
	.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABRsIQAAYAQGKIYBkAKBQAGaAoDDUNQxQwAAxwfBMKgBBCLIxhEYobgmGIXRpFICQTIcBhaGIZRiAKCRTDmHwyRCNIwCLD8QxtDqBY4gOZZX" & _
"hal4cJTgMaBYi+Pw3DZHcbvBRkewzHQAKgnSjoDhEMg1CTVVYTDKdOSzDyEX7sIAACpOIZQVJVEY1VT8cyxIyEZimSypWqiYJ0Ty6cQwTAIgI")
	.set_Background(EXG2ANTTLib.BackgroundPartEnum.exColumnsFloatBackColor,16777216)
	.HeaderHeight = 24
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	With .Columns
		.Add("City")
		.Add("Start").Visible = False
		.Add("End").Visible = False
	End With
	.ColumnsFloatBarVisible = EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleAsChild Or EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeCheckColumns
	.EndUpdate()
End With
2355
Change the background of the Columns panel (EBN color)

With AxG2antt1
	.BeginUpdate()
	.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABNoCg6AADACAxRDAMgBQKAAzQFAYahqGKGAAGOD4JhUAIIRZGMIjFDcEwxC6NIpAWLoJDCH4mSTHYxgJIMWwzDiBZgkCA4fiGEYnThCIxzT" & _
"J0aw1CKbYRAKCUKoUAJFsSnQAJIgOO4lULPMIhDDQKQTIKBahoehqIhaEQyDSJNb2DCIahhMSEbKtCooDhGFZUWzLVxTJJNawHJqJJDuOTpSjKH4+RjWFKUXR9b4BJSN" & _
"AgqeCQTiSWZEVxRUS0XbGCyZLSQY7uAAMKgOVoDYzdGLwHTtOwrMa1QAsDSbKqWZ5uRpHcQ5aAGN5DPbMbqwOaqLznAaLQLtG4RTikVRPTDYaj437+OaHGyNbI6HTNPp" & _
"TlWDJWjYXI8l8C4fg6GYAAEEISgGJJGHQOocgyIwYnqKhYAAIQTH2MYRjQJBRAmZptmEAYIjGU5dk8UgOFgBJUgCTQIBYBoBmCCAmAqApghgDJUDmYQFCCZoEk2OBUm+" & _
"BZPCgZgagaYZIHYHoHmGWBcm8NwiEiFJVgmYgji4Kg6GKSI2C6C5jAiRgygwIojiycINkyeJmAYPJjkiTg+g+ZAIkCdIQkyWQWDuDxkBkJhKguZAzlIRQzGQc5ODWFJl" & _
"EkVhWhWZYJFYTYTmUE4yF6F5mAmBhihiZhJhYX4WmQaAUnWGpOlmNhuhuZwJkYcocmcSY4naHZlkmKhrDuJ5JnYfofmgCgGgKIJnlmXJ2h4TQKBosRokoNoOiOaQKDSd" & _
"4kmiChMncPBpgoZoaiaaZKHaHonmmE5iiKJRpDicomimaoKiaKoqmqSoeiIPgogqPotiyaxKlYPA+GuCqbBMa5KnaPovmwCwGj6LgP24RIhiyCwmkqMpsksNpKD6LQLB" & _
"qOIzi0SxWlaHZtAOahPssM5Wi+IYtlsXpijKbZ5lyTo5mAE4UlqOpjHOQpEjubyanKPJvEuNgVj2TY1CCao+k2G52AyP5wAwBp9DYZZ1CCaxsAABAEICA")
	.set_Background(EXG2ANTTLib.BackgroundPartEnum.exColumnsFloatBackColor,16777216)
	.HeaderHeight = 24
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	With .Columns
		.Add("City")
		.Add("Start").Visible = False
		.Add("End").Visible = False
	End With
	.ColumnsFloatBarVisible = EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleAsChild Or EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeCheckColumns
	.EndUpdate()
End With
2354
Change the background of the Columns panel (solid color)

With AxG2antt1
	.BeginUpdate()
	.HeaderHeight = 24
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	With .Columns
		.Add("City")
		.Add("Start").Visible = False
		.Add("End").Visible = False
	End With
	.ColumnsFloatBarVisible = EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleAsChild Or EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeCheckColumns
	.set_Background(EXG2ANTTLib.BackgroundPartEnum.exColumnsFloatBackColor,15790320)
	.EndUpdate()
End With
2353
Change the visual appearance of the Columns panel

With AxG2antt1
	.BeginUpdate()
	.VisualAppearance.Add(1,"gBFLBCJwBAEHhEJAAEhABNoCg6AADACAxRDAMgBQKAAzQFAYahqGKGAAGOD4JhUAIIRZGMIjFDcEwxC6NIpAWLoJDCH4mSTHYxgJIMWwzDiBZgkCA4fiGEYnThCIxzT" & _
"J0aw1CKbYRAKCUKoUAJFsSnQAJIgOO4lULPMIhDDQKQTIKBahoehqIhaEQyDSJNb2DCIahhMSEbKtCooDhGFZUWzLVxTJJNawHJqJJDuOTpSjKH4+RjWFKUXR9b4BJSN" & _
"AgqeCQTiSWZEVxRUS0XbGCyZLSQY7uAAMKgOVoDYzdGLwHTtOwrMa1QAsDSbKqWZ5uRpHcQ5aAGN5DPbMbqwOaqLznAaLQLtG4RTikVRPTDYaj437+OaHGyNbI6HTNPp" & _
"TlWDJWjYXI8l8C4fg6GYAAEEISgGJJGHQOocgyIwYnqKhYAAIQTH2MYRjQJBRAmZptmEAYIjGU5dk8UgOFgBJUgCTQIBYBoBmCCAmAqApghgDJUDmYQFCCZoEk2OBUm+" & _
"BZPCgZgagaYZIHYHoHmGWBcm8NwiEiFJVgmYgji4Kg6GKSI2C6C5jAiRgygwIojiycINkyeJmAYPJjkiTg+g+ZAIkCdIQkyWQWDuDxkBkJhKguZAzlIRQzGQc5ODWFJl" & _
"EkVhWhWZYJFYTYTmUE4yF6F5mAmBhihiZhJhYX4WmQaAUnWGpOlmNhuhuZwJkYcocmcSY4naHZlkmKhrDuJ5JnYfofmgCgGgKIJnlmXJ2h4TQKBosRokoNoOiOaQKDSd" & _
"4kmiChMncPBpgoZoaiaaZKHaHonmmE5iiKJRpDicomimaoKiaKoqmqSoeiIPgogqPotiyaxKlYPA+GuCqbBMa5KnaPovmwCwGj6LgP24RIhiyCwmkqMpsksNpKD6LQLB" & _
"qOIzi0SxWlaHZtAOahPssM5Wi+IYtlsXpijKbZ5lyTo5mAE4UlqOpjHOQpEjubyanKPJvEuNgVj2TY1CCao+k2G52AyP5wAwBp9DYZZ1CCaxsAABAEICA")
	.set_Background(EXG2ANTTLib.BackgroundPartEnum.exColumnsFloatAppearance,16777216)
	.set_Background(EXG2ANTTLib.BackgroundPartEnum.exColumnsFloatCaptionBackColor,16185078)
	.GetOcx().BackColorHeader = &H1000000
	.HeaderHeight = 24
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	With .Columns
		.Add("City")
		.Add("Start").Visible = False
		.Add("End").Visible = False
	End With
	.set_Description(EXG2ANTTLib.DescriptionTypeEnum.exColumnsFloatBar,"Show/Hide")
	.ColumnsFloatBarVisible = EXG2ANTTLib.ColumnsFloatBarVisibleEnum.exColumnsFloatBarVisibleIncludeCheckColumns
	.EndUpdate()
End With
2352
Defines the symbol used to indicate repeated captions, providing a clear visual cue for identical entries (ditto mark)

With AxG2antt1
	.BeginUpdate()
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	.HeaderHeight = 24
	.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exRowLines
	.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
2351
Defines the symbol used to indicate repeated captions, providing a clear visual cue for identical entries (space)

With AxG2antt1
	.BeginUpdate()
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	.HeaderHeight = 24
	.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exRowLines
	.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
2350
Displays a glitch funnel for drop-down filter buttons (empty or active)

With AxG2antt1
	.BeginUpdate()
	With .VisualAppearance
		.RenderType = -1
		.Add(1,"gBFLBCJwBAEHhEJAAEhABa8IQAAYAQGKIYBkAKBQAGaAoDDUNQxQwAAxwfBMKgBBCLIxhEYobgmGIXRpFMbxCKQahLEiTIhGUYJHgmK4tRiAUgxVDkBxrECZYqjcBZO" & _
"iwLQ2TxDM7DNKUCBnIoABhGOaYDh+IQNQjUFKwTRFGRxK4EIRKAyTDLQdRyGSMMbjdQpBCbMiMRqhESKRq2UwYRYCFS1NalaztO6BUAvK67YrWez/YBfF+SfwGeqDYRe" & _
"WAPfgWERnQrGMLxbD8KwZAKTRjkGJ4XhuB41TbQMqufL9ByXHKSSDpGjaXjeO5VVjYNAvS69UzXNq3bhtQAOXCMEwCgI=")
		.Add(2,"CP:1 -2 0 0 0")
	End With
	.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines
	.GridLineStyle = EXG2ANTTLib.GridLinesStyleEnum.exGridLinesGeometric
	.ShowFocusRect = False
	.set_Background(EXG2ANTTLib.BackgroundPartEnum.exHeaderFilterBarButton,33554432)
	.set_Background(EXG2ANTTLib.BackgroundPartEnum.exHeaderFilterBarActive,33554433)
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	.BackColorHeader = RGB(255,255,255)
	.HeaderHeight = 24
	.HeaderVisible = EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels
	With .Columns.Add("1st col")
		.DisplayFilterButton = True
		.DisplayFilterPattern = False
		.Filter = "Item B"
		.FilterType = EXG2ANTTLib.FilterTypeEnum.exFilter
	End With
	.Columns.Add("2nd col")
	With .Items
		.AddItem("Item A")
		.AddItem("Item B")
		.AddItem("Item C")
	End With
	.ApplyFilter()
	.EndUpdate()
End With
2349
Stack vs Cascade

Dim h
With AxG2antt1
	.BeginUpdate()
	.ScrollBySingleLine = True
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Flat
	.Columns.Add("Type")
	.BackColorAlternate = RGB(240,240,240)
	With .Chart
		.LevelCount = 2
		.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto
		.AllowLinkBars = False
		.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exHour
		.PaneWidth(False) = 128
		.FirstVisibleDate = #1/1/2001#
		With .Bars.Copy("Task","T1")
			.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsCascade
			.Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption) = "<%=%9%>"
		End With
		With .Bars.Copy("Task","T2")
			.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStack
			.Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption) = "<%=%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
2348
Horizontally(left) align the multi-line caption of the bar

Dim h
With AxG2antt1
	.BeginUpdate()
	.Columns.Add("Task")
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	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",EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption) = 0
	End With
	.EndUpdate()
End With
2347
Defines the colors, to display overlapping links

Dim h1
With AxG2antt1
	.BeginUpdate()
	.Columns.Add("Name")
	.AntiAliasing = True
	.OverlapLinksColors = "black,gray,lightgray"
	With .Chart
		.LevelCount = 2
		.FirstVisibleDate = #12/28/2000#
		.PaneWidth(False) = 64
		.ShowLinks = EXG2ANTTLib.ShowExtendedLinksEnum.exChangeColorOnOverlap Or EXG2ANTTLib.ShowExtendedLinksEnum.exPreventOverlapMixt Or EXG2ANTTLib.ShowExtendedLinksEnum.exShowDefaultLinks
		.NonworkingDays = 0
		.LinksStyle = EXG2ANTTLib.LinkStyleEnum.exLinkSolid
	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
2346
The exPreventOverlapMixt option can be combined with the exChangeColorOnOverlap flag, allowing overlapping links to alternately adjust their width while also changing colors

Dim h1
With AxG2antt1
	.BeginUpdate()
	.Columns.Add("Name")
	.AntiAliasing = True
	With .Chart
		.LevelCount = 2
		.FirstVisibleDate = #12/28/2000#
		.PaneWidth(False) = 64
		.ShowLinks = EXG2ANTTLib.ShowExtendedLinksEnum.exChangeColorOnOverlap Or EXG2ANTTLib.ShowExtendedLinksEnum.exPreventOverlapMixt Or EXG2ANTTLib.ShowExtendedLinksEnum.exShowDefaultLinks
		.NonworkingDays = 0
		.LinksStyle = EXG2ANTTLib.LinkStyleEnum.exLinkSolid
	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
2345
The exChangeColorOnOverlap flag changes the color for links in areas where they overlap with other links, enhancing clarity and distinction between them

Dim h1
With AxG2antt1
	.BeginUpdate()
	.AntiAliasing = True
	.Columns.Add("Name")
	With .Chart
		.LevelCount = 2
		.FirstVisibleDate = #12/28/2000#
		.PaneWidth(False) = 64
		.ShowLinks = EXG2ANTTLib.ShowExtendedLinksEnum.exChangeColorOnOverlap Or EXG2ANTTLib.ShowExtendedLinksEnum.exShowDefaultLinks
		.NonworkingDays = 0
		.LinksStyle = EXG2ANTTLib.LinkStyleEnum.exLinkSolid
	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
2344
How can I assign a multiple-lines caption to an bar

Dim h
With AxG2antt1
	.BeginUpdate()
	.Columns.Add("Task")
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	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",EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption) = "This is a bit of 1'st line<br>2'nd line<br>3'rd line"
	End With
	.EndUpdate()
End With
2343
The text on the chart overlap the rest of the bars, while using OverlaidType property on exOverlaidBarsStack

Dim h
With AxG2antt1
	.BeginUpdate()
	With .Chart
		.PaneWidth(False) = 48
		.FirstVisibleDate = #1/3/2002#
		.LevelCount = 2
		.FirstWeekDay = EXG2ANTTLib.WeekDayEnum.exMonday
		.Bars.Add("Text").Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption) = 0
		With .Bars.Item("Task")
			.Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption) = 0
			.OverlaidType = EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption Or EXG2ANTTLib.OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or EXG2ANTTLib.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
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)

Dim h
With AxG2antt1
	.BeginUpdate()
	.Columns.Add("Def")
	With .Chart
		.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exNoCreateBar
		.PaneWidth(False) = 64
		.LevelCount = 2
		.FirstVisibleDate = #1/1/2010#
		.Bars.Item("Task").Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip) = "<%=`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
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)

Dim h
With AxG2antt1
	.BeginUpdate()
	.Columns.Add("Def")
	With .Chart
		.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exNoCreateBar
		.PaneWidth(False) = 64
		.LevelCount = 2
		.FirstVisibleDate = #1/1/2010#
		.Bars.Item("Task").Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip) = "<%=`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
2340
How can I replace or add an icon at runtime

Dim h
With AxG2antt1
	.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",EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption) = "<img>1</img>"
	End With
	.EndUpdate()
End With
2339
How can I define the sensitivity for link selection when the user clicks or selects a link
' MouseMove event - Occurs when the user moves the mouse.
Private Sub AxG2antt1_MouseMoveEvent(ByVal sender As System.Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent) Handles AxG2antt1.MouseMoveEvent
	With AxG2antt1
		Debug.Print( .Chart.LinkFromPoint(-1,-1) )
	End With
End Sub

Dim h1,h2,h3
With AxG2antt1
	.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
2338
How can I let the user to create task-bars for leaf0-items only, when AllowCreateBar is exCreateBarAuto
' CreateBar event - Fired when the user creates a new bar.
Private Sub AxG2antt1_CreateBar(ByVal sender As System.Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_CreateBarEvent) Handles AxG2antt1.CreateBar
	With AxG2antt1
		With .Items
			Debug.Print( "Call RemoveBar if the ChildCount property returns a non-zero value" )
			Debug.Print( .ChildCount(e.item) )
			.RemoveBar(e.item,"newbar")
		End With
	End With
End Sub

Dim h
With AxG2antt1
	.BeginUpdate()
	.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot
	.HeaderVisible = EXG2ANTTLib.HeaderVisibleEnum.exHeaderVisibleExtendLevels
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	With .Chart
		.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto
		.LevelCount = 2
		.PaneWidth(False) = 128
	End With
	.Columns.Add("Task")
	With .Items
		h = .AddItem("Root")
		.InsertItem(h,Nothing,"Child 1")
		.InsertItem(h,Nothing,"Child 2")
		.ExpandItem(h) = True
	End With
	.EndUpdate()
End With
2337
How can I convert the exBarStart/exBarEnd property to a string (by default it returns as VARIANT/VT_DATE type, method 3)

' BarResizing event - Occurs when a bar is moving or resizing.
Private Sub AxG2antt1_BarResizing(ByVal sender As System.Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_BarResizingEvent) Handles AxG2antt1.BarResizing
	With AxG2antt1
		Debug.Print( "Start" )
		Debug.Print( e.key )
		Debug.Print( .Items.ItemBar(e.item,e.key,EXG2ANTTLib.ItemBarPropertyEnum.exBarStartStr) )
		Debug.Print( "End" )
		Debug.Print( e.key )
		Debug.Print( .Items.ItemBar(e.item,e.key,EXG2ANTTLib.ItemBarPropertyEnum.exBarEndStr) )
	End With
End Sub

With AxG2antt1
	.BeginUpdate()
	.Columns.Add("Tasks")
	.Debug = True
	With .Chart
		.FirstVisibleDate = #9/20/2006#
		.LevelCount = 2
		.PaneWidth(False) = 96
		.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exMinute
	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
2336
How can I convert the exBarStart/exBarEnd property to a string (by default it returns as VARIANT/VT_DATE type, method 2)

' BarResizing event - Occurs when a bar is moving or resizing.
Private Sub AxG2antt1_BarResizing(ByVal sender As System.Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_BarResizingEvent) Handles AxG2antt1.BarResizing
	With AxG2antt1
		Debug.Print( "Start" )
		Debug.Print( e.key )
		Debug.Print( .FormatABC("dateF(value)",.Items.ItemBar(e.item,e.key,EXG2ANTTLib.ItemBarPropertyEnum.exBarStart)) )
		Debug.Print( "End" )
		Debug.Print( e.key )
		Debug.Print( .FormatABC("dateF(value)",.Items.ItemBar(e.item,e.key,EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd)) )
	End With
End Sub

With AxG2antt1
	.BeginUpdate()
	.Columns.Add("Tasks")
	.Debug = True
	With .Chart
		.FirstVisibleDate = #9/20/2006#
		.LevelCount = 2
		.PaneWidth(False) = 96
		.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exMinute
	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
2335
How can I convert the exBarStart/exBarEnd property to a string (by default it returns as VARIANT/VT_DATE type, method 1)

' BarResizing event - Occurs when a bar is moving or resizing.
Private Sub AxG2antt1_BarResizing(ByVal sender As System.Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_BarResizingEvent) Handles AxG2antt1.BarResizing
	With AxG2antt1
		Debug.Print( "Start" )
		Debug.Print( e.key )
		Debug.Print( .FormatABC("date(value) format `MM/dd/yyyy HH:mm:ss`",.Items.ItemBar(e.item,e.key,EXG2ANTTLib.ItemBarPropertyEnum.exBarStart)) )
		Debug.Print( "End" )
		Debug.Print( e.key )
		Debug.Print( .FormatABC("date(value) format `MM/dd/yyyy HH:mm:ss`",.Items.ItemBar(e.item,e.key,EXG2ANTTLib.ItemBarPropertyEnum.exBarEnd)) )
	End With
End Sub

With AxG2antt1
	.BeginUpdate()
	.Columns.Add("Tasks")
	.Debug = True
	With .Chart
		.FirstVisibleDate = #9/20/2006#
		.LevelCount = 2
		.PaneWidth(False) = 96
		.ResizeUnitScale = EXG2ANTTLib.UnitEnum.exMinute
	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
2334
Add/Remove/Updates the item-bar's resources

' Click event - Occurs when the user presses and then releases the left mouse button over the tree control.
Private Sub AxG2antt1_ClickEvent(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxG2antt1.ClickEvent
	Dim h
	With AxG2antt1
		With .Items
			h = .SelectedItem(0)
			.ItemBar(h,.FirstItemBar(h),EXG2ANTTLib.ItemBarPropertyEnum.exBarResources) = "+R4[10%]"
		End With
	End With
End Sub

Dim h
With AxG2antt1
	.BeginUpdate()
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	.HeaderHeight = 24
	With .Chart
		.PaneWidth(False) = 96
		.LevelCount = 2
		.FirstVisibleDate = #1/1/2001#
		With .Bars.Item("Task")
			.Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption) = 18
			.Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption) = "<%=%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",EXG2ANTTLib.ItemBarPropertyEnum.exBarResources) = "R1,R2"
		h = .AddItem("Machine 2")
		.AddBar(h,"Task",#1/4/2001#,#1/14/2001#,"K2")
		.ItemBar(h,"K2",EXG2ANTTLib.ItemBarPropertyEnum.exBarResources) = "R2[75%],R3"
	End With
	.EndUpdate()
End With
2333
Distributes resources to a bar

Dim h
With AxG2antt1
	.BeginUpdate()
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	.HeaderHeight = 24
	With .Chart
		.PaneWidth(False) = 96
		.LevelCount = 2
		.FirstVisibleDate = #1/1/2001#
		With .Bars.Item("Task")
			.Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarHAlignCaption) = 18
			.Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarCaption) = "<%=%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",EXG2ANTTLib.ItemBarPropertyEnum.exBarResources) = "R1,R2"
		h = .AddItem("Machine 2")
		.AddBar(h,"Task",#1/4/2001#,#1/14/2001#,"K2")
		.ItemBar(h,"K2",EXG2ANTTLib.ItemBarPropertyEnum.exBarResources) = "R2[75%],R3"
	End With
	.EndUpdate()
End With
2332
How can I display additional information about a time zone when the user clicks on it (expandable)

With AxG2antt1
	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
2331
How can I have a tooltip for a marked TimeZone

' MouseMove event - Occurs when the user moves the mouse.
Private Sub AxG2antt1_MouseMoveEvent(ByVal sender As System.Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent) Handles AxG2antt1.MouseMoveEvent
	With AxG2antt1
		.ShowToolTip(.Chart.TimeZoneFromPoint(-1,-1),"",Nothing,"+8")
	End With
End Sub

With AxG2antt1
	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
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

Dim h
With AxG2antt1
	.BeginUpdate()
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	.HeaderHeight = 24
	.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot
	With .Columns.Add("Items")
		.DisplayFilterButton = True
		.DisplayFilterPattern = True
		.Def(EXG2ANTTLib.DefColumnEnum.exFilterPatternTemplate) = "*<%filter%>*"
		.FilterType = EXG2ANTTLib.FilterTypeEnum.exPattern
		.Filter = "1"
	End With
	With .Items
		h = .AddItem("Root 1")
		.InsertItem(h,Nothing,"Child 1")
		.InsertItem(h,Nothing,"Child 2")
		.ExpandItem(h) = True
		h = .AddItem("Root 2")
		.InsertItem(h,Nothing,"Child 1")
		.InsertItem(h,Nothing,"Child 2")
	End With
	.ApplyFilter()
	.EndUpdate()
End With
2329
The fine dotted lines in the control appear much thicker than the standard ones we've been using. How can we fix this

With AxG2antt1
	.BeginUpdate()
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	.HeaderHeight = 24
	.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines
	.GridLineStyle = EXG2ANTTLib.GridLinesStyleEnum.exGridLinesGeometric
	With .Chart
		.GridLineStyle = EXG2ANTTLib.GridLinesStyleEnum.exGridLinesGeometric
		.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines
	End With
	.ColumnAutoResize = False
	.Columns.Add("Column 1")
	.Columns.Add("Column 2")
	.Columns.Add("Column 3")
	.Columns.Add("Column 4")
	.EndUpdate()
End With
2328
Load data as a tree using a parent-id relationship

Dim rs
With AxG2antt1
	.BeginUpdate()
	.ColumnAutoResize = False
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	.HeaderHeight = 24
	.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exVLines
	.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot
	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
	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
2327
Is there a way to change the contents of the drop down editor based on a value in another column

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub AxG2antt1_AddItem(ByVal sender As System.Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_AddItemEvent) Handles AxG2antt1.AddItem
	With AxG2antt1
		.Items.CellEditorVisible(e.item,0) = EXG2ANTTLib.EditorVisibleEnum.exEditorVisible
		.Items.CellEditorVisible(e.item,1) = EXG2ANTTLib.EditorVisibleEnum.exEditorVisible
	End With
End Sub

' EditOpen event - Occurs when the edit operation starts.
Private Sub AxG2antt1_EditOpen(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles AxG2antt1.EditOpen
	Dim c,v
	With AxG2antt1
		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 Sub

Dim h
With AxG2antt1
	.BeginUpdate()
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	.HeaderHeight = 24
	.GridLineStyle = EXG2ANTTLib.GridLinesStyleEnum.exGridLinesGeometric
	With .Columns.Add("DropDownList")
		With .Editor
			.EditType = EXG2ANTTLib.EditTypeEnum.DropDownListType
			.AddItem(1,"First")
			.AddItem(2,"Second")
			.AddItem(3,"Third")
		End With
	End With
	.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines
	.Columns.Add("DropDownList-Related").Editor.EditType = EXG2ANTTLib.EditTypeEnum.DropDownListType
	With .Items
		.CellValue(.AddItem(1),1) = -1
		.CellValue(.AddItem(2),1) = -1
		.CellValue(.AddItem(3),1) = -1
		.LockedItemCount(EXG2ANTTLib.VAlignmentEnum.exBottom) = 1
		h = .LockedItem(EXG2ANTTLib.VAlignmentEnum.exBottom,0)
		.ItemDivider(h) = 0
		.ItemDividerLineAlignment(h) = EXG2ANTTLib.DividerAlignmentEnum.DividerTop
		.CellEditorVisible(h,0) = EXG2ANTTLib.EditorVisibleEnum.exEditorHidden
		.CellSingleLine(h,0) = EXG2ANTTLib.CellSingleLineEnum.exCaptionWordWrap
		.CellValueFormat(h,0) = EXG2ANTTLib.ValueFormatEnum.exHTML
		.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
2326
Highlight the editable fields

' Change event - Occurs when the user changes the cell's content.
Private Sub AxG2antt1_Change(ByVal sender As System.Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_ChangeEvent) Handles AxG2antt1.Change
	With AxG2antt1
		.Refresh()
	End With
End Sub

Dim g1,g2,h,r
With AxG2antt1
	.FreezeEvents(True)
	.BeginUpdate()
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	.HeaderHeight = 24
	.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot
	With .ConditionalFormats
		With .Add("%CE1")
			.Bold = True
			.BackColor = RGB(245,245,245)
			.ApplyTo = &H1
		End With
		With .Add("%CE2")
			.Bold = True
			.BackColor = RGB(245,245,245)
			.ApplyTo = &H2
		End With
		With .Add("%CE3")
			.Bold = True
			.BackColor = RGB(245,245,245)
			.ApplyTo = &H3
		End With
	End With
	With .Columns
		.Add("Description")
		With .Add("Qty")
			.Editor.EditType = EXG2ANTTLib.EditTypeEnum.SpinType
			.Def(EXG2ANTTLib.DefColumnEnum.exTotalColumn) = "sum(current,rec,%1)"
		End With
		With .Add("Price")
			.Def(EXG2ANTTLib.DefColumnEnum.exTotalColumn) = "avg(current,rec,%2)"
			.Editor.EditType = EXG2ANTTLib.EditTypeEnum.SpinType
		End With
		With .Add("Amount")
			.ComputedField = "%1 * %2"
			.Def(EXG2ANTTLib.DefColumnEnum.exTotalColumn) = "sum(current,rec,%3)"
		End With
	End With
	With .Items
		r = .AddItem("Root")
		g1 = .InsertItem(r,Nothing,"Group 1")
		h = .InsertItem(g1,Nothing,"Item 1")
		.CellValue(h,1) = 1
		.CellValue(h,2) = 10
		h = .InsertItem(g1,Nothing,"Item 2")
		.CellValue(h,1) = 2
		.CellValue(h,2) = 11
		g2 = .InsertItem(r,Nothing,"Group 2")
		h = .InsertItem(g2,Nothing,"Item 1")
		.CellValue(h,1) = 3
		.CellValue(h,2) = 12
		h = .InsertItem(g2,Nothing,"Item 2")
		.CellValue(h,1) = 4
		.CellValue(h,2) = 13
		.ExpandItem(0) = True
	End With
	.EndUpdate()
	.FreezeEvents(False)
End With
2325
Highlight the total fields

' Change event - Occurs when the user changes the cell's content.
Private Sub AxG2antt1_Change(ByVal sender As System.Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_ChangeEvent) Handles AxG2antt1.Change
	With AxG2antt1
		.Refresh()
	End With
End Sub

Dim g1,g2,h,r
With AxG2antt1
	.FreezeEvents(True)
	.BeginUpdate()
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	.HeaderHeight = 24
	.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot
	With .ConditionalFormats
		With .Add("%CT1")
			.ForeColor = RGB(128,128,128)
			.ApplyTo = &H1
		End With
		With .Add("%CT2")
			.ForeColor = RGB(128,128,128)
			.ApplyTo = &H2
		End With
		With .Add("%CT3")
			.ForeColor = RGB(128,128,128)
			.ApplyTo = &H3
		End With
	End With
	With .Columns
		.Add("Description")
		With .Add("Qty")
			.Editor.EditType = EXG2ANTTLib.EditTypeEnum.SpinType
			.Def(EXG2ANTTLib.DefColumnEnum.exTotalColumn) = "sum(current,rec,%1)"
		End With
		With .Add("Price")
			.Def(EXG2ANTTLib.DefColumnEnum.exTotalColumn) = "avg(current,rec,%2)"
			.Editor.EditType = EXG2ANTTLib.EditTypeEnum.SpinType
		End With
		With .Add("Amount")
			.ComputedField = "%1 * %2"
			.Def(EXG2ANTTLib.DefColumnEnum.exTotalColumn) = "sum(current,rec,%3)"
		End With
	End With
	With .Items
		r = .AddItem("Root")
		g1 = .InsertItem(r,Nothing,"Group 1")
		h = .InsertItem(g1,Nothing,"Item 1")
		.CellValue(h,1) = 1
		.CellValue(h,2) = 10
		h = .InsertItem(g1,Nothing,"Item 2")
		.CellValue(h,1) = 2
		.CellValue(h,2) = 11
		g2 = .InsertItem(r,Nothing,"Group 2")
		h = .InsertItem(g2,Nothing,"Item 1")
		.CellValue(h,1) = 3
		.CellValue(h,2) = 12
		h = .InsertItem(g2,Nothing,"Item 2")
		.CellValue(h,1) = 4
		.CellValue(h,2) = 13
		.ExpandItem(0) = True
	End With
	.EndUpdate()
	.FreezeEvents(False)
End With
2324
Highlight the leaf items

Dim h,hR
With AxG2antt1
	.BeginUpdate()
	.ConditionalFormats.Add("%CC0=0").ForeColor = RGB(128,128,128)
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	.HeaderHeight = 24
	.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot
	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,Nothing,"Home")
		.CellValue(h,1) = "The home directory with user directories Alice and Bob"
		.InsertItem(h,Nothing,"Alice")
		.InsertItem(h,Nothing,"Bob")
		.ExpandItem(h) = True
		h = .InsertItem(hR,Nothing,"Etc")
		.CellValue(h,1) = "The etc directory with one configuration file"
		h = .InsertItem(h,Nothing,"nginx.conf")
		.CellValue(.InsertItem(hR,Nothing,"Var"),1) = "The var directory"
	End With
	.EndUpdate()
End With
2323
Highlight the parent items

Dim h,hR
With AxG2antt1
	.BeginUpdate()
	.ConditionalFormats.Add("%CC0").ForeColor = RGB(255,0,0)
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	.HeaderHeight = 24
	.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot
	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,Nothing,"Home")
		.CellValue(h,1) = "The home directory with user directories Alice and Bob"
		.InsertItem(h,Nothing,"Alice")
		.InsertItem(h,Nothing,"Bob")
		.ExpandItem(h) = True
		h = .InsertItem(hR,Nothing,"Etc")
		.CellValue(h,1) = "The etc directory with one configuration file"
		h = .InsertItem(h,Nothing,"nginx.conf")
		.CellValue(.InsertItem(hR,Nothing,"Var"),1) = "The var directory"
	End With
	.EndUpdate()
End With
2322
Highlight the item being expanded or collapsed

Dim h,hR
With AxG2antt1
	.BeginUpdate()
	.ConditionalFormats.Add("%CX0").Bold = True
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	.HeaderHeight = 24
	.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot
	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,Nothing,"Home")
		.CellValue(h,1) = "The home directory with user directories Alice and Bob"
		.InsertItem(h,Nothing,"Alice")
		.InsertItem(h,Nothing,"Bob")
		.ExpandItem(h) = True
		h = .InsertItem(hR,Nothing,"Etc")
		.CellValue(h,1) = "The etc directory with one configuration file"
		h = .InsertItem(h,Nothing,"nginx.conf")
		.CellValue(.InsertItem(hR,Nothing,"Var"),1) = "The var directory"
	End With
	.EndUpdate()
End With
2321
I am using exTotalColumn. Is there an option to exclude specific cells to display the total

' Change event - Occurs when the user changes the cell's content.
Private Sub AxG2antt1_Change(ByVal sender As System.Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_ChangeEvent) Handles AxG2antt1.Change
	With AxG2antt1
		.Refresh()
	End With
End Sub

Dim g1,g2,h,r
With AxG2antt1
	.FreezeEvents(True)
	.BeginUpdate()
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	.HeaderHeight = 24
	.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot
	With .Columns
		.Add("Description")
		With .Add("Qty")
			.Editor.EditType = EXG2ANTTLib.EditTypeEnum.SpinType
			.Def(EXG2ANTTLib.DefColumnEnum.exTotalColumn) = "sum(current,rec,%1)"
		End With
		With .Add("Price")
			.Def(EXG2ANTTLib.DefColumnEnum.exTotalColumn) = "avg(current,rec,%2)"
			.Editor.EditType = EXG2ANTTLib.EditTypeEnum.SpinType
		End With
		With .Add("Amount")
			.ComputedField = "%1 * %2"
			.Def(EXG2ANTTLib.DefColumnEnum.exTotalColumn) = "sum(current,rec,%3)"
		End With
	End With
	With .Items
		r = .AddItem("Root")
		g1 = .InsertItem(r,Nothing,"Group 1")
		.FormatCell(g1,2) = "`<average missing>`"
		.CellEditorVisible(g1,2) = EXG2ANTTLib.EditorVisibleEnum.exEditorHidden
		.CellBold(g1,2) = True
		.CellForeColor(g1,2) = RGB(255,0,0)
		h = .InsertItem(g1,Nothing,"Item 1")
		.CellValue(h,1) = 1
		.CellValue(h,2) = 10
		h = .InsertItem(g1,Nothing,"Item 2")
		.CellValue(h,1) = 2
		.CellValue(h,2) = 11
		g2 = .InsertItem(r,Nothing,"Group 2")
		h = .InsertItem(g2,Nothing,"Item 1")
		.CellValue(h,1) = 3
		.CellValue(h,2) = 12
		h = .InsertItem(g2,Nothing,"Item 2")
		.CellValue(h,1) = 4
		.CellValue(h,2) = 13
		.ExpandItem(0) = True
	End With
	.EndUpdate()
	.FreezeEvents(False)
End With
2320
How can I add a total column

' Change event - Occurs when the user changes the cell's content.
Private Sub AxG2antt1_Change(ByVal sender As System.Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_ChangeEvent) Handles AxG2antt1.Change
	With AxG2antt1
		.Refresh()
	End With
End Sub

Dim g1,g2,h,r
With AxG2antt1
	.FreezeEvents(True)
	.BeginUpdate()
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	.HeaderHeight = 24
	.LinesAtRoot = EXG2ANTTLib.LinesAtRootEnum.exLinesAtRoot
	With .Columns
		.Add("Description")
		With .Add("Qty")
			.Editor.EditType = EXG2ANTTLib.EditTypeEnum.SpinType
			.Def(EXG2ANTTLib.DefColumnEnum.exTotalColumn) = "sum(current,rec,%1)"
		End With
		With .Add("Price")
			.Def(EXG2ANTTLib.DefColumnEnum.exTotalColumn) = "avg(current,rec,%2)"
			.Editor.EditType = EXG2ANTTLib.EditTypeEnum.SpinType
		End With
		With .Add("Amount")
			.ComputedField = "%1 * %2"
			.Def(EXG2ANTTLib.DefColumnEnum.exTotalColumn) = "sum(current,rec,%3)"
		End With
	End With
	With .Items
		r = .AddItem("Root")
		g1 = .InsertItem(r,Nothing,"Group 1")
		h = .InsertItem(g1,Nothing,"Item 1")
		.CellValue(h,1) = 1
		.CellValue(h,2) = 10
		h = .InsertItem(g1,Nothing,"Item 2")
		.CellValue(h,1) = 2
		.CellValue(h,2) = 11
		g2 = .InsertItem(r,Nothing,"Group 2")
		h = .InsertItem(g2,Nothing,"Item 1")
		.CellValue(h,1) = 3
		.CellValue(h,2) = 12
		h = .InsertItem(g2,Nothing,"Item 2")
		.CellValue(h,1) = 4
		.CellValue(h,2) = 13
		.ExpandItem(0) = True
	End With
	.EndUpdate()
	.FreezeEvents(False)
End With
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
With AxG2antt1
	With .Chart
		.PaneWidth(False) = 0
		.LevelCount = 2
		.ToolTip = ""
	End With
End With
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
Dim h1,h2,h3
With AxG2antt1
	.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",EXG2ANTTLib.LinkPropertyEnum.exLinkStyle) = 2
		.Link("L1",EXG2ANTTLib.LinkPropertyEnum.exLinkWidth) = 2
		h3 = .AddItem("Task 4")
		.AddBar(h3,"Task",#1/8/2001#,#1/10/2001#,"K3")
		.AddLink("L2",h2,"K2",h3,"K3")
		.Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkStyle) = 1
		.Link("L2",EXG2ANTTLib.LinkPropertyEnum.exLinkWidth) = 2
	End With
	.EndUpdate()
End With
2317
How can I change the tooltip's margins (method 2)

' MouseMove event - Occurs when the user moves the mouse.
Private Sub AxG2antt1_MouseMoveEvent(ByVal sender As System.Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent) Handles AxG2antt1.MouseMoveEvent
	With AxG2antt1
		.ShowToolTip(.Chart.BarFromPoint(-1,-1))
	End With
End Sub

Dim h
With AxG2antt1
	.BeginUpdate()
	.ToolTipMargin = "16,8"
	.Columns.Add("Def")
	With .Chart
		.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exNoCreateBar
		.PaneWidth(False) = 64
		.LevelCount = 2
		.FirstVisibleDate = #1/1/2010#
		.Bars.Item("Task").Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip) = "..."
	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
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

' MouseMove event - Occurs when the user moves the mouse.
Private Sub AxG2antt1_MouseMoveEvent(ByVal sender As System.Object, ByVal e As AxEXG2ANTTLib._IG2anttEvents_MouseMoveEvent) Handles AxG2antt1.MouseMoveEvent
	With AxG2antt1
		.ShowToolTip(.Chart.BarFromPoint(-1,-1))
	End With
End Sub

Dim h
With AxG2antt1
	.BeginUpdate()
	.ToolTipMargin = "16,8"
	.Columns.Add("Def")
	With .Chart
		.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exNoCreateBar
		.PaneWidth(False) = 64
		.LevelCount = 2
		.FirstVisibleDate = #1/1/2010#
		.Bars.Item("Task").Def(EXG2ANTTLib.ItemBarPropertyEnum.exBarToolTip) = "..."
	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
2315
exShowExtendedLinks

With AxG2antt1
	.BeginUpdate()
	.DefaultItemHeight = 24
	.HeaderHeight = 20
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	.AntiAliasing = True
	.Columns.Add("Task")
	With .Chart
		.PaneWidth(False) = 48
		.LevelCount = 2
		.UnitScale = EXG2ANTTLib.UnitEnum.exHour
		.FirstVisibleDate = #1/10/2024#
		With .Level(1)
			.DrawTickLines = EXG2ANTTLib.LevelLineEnum.exLevelNoLine
			.DrawTickLinesFrom(0,EXG2ANTTLib.LevelLineEnum.exLevelDotLine)
		End With
		.AllowResizeChart = &Hfffffef9 Or EXG2ANTTLib.ResizeChartEnum.exAllowChangeUnitScale Or EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartMiddle Or EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartHeader
		.ShowLinks = EXG2ANTTLib.ShowExtendedLinksEnum.exShowExtendedLinks
	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
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

With AxG2antt1
	.BeginUpdate()
	.DefaultItemHeight = 24
	.HeaderHeight = 20
	.HeaderAppearance = EXG2ANTTLib.AppearanceEnum.Etched
	.AntiAliasing = True
	.Columns.Add("Task")
	With .Chart
		.PaneWidth(False) = 48
		.LevelCount = 2
		.UnitScale = EXG2ANTTLib.UnitEnum.exHour
		.FirstVisibleDate = #1/10/2024#
		With .Level(1)
			.DrawTickLines = EXG2ANTTLib.LevelLineEnum.exLevelNoLine
			.DrawTickLinesFrom(0,EXG2ANTTLib.LevelLineEnum.exLevelDotLine)
		End With
		.AllowResizeChart = &Hfffffef9 Or EXG2ANTTLib.ResizeChartEnum.exAllowChangeUnitScale Or EXG2ANTTLib.ResizeChartEnum.exAllowResizeChartMiddle Or EXG2ANTTLib.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",EXG2ANTTLib.LinkPropertyEnum.exLinkShowRound) = 4
	End With
	.EndUpdate()
End With
2313
How to use arrows key left/right to move the cursor left/right inside the text
With AxG2antt1
	.BeginUpdate()
	With .Columns.Add("Edit").Editor
		.EditType = EXG2ANTTLib.EditTypeEnum.EditType
		.Option(EXG2ANTTLib.EditorOptionEnum.exLeftArrow) = False
		.Option(EXG2ANTTLib.EditorOptionEnum.exRightArrow) = False
	End With
	With .Items
		.AddItem("000")
		.AddItem("111")
		.AddItem("222")
	End With
	.EndUpdate()
End With
2312
How can I force the cursor to jump to the end of the editor once the user clicks the cell
With AxG2antt1
	.BeginUpdate()
	.SelBackColor = .BackColor
	.SelForeColor = .ForeColor
	With .Columns.Add("Edit").Editor
		.EditType = EXG2ANTTLib.EditTypeEnum.EditType
		.Option(EXG2ANTTLib.EditorOptionEnum.exEditSelStart) = -1
	End With
	With .Items
		.AddItem("000")
		.AddItem("111")
		.AddItem("222")
	End With
	.EndUpdate()
End With
2311
How can I show the overview with a different color except or outside the selection

With AxG2antt1
	.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
	.set_Background(EXG2ANTTLib.BackgroundPartEnum.exOverviewSelResize,1)
	.set_Background(EXG2ANTTLib.BackgroundPartEnum.exOverviewSelOut,15790320)
	.Chart.OverviewSelBackColor = RGB(255,255,255)
	.set_Background(EXG2ANTTLib.BackgroundPartEnum.exOverviewSelUnit,16777216)
	With .Chart
		.FirstVisibleDate = #6/21/2001#
		.PaneWidth(False) = 48
		.OverviewVisible = &H400 Or EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowSelMargins Or EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowMargins Or EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScaleBottom Or EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible
		.OverviewHeight = 64
		.LevelCount = 2
		.UnitScale = EXG2ANTTLib.UnitEnum.exDay
		.Label(EXG2ANTTLib.UnitEnum.exHour) = ""
		.Label(EXG2ANTTLib.UnitEnum.exMinute) = ""
		.Label(EXG2ANTTLib.UnitEnum.exSecond) = ""
		.AllowOverviewZoom = EXG2ANTTLib.OverviewZoomEnum.exAlwaysZoom
	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
2310
Resize the chart using the overview's selection left and right margins (blue)

With AxG2antt1
	.BeginUpdate()
	.BackColorLevelHeader = .BackColor
	.set_Background(EXG2ANTTLib.BackgroundPartEnum.exOverviewSelResize,16711680)
	With .Chart
		.FirstVisibleDate = #6/21/2001#
		.PaneWidth(False) = 48
		.OverviewVisible = &H400 Or EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowSelMargins Or EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowMargins Or EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScaleBottom Or EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible
		.OverviewHeight = 64
		.LevelCount = 2
		.UnitScale = EXG2ANTTLib.UnitEnum.exDay
	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
2309
Resize the chart using the overview's selection left and right margins (black)

With AxG2antt1
	.BeginUpdate()
	.BackColorLevelHeader = .BackColor
	.set_Background(EXG2ANTTLib.BackgroundPartEnum.exOverviewSelResize,1)
	With .Chart
		.FirstVisibleDate = #6/21/2001#
		.PaneWidth(False) = 48
		.OverviewVisible = &H400 Or EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowSelMargins Or EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowMargins Or EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowDateTimeScaleBottom Or EXG2ANTTLib.OverviewVisibleEnum.exOverviewShowAllVisible
		.OverviewHeight = 64
		.LevelCount = 2
		.UnitScale = EXG2ANTTLib.UnitEnum.exDay
	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
2308
Disable temporarily the column's sort, resize and drag and drop

With AxG2antt1
	.BeginUpdate()
	.OnResizeControl = EXG2ANTTLib.OnResizeControlEnum.exResizeChart
	.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 = EXG2ANTTLib.AppearanceEnum.Etched
	.Columns.Add("Index").FormatColumn = "1 index ``"
	.Columns.Add("Pos").FormatColumn = "1 apos ``"
	.Columns.Add("Edit").Editor.EditType = EXG2ANTTLib.EditTypeEnum.EditType
	.GridLineStyle = EXG2ANTTLib.GridLinesStyleEnum.exGridLinesGeometric
	.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exVLines
	.GridLineColor = RGB(224,224,224)
	With .Chart
		.AllowCreateBar = EXG2ANTTLib.CreateBarEnum.exCreateBarAuto
		.LevelCount = 2
		.FirstVisibleDate = #12/28/2000#
		.PaneWidth(False) = 196
		.GridLineStyle = EXG2ANTTLib.GridLinesStyleEnum.exGridLinesGeometric
		.DrawGridLines = EXG2ANTTLib.GridLinesEnum.exAllLines
		With .Level(1)
			.DrawGridLines = True
			.GridLineColor = AxG2antt1.GridLineColor
		End With
	End With
	.EndUpdate()
End With
2307
Adds a Finish-Start(FS) link (method 3)

Dim h1,h2
With AxG2antt1
	.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
2306
Adds a Start-Start(SS) link (method 3)

Dim h1,h2
With AxG2antt1
	.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",EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos) = 0
		.Link("Link1",EXG2ANTTLib.LinkPropertyEnum.exLinkEndPos) = 0
		.SchedulePDM(0,"")
	End With
	.EndUpdate()
End With
2305
Adds a Finish-Finish(FF) link (method 3)

Dim h1,h2
With AxG2antt1
	.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",EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos) = 2
		.Link("Link1",EXG2ANTTLib.LinkPropertyEnum.exLinkEndPos) = 2
		.SchedulePDM(0,"")
	End With
	.EndUpdate()
End With
2304
Adds a Start-Finish(SF) link (method 3)

Dim h1,h2
With AxG2antt1
	.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",EXG2ANTTLib.LinkPropertyEnum.exLinkStartPos) = 0
		.Link("Link1",EXG2ANTTLib.LinkPropertyEnum.exLinkEndPos) = 2
		.SchedulePDM(0,"")
	End With
	.EndUpdate()
End With
2303
Adds a Finish-Start(FS) link (method 2)

Dim h1,h2
With AxG2antt1
	.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,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarPredecessor) = "1FS"
		.SchedulePDM(0,"")
	End With
	.EndUpdate()
End With
2302
Adds a Start-Start(SS) link (method 2)

Dim h1,h2
With AxG2antt1
	.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,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarPredecessor) = "1SS"
		.SchedulePDM(0,"")
	End With
	.EndUpdate()
End With
2301
Adds a Finish-Finish(FF) link (method 2)

Dim h1,h2
With AxG2antt1
	.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,"",EXG2ANTTLib.ItemBarPropertyEnum.exBarPredecessor) = "1FF"
		.SchedulePDM(0,"")
	End With
	.EndUpdate()
End With