1809:
How can I display the limits/margins of the project, in the overview part of the control

With G2antt1
	.BeginUpdate 
	.VisualAppearance.Add 1,"gBFLBCJwBAEHhEJAAEhABVADg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSBcEgTDaMYzgMBYJhEMQyDSAUIjPEyMg0DjIIwgJIUaw0GSXIRkGQZC" & _
"hGJooTJQMrTZIEbQxHSkIyRVTmZACS5NRZPYy0FAkQhlFSbJBCOKwVomR5KUxTVg1DJwahLCKULLhGI7KgObIRSJOcZ1XAdCQ0cB0XpAC6LaqSA4nSjKcqwJKEZRJIyj" & _
"JwgSrrWhePoJYBVAAQPQdDYaCivK5uWK6PqKUIlZBQGQVNS1MRrLSEcwgPKgAyzDadZzfQAWTZFTQjN61RgtXR6eyoAJ0aziFDVFo0WRlEwacorGhcbgPPrCRrxGBVNw" & _
"gGOJo4kIeASB0Zw/iGDoym6dobh2XpiDWJo5HMd56h6dxjlICIEhQDQmDOIZUmQZZlAADpYHIEQ3nUGgNhCEIhAkawamAAAYEWRAGB2bA2EqYg2AyA4glgPgSgQYRIEI" & _
"FoEmEeBWBiBphFAAgPDwDgDEycQ4A0Q5IwkDwjgyWA8k4SIsmUNoPEOFJbD0DhjHINA3E8Q4eDiDojhiYJmg+Ixokic4LmKQxiCkNk2CCX4DmGaA0nAN4NBiDJSDwTgT" & _
"Eycg4E0WIYlcPJiiiMJZhCTYpgCcw5g2OYOGWGQmCkEJkheYopGoVw1GSGQuA2ExIlOQJcDOZJzEDSJNBiAgiU4Q5GCeChNHkHJygsaBzGaCYimiCY0mMNZoCMWhUDUJ" & _
"5pkYTIDk6YxwkwO5NlMOoch6JQJm4U4JCIMxWFSKbCBoKIgmJDAuDgKhohKIoTk0GhaHOJgNiMKJuDaaYzHCTYnAyaZmjSKIiDiCghjEYg6AaR4yk0OpOiFSQLAKNgjG" & _
"cQ40lkMhOmqZo7DKTpzG6Pw3CmYx2HiNAsCqBh8h6Z5bh6T4oC0G4Im+OAtlMNpTjUTYDCKVo2C3QBLi6a5bH6YY4EyehzAGO4wEwDoejwK5rnK95vDgPJsDWTBjjSWA" & _
"xnEK5aleNhriuawKi8Lp7H8HpHHGXBskyQpxguXwNgMTpDFiRZDnEExfBSPRvHuXwYkycYslae5NjMQwrDGNZxFyHINDsDRTBMKZKnKLIwm2S4xF0Jw8lKTIcm9eA0hy" & _
"QwuksM5jiyVQwnQDQIlaVo0EyLwQlGcRNCME5EjKfYXGSWEhDMQ5QnOahHG6KwoFOCoFiOaBNlcdIjiQag7HOL0dwuxKC1aeNQI4BQihNDoEwXowxmh8CIL8Yg8ROBfA" & _
"SMcaIOR6CHBkMgLgrwUjLHkHMG4NQaBzE4MQaIyw5gxEsH0Dw9FBBNA6PUDoLwpjTHqF0N4WQShSHgGwcY2RkhdFCL8bYdwOivDqNse4fRnh5G+PYEgaR1B0E4B4D4ix" & _
"xB4G8E8SI5R8D+DeJUc4eRPB/EaJ8DwpwojDHUPofwtxYjtH2F4d4sx3j7E+AcXo8B9geFCNYOIHhfg/GmPQPoXw3jZHuPoX4hxuj1H8J8T43RPhDEgM8eo/B/iQGuPw" & _
"fxEh1guAIAwQAgCAg"
	.BackColorLevelHeader = .BackColor
	With .Chart
		.LevelCount = 2
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 48
		.OverviewVisible = &H400 Or OverviewVisibleEnum.exOverviewShowSelMargins Or OverviewVisibleEnum.exOverviewShowMargins Or OverviewVisibleEnum.exOverviewShowDateTimeScaleBottom Or OverviewVisibleEnum.exOverviewShowAllVisible
		.OverviewHeight = 64
		.OverviewSelBackColor = &H1000000
		.OverviewBackColor = RGB(250,250,250)
	End With
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/11/2001#
		.AddBar .AddItem("Item 2"),"Task",#2/2/2001#,#2/11/2001#
		.AddBar .AddItem("Item 3"),"Task",#3/2/2001#,#3/11/2001#
	End With
	.EndUpdate 
End With
1808:
Is it possible to display a time-scale for the overview part of the control (separated)

With G2antt1
	.BeginUpdate 
	.BackColorLevelHeader = .BackColor
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 48
		.OverviewVisible = OverviewVisibleEnum.exOverviewShowDateTimeScaleSplit Or OverviewVisibleEnum.exOverviewShowAllVisible
		.OverviewHeight = 48
		.LevelCount = 2
	End With
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/11/2001#
		.AddBar .AddItem("Item 2"),"Task",#2/2/2001#,#2/11/2001#
		.AddBar .AddItem("Item 3"),"Task",#3/2/2001#,#3/11/2001#
	End With
	.EndUpdate 
End With
1807:
Is it possible to display a time-scale for the overview part of the control

With G2antt1
	.BeginUpdate 
	.BackColorLevelHeader = .BackColor
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 48
		.OverviewVisible = OverviewVisibleEnum.exOverviewShowDateTimeScale Or OverviewVisibleEnum.exOverviewShowAllVisible
		.LevelCount = 2
	End With
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/11/2001#
		.AddBar .AddItem("Item 2"),"Task",#2/2/2001#,#2/11/2001#
		.AddBar .AddItem("Item 3"),"Task",#3/2/2001#,#3/11/2001#
	End With
	.EndUpdate 
End With
1806:
How can I display the time-scale only, in the overview part of the control

With G2antt1
	.BeginUpdate 
	.BackColorLevelHeader = .BackColor
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 48
		.OverviewVisible = OverviewVisibleEnum.exOverviewShowDateTimeScale Or OverviewVisibleEnum.exOverviewHideBars Or OverviewVisibleEnum.exOverviewShowAllVisible
		.LevelCount = 2
	End With
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/11/2001#
		.AddBar .AddItem("Item 2"),"Task",#2/2/2001#,#2/11/2001#
		.AddBar .AddItem("Item 3"),"Task",#3/2/2001#,#3/11/2001#
	End With
	.EndUpdate 
End With
1805:
How can I detect that the mouse pointer is within an InsideZoom object
' MouseMove event - Occurs when the user moves the mouse.
Private Sub G2antt1_MouseMove(Button As Integer,Shift As Integer,X As Single,Y As Single)
	With G2antt1
		With .Chart
			d = .DateFromPoint(-1,-1)
			Set iz = .InsideZooms.Contains(d)
			Debug.Print( d )
			Debug.Print( "If the iz object is nothing, the date is not zoomed, else it is." )
			Debug.Print( iz )
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(0) = 0
		.LevelCount = 2
		.FirstWeekDay = exMonday
		.AllowInsideZoom = True
		.InsideZooms.Add #1/10/2001#
	End With
	.EndUpdate 
End With
1804:
Is it possible to word-wrap text/caption on the bar, so it gets displayed on multiple lines

With G2antt1
	.BeginUpdate 
	.ScrollBySingleLine = True
	.ItemsAllowSizing = exResizeItem
	.DrawGridLines = exHLines
	.HeaderHeight = 28
	.DefaultItemHeight = 24
	.BackColorLevelHeader = .BackColor
	.HeaderAppearance = Bump
	.Columns.Add "Tasks"
	With .Chart
		.LevelCount = 2
		.PaneWidth(False) = 128
		.FirstVisibleDate = #1/1/2001#
		.DrawGridLines = exHLines
		With .Bars.Copy("Task","TaskB")
			.Height = 15
			.Pattern = exPatternBox
			.StartColor = RGB(204,232,255)
			.EndColor = .StartColor
			.Color = RGB(0,0,255)
		End With
		With .Bars.Item("Task")
			.Height = -1
			.Pattern = exPatternBox
			.StartColor = RGB(204,232,255)
			.EndColor = .StartColor
			.Color = RGB(0,0,255)
		End With
	End With
	With .Items
		h = .AddItem("Word-Wrap Inside")
		.AddBar h,"Task",#1/9/2001#,#1/13/2001#,"A1"
		.ItemBar(h,"A1",exBarBackgroundExt) = "none[(2,2,100%-4,100%-4),text=`This is a bit of text that should break the line`,wordwrap]"
		h = .AddItem("Word-Wrap Inside")
		.AddBar h,"Task",#1/5/2001#,#1/19/2001#,"A2"
		.ItemBar(h,"A2",exBarBackgroundExt) = "none[(2,2,100%-4,100%-4),align=0x11,text=`This is a bit of text that should break the line`,wordwrap]"
		h = .AddItem("Word-Wrap Back")
		.AddBar h,"TaskB",#1/9/2001#,#1/13/2001#,"A3"
		.ItemBar(h,"A3",exBarBackgroundExt) = "client[align=0x11,text=`This is a bit of text that should break the line`,wordwrap]"
		.ItemBar(h,"A3",exBarBackgroundExtFlags) = 2
	End With
	.EndUpdate 
End With
1803:
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
With G2antt1
	.BeginUpdate 
	.ColumnAutoResize = True
	.ContinueColumnScroll = 0
	.MarkSearchColumn = False
	.SearchColumnIndex = 1
	.FilterBarHeight = 0
	.FilterBarPromptVisible = True
	.Chart.PaneWidth(True) = 0
	With .Columns
		.Add("Name").Width = 96
		.Add("Title").Width = 96
		.Add "City"
	End With
	With .Items
		h0 = .AddItem("Nancy Davolio")
		.CellValue(h0,1) = "Sales Representative"
		.CellValue(h0,2) = "Seattle"
		h0 = .AddItem("Andrew Fuller")
		.CellValue(h0,1) = "Vice President, Sales"
		.CellValue(h0,2) = "Tacoma"
		.SelectItem(h0) = True
		h0 = .AddItem("Janet Leverling")
		.CellValue(h0,1) = "Sales Representative"
		.CellValue(h0,2) = "Kirkland"
		h0 = .AddItem("Margaret Peacock")
		.CellValue(h0,1) = "Sales Representative"
		.CellValue(h0,2) = "Redmond"
		h0 = .AddItem("Steven Buchanan")
		.CellValue(h0,1) = "Sales Manager"
		.CellValue(h0,2) = "London"
		h0 = .AddItem("Michael Suyama")
		.CellValue(h0,1) = "Sales Representative"
		.CellValue(h0,2) = "London"
		h0 = .AddItem("Robert King")
		.CellValue(h0,1) = "Sales Representative"
		.CellValue(h0,2) = "London"
		h0 = .AddItem("Laura Callahan")
		.CellValue(h0,1) = "Inside Sales Coordinator"
		.CellValue(h0,2) = "Seattle"
		h0 = .AddItem("Anne Dodsworth")
		.CellValue(h0,1) = "Sales Representative"
		.CellValue(h0,2) = "London"
	End With
	.FilterBarPromptPattern = "London"
	.EndUpdate 
End With
1802:
How to load a hierarchy using the control's DataSource property (Parent-ID-Relation)

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.SetParent Item,.FindItem(.CellValue(Item,"ReportsTo"),"EmployeeID")
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Chart.PaneWidth(True) = 0
	.LinesAtRoot = exLinesAtRoot
	.ColumnAutoResize = False
	.ContinueColumnScroll = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "SELECT * FROM Employees ORDER BY ReportsTo","Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\VB\SAMPLE.MDB",3,3
	End With
	.DataSource = rs
	.Items.ExpandItem(0) = True
	.EndUpdate 
End With
1801:
How can I highlight the limits/margins of a summary bar, according with the child bars

With G2antt1
	.BeginUpdate 
	With .VisualAppearance
		.Add 1,"gBFLBCJwBAEHhEJAAEhABRkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjhwkAIIQK/cZRPC0Ow8GSEZAgOKIch6FgCQjEIxDKIsVRZEiDYRmGLpIiOJoWSQBUIyJKoA" & _
"Q0f6fIziaTpNiGL4yTBPMzyJRcEx1GyBZ5negaAo2AwIQiUBomGahajkMqZQAJaCSCI2Y4eDZCIoTXR1WAxDq3ZruKpLUpOc4DOrEMIwCEBA="
		.Add 2,"CP:1 -4 0 5 0"
		.Add 3,"gBFLBCJwBAEHhEJAAEhABOMGACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQRHc5TN" & _
"CMTRRECDY4kAYpAiKRYbSpAcyQHQ8bQtHwYKAoOg6JjWIAHRqCMI0XINHQ3FwaRJsCwoJhOZIDWZENDQTSsLSxJSkIRfe4wArNf4XVBVMqSdKEZRJLybJwADApAo2eIl" & _
"QjJdQ4TSdBSdQwDLYhECpbwCT6JT7jGLQJZsNyvBLIYDrKA8UozFqHQRYNhxDZNShhM6rMigPQQAq8AKlRbVNzXLamLwHRS9BpoORhUjHD4bVxVOyaPpAAaBFbhI44QZ" & _
"OHYNYfjgaI0BySp8HMVZdlgaxtBqexWkqOw1lGbZzlwfQ0AwYR/gka5FiMGpgkQYYviGV4kBUWpmlsaYGHMEgACECQUAaEYMHQHRHCGFRBECRJkGQQgTGCVBoDYQhCgQ" & _
"JZoG4EIAGEFwGB+dwxHaB5iAabReggYhGnUToJGIRgCCiCBdjiNguGmYo4gIKoMGIKIeDSCYTGiXg4EITo3hAiJAICA=="
	End With
	.Columns.Add "Task"
	With .Chart
		.PaneWidth(False) = 128
		.FirstVisibleDate = #1/1/2001#
		.Bars.Item("Summary").Color = &H3000000
	End With
	With .Items
		hSummary = .AddItem("Summary")
		.AddBar hSummary,"Summary",#1/2/2001#,#1/2/2001#,""
		hTask = .InsertItem(hSummary,,"Task A")
		.AddBar hTask,"Task",#1/2/2001#,#1/5/2001#,"K1"
		hTask = .InsertItem(hSummary,,"Task B")
		.AddBar hTask,"Task",#1/4/2001#,#1/8/2001#,"K2"
		hTask = .InsertItem(hSummary,,"Task C")
		.AddBar hTask,"Task",#1/6/2001#,#1/10/2001#,"K3"
		.ExpandItem(hSummary) = True
		.DefineSummaryBars hSummary,"",-1,"<*>"
		.ItemBar(hSummary,"",exSummaryBarBackColor) = 33554432
	End With
	.EndUpdate 
End With
1800:
How can I highlight somehow the child bars of a summary bar

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	With .Chart
		.PaneWidth(False) = 128
		.FirstVisibleDate = #1/1/2001#
		.Bars.Item("Task").Color = RGB(240,240,240)
	End With
	With .Items
		hSummary = .AddItem("Summary")
		.AddBar hSummary,"Project Summary",#1/2/2001#,#1/2/2001#,""
		hTask = .InsertItem(hSummary,,"Task A")
		.AddBar hTask,"Task",#1/2/2001#,#1/5/2001#,"K1"
		hTask = .InsertItem(hSummary,,"Task B")
		.AddBar hTask,"Task",#1/4/2001#,#1/8/2001#,"K2"
		hTask = .InsertItem(hSummary,,"Task C")
		.AddBar hTask,"Task",#1/6/2001#,#1/10/2001#,"K3"
		.ExpandItem(hSummary) = True
		.DefineSummaryBars hSummary,"",-1,"<*>"
		.ItemBar(hSummary,"",exSummaryBarBackColor) = 65536
		.ItemBar(hSummary,"",exSummaryBarBackColorTransparent) = 50
	End With
	.EndUpdate 
End With
1799:
How do I change the color for the selected bars, without showing the frame arround

With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #1/1/2002#
		.SelBarColor = &H7f0000ff
		.PaneWidth(0) = 48
	End With
	.Columns.Add "Task"
	With .Items
		.AddBar .AddItem("Task 1"),"Task",#1/2/2002#,#1/4/2002#,"A"
		.AddBar .AddItem("Task 2"),"Task",#1/6/2002#,#1/10/2002#,"B"
		.AddBar .AddItem("Task 3"),"Task",#1/11/2002#,#1/14/2002#,"C"
		.ItemBar(0,"<A B>",exBarSelected) = True
	End With
	.EndUpdate 
End With
1798:
Is it possible to enumerate the activities/bars of critical path

' BarResize event - Occurs when a bar is moved or resized.
Private Sub G2antt1_BarResize(ByVal Item As EXG2ANTTLibCtl.HITEM,ByVal Key As Variant)
	With G2antt1
		.Items.SchedulePDM Item,Key
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Chart
		.LevelCount = 2
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 96
		.Bars.Item("Task").Def(exBarCaption) = "<%=int(%269) > 0 ? (`<b>` + %269 + `</b>`) : ``%>"
	End With
	With .Items
		hSummary1 = .AddItem("Summary")
		.ItemBold(hSummary1) = True
		.AddBar hSummary1,"Summary",#1/2/2001#,#1/2/2001#,"sum"
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task",#1/2/2001#,#1/4/2001#
		.DefineSummaryBars hSummary1,"sum",h1,""
		h2 = .AddItem("Task 2")
		.AddBar h2,"Task",#1/2/2001#,#1/4/2001#
		.DefineSummaryBars hSummary1,"sum",h2,""
		.AddLink "L1",h1,"",h2,""
		h3 = .AddItem("Task 3")
		.AddBar h3,"Task",#1/2/2001#,#1/4/2001#
		.DefineSummaryBars hSummary1,"sum",h3,""
		.AddLink "L2",h2,"",h3,""
		h4 = .AddItem("Task 4")
		.AddBar h4,"Task",#1/2/2001#,#1/4/2001#
		.DefineSummaryBars hSummary1,"sum",h4,""
		.AddLink "L3",h1,"",h4,""
		.DefSchedulePDM(exPDMCriticalPathBarColor) = 65280
		.SchedulePDM h1,""
	End With
	.EndUpdate 
End With
1797:
How can I add a SF link

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	With .Chart
		.FirstVisibleDate = #12/25/2000#
		.PaneWidth(False) = 48
		.LevelCount = 2
	End With
	With .Items
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task",#1/2/2001#,#1/4/2001#,"K1"
		h2 = .AddItem("Task 2")
		.AddBar h2,"Task",#1/2/2001#,#1/5/2001#,"K2"
		h3 = .AddItem("Task 3")
		.AddBar h3,"Task",#1/2/2001#,#1/5/2001#,"K3"
		h4 = .AddItem("Task 4")
		.AddBar h4,"Task",#1/2/2001#,#1/5/2001#,"K4"
		h5 = .AddItem("Task 5")
		.AddBar h5,"Task",#1/2/2001#,#1/5/2001#,"K5"
		.AddLink "L1",h1,"K1",h2,"K2"
		.AddLink "L2",h2,"K2",h3,"K3"
		.AddLink "L3",h3,"K3",h4,"K4"
		.AddLink "L4",h4,"K4",h5,"K5"
		.Link("L4",exLinkStartPos) = 0
		.Link("L4",exLinkEndPos) = 2
		.Link("L4",exLinkColor) = 65280
		.SchedulePDM 0,"K5"
	End With
	.Chart.ShowLinks = exShowExtendedLinks
	.EndUpdate 
End With
1796:
How do I get the Start and End date of a bar

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	.Debug = True
	With .Chart
		.FirstVisibleDate = #9/20/2006#
		.LevelCount = 2
		.PaneWidth(0) = 96
	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"
		h = .ItemByIndex(1)
		.ItemBold(h) = True
		Debug.Print( "Start of " )
		Debug.Print( .FirstItemBar(h) )
		Debug.Print( .ItemBar(h,.FirstItemBar(h),exBarStart) )
		Debug.Print( "End of  " )
		Debug.Print( .FirstItemBar(h) )
		Debug.Print( .ItemBar(h,.FirstItemBar(h),exBarEnd) )
	End With
	.EndUpdate 
End With
1795:
I haven't found options to change/localize (in German, or my current regional settings) the captions/text/strings ( dates, tooltip ) that shows in the chart area (method 2)

With G2antt1
	With .Chart
		.FirstWeekDay = .LocFirstWeekDay
		.MonthNames = .LocMonthNames
		.WeekDays = .LocWeekDays
		.AMPM = .LocAMPM
		.LevelCount = 2
		.PaneWidth(False) = 0
		.UnitScale = exDay
	End With
End With
1794:
Is it possible to change caption of the print and print preview, as it just says "Untitled Document", but I cant find the code that writes this caption

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	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"
	End With
	.EndUpdate 
	With CreateObject("Exontrol.Print")
		.Caption = "This is your new caption for print and print preview"
		.AutoRelease = False
		.PrintExt = G2antt1.Object
		.Preview 
	End With
End With
1793:
Is it possible to specify the A4 paper size for the print preview
With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	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"
	End With
	.EndUpdate 
	With CreateObject("Exontrol.Print")
		.Settings(0) = 9
		.AutoRelease = False
		.PrintExt = G2antt1.Object
		.Preview 
	End With
End With
1792:
Is it possible to tell the print preview to open up in "landscape mode" by default, not in "portrait mode"
With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	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"
	End With
	.EndUpdate 
	With CreateObject("Exontrol.Print")
		.PageOrientation = 2
		.AutoRelease = False
		.PrintExt = G2antt1.Object
		.Preview 
	End With
End With
1791:
How do I prevent a caption outside the bar from overlapping other bars

With G2antt1
	.BeginUpdate 
	.ScrollBySingleLine = True
	.Columns.Add "Task"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 48
		.Bars.Copy "Task","Default-Task"
		.Bars.Item("Task").OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption Or OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or OverlaidBarsTypeEnum.exOverlaidBarsStack
	End With
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"A1","task"
		.ItemBar(h,"A1",exBarHAlignCaption) = 18
		.AddBar h,"Task",#1/6/2001#,#1/10/2001#,"A2","task"
		.ItemBar(h,"A2",exBarHAlignCaption) = 16
		h = .AddItem("Task 2")
		.AddBar h,"Default-Task",#1/2/2001#,#1/4/2001#,"A1","task"
		.ItemBar(h,"A1",exBarHAlignCaption) = 18
		.AddBar h,"Default-Task",#1/6/2001#,#1/10/2001#,"A2","task"
		.ItemBar(h,"A2",exBarHAlignCaption) = 16
	End With
	.EndUpdate 
End With
1790:
How do I clip/hide/align the bar's extra-caption/text based on the bar's size/width/length

With G2antt1
	.BeginUpdate 
	.Columns.Add "Clip"
	.ScrollBySingleLine = True
	.DrawGridLines = exRowLines
	With .Chart
		.AllowResizeChart = ResizeChartEnum.exAllowResizeChartMiddle Or ResizeChartEnum.exAllowResizeChartHeader
		.DrawGridLines = exRowLines
		.FirstVisibleDate = #12/23/2000#
		.LevelCount = 2
		.PaneWidth(False) = 216
		With .Bars.Item("Task")
			.Pattern = exPatternBox
			.Color = RGB(164,164,164)
			.StartColor = RGB(240,240,240)
			.EndColor = .StartColor
			.OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption Or OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or OverlaidBarsTypeEnum.exOverlaidBarsStack
			.Height = 15
		End With
		.MinUnitWidth = .UnitWidth
	End With
	With .Items
		h = .AddItem("no clip, (0-2)")
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"K1"
		.ItemBar(h,"K1",exBarExtraCaption) = "no clip, right(<b>2</b>)"
		.ItemBar(h,"K1",exBarExtraCaptionHAlign) = 2
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"K2"
		.ItemBar(h,"K2",exBarExtraCaption) = "no clip, center(<b>1</b>)"
		.ItemBar(h,"K2",exBarExtraCaptionHAlign) = 1
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"K3",""
		.ItemBar(h,"K3",exBarExtraCaption) = "no clip, left(<b>0</b>)"
		.ItemBar(h,"K3",exBarExtraCaptionHAlign) = 0
		h = .AddItem("clip, inside (3-5)")
		.AddBar h,"Task",#12/28/2000#,#1/8/2001#,"K1"
		.ItemBar(h,"K1",exBarExtraCaption) = "clip, inside, right(<b>5</b>)"
		.ItemBar(h,"K1",exBarExtraCaptionHAlign) = 5
		.AddBar h,"Task",#12/28/2000#,#1/8/2001#,"K2"
		.ItemBar(h,"K2",exBarExtraCaption) = "clip, inside, center(<b>4</b>)"
		.ItemBar(h,"K2",exBarExtraCaptionHAlign) = 4
		.AddBar h,"Task",#12/28/2000#,#1/8/2001#,"K3"
		.ItemBar(h,"K3",exBarExtraCaption) = "clip, inside, left(<b>3</b>)"
		.ItemBar(h,"K3",exBarExtraCaptionHAlign) = 3
		h = .AddItem("hide on min width, clip if not fit, inside (6-8)")
		.AddBar h,"Task",#12/26/2000#,#1/10/2001#,"K1"
		.ItemBar(h,"K1",exBarExtraCaption) = "hide on min width, clip if not fit, inside, right(<b>8</b>)"
		.ItemBar(h,"K1",exBarExtraCaptionHAlign) = 8
		.AddBar h,"Task",#12/26/2000#,#1/10/2001#,"K2"
		.ItemBar(h,"K2",exBarExtraCaption) = "hide on min width, clip if not fit, inside, center(<b>7</b>)"
		.ItemBar(h,"K2",exBarExtraCaptionHAlign) = 7
		.AddBar h,"Task",#12/26/2000#,#1/10/2001#,"K3"
		.ItemBar(h,"K3",exBarExtraCaption) = "hide on min width, clip if not fit, inside, left(<b>6</b>)"
		.ItemBar(h,"K3",exBarExtraCaptionHAlign) = 6
		h = .AddItem("hide if not fit, no clip, inside (9-11)")
		.AddBar h,"Task",#12/28/2000#,#1/8/2001#,"K1"
		.ItemBar(h,"K1",exBarExtraCaption) = "hide if not fit, no clip, inside, right(<b>11</b>)"
		.ItemBar(h,"K1",exBarExtraCaptionHAlign) = 11
		.AddBar h,"Task",#12/28/2000#,#1/8/2001#,"K2"
		.ItemBar(h,"K2",exBarExtraCaption) = "hide if not fit, no clip, center(<b>10</b>)"
		.ItemBar(h,"K2",exBarExtraCaptionHAlign) = 10
		.AddBar h,"Task",#12/28/2000#,#1/8/2001#,"K3"
		.ItemBar(h,"K3",exBarExtraCaption) = "hide if not fit, no clip, inside, left(<b>9</b>)"
		.ItemBar(h,"K3",exBarExtraCaptionHAlign) = 9
		h = .AddItem("no clip, inside, outside (12-14)")
		.AddBar h,"Task",#12/28/2000#,#1/8/2001#,"K1"
		.ItemBar(h,"K1",exBarExtraCaption) = "no clip, inside, outside, right(<b>14</b>)"
		.ItemBar(h,"K1",exBarExtraCaptionHAlign) = 14
		.AddBar h,"Task",#12/28/2000#,#1/8/2001#,"K2"
		.ItemBar(h,"K2",exBarExtraCaption) = "no clip, inside, outside, center(<b>13</b>)"
		.ItemBar(h,"K2",exBarExtraCaptionHAlign) = 13
		.AddBar h,"Task",#12/28/2000#,#1/8/2001#,"K3"
		.ItemBar(h,"K3",exBarExtraCaption) = "no clip, inside, outside, left(<b>12</b>)"
		.ItemBar(h,"K3",exBarExtraCaptionHAlign) = 12
		h = .AddItem("no clip, outside (16-18)")
		.AddBar h,"Task",#12/30/2000#,#1/6/2001#,"K1"
		.ItemBar(h,"K1",exBarExtraCaption) = "no clip, outside, right(<b>18</b>)"
		.ItemBar(h,"K1",exBarExtraCaptionHAlign) = 18
		.AddBar h,"Task",#12/30/2000#,#1/6/2001#,"K2"
		.ItemBar(h,"K2",exBarExtraCaption) = "no clip, outside, center(<b>17</b>)"
		.ItemBar(h,"K2",exBarExtraCaptionHAlign) = 17
		.AddBar h,"Task",#12/30/2000#,#1/6/2001#,"K3"
		.ItemBar(h,"K3",exBarExtraCaption) = "no clip, outside, left(<b>16</b>)"
		.ItemBar(h,"K3",exBarExtraCaptionHAlign) = 16
	End With
	.EndUpdate 
End With
1789:
What options do I have to show the links between bars (rectangular SEV, starts vertically, ends vertically)

With G2antt1
	.BeginUpdate 
	.AntiAliasing = True
	.Columns.Add "Task"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 128
		.NonworkingDays = 0
		.LinksWidth = 2
	End With
	With .Items
		.AddItem ""
		h3 = .AddItem("Task 3")
		.AddItem ""
		.AddBar h3,"Task",#1/13/2001#,#1/15/2001#,"K3"
		h1 = .AddItem("Task 1")
		.AddItem ""
		.AddBar h1,"Task",#1/2/2001#,#1/4/2001#,"K1"
		h2 = .AddItem("Task 2")
		.AddBar h2,"Task",#1/7/2001#,#1/9/2001#,"K2"
		.AddItem ""
		.AddLink "L1",h1,"K1",h2,"K2"
		.AddLink "L2",h2,"K2",h3,"K3"
		.Link("<*>",exLinkShowRound) = 5
	End With
	.EndUpdate 
End With
1788:
What options do I have to show the links between bars (rectangular SV, starts vertically, ends horizontally)

With G2antt1
	.BeginUpdate 
	.AntiAliasing = True
	.Columns.Add "Task"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 128
		.NonworkingDays = 0
		.LinksWidth = 2
	End With
	With .Items
		.AddItem ""
		h3 = .AddItem("Task 3")
		.AddItem ""
		.AddBar h3,"Task",#1/13/2001#,#1/15/2001#,"K3"
		h1 = .AddItem("Task 1")
		.AddItem ""
		.AddBar h1,"Task",#1/2/2001#,#1/4/2001#,"K1"
		h2 = .AddItem("Task 2")
		.AddBar h2,"Task",#1/7/2001#,#1/9/2001#,"K2"
		.AddItem ""
		.AddLink "L1",h1,"K1",h2,"K2"
		.AddLink "L2",h2,"K2",h3,"K3"
		.Link("<*>",exLinkShowRound) = 4
	End With
	.EndUpdate 
End With
1787:
What options do I have to show the links between bars (rectangular EV, starts horizontally, ends vertically)

With G2antt1
	.BeginUpdate 
	.AntiAliasing = True
	.Columns.Add "Task"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 128
		.NonworkingDays = 0
		.LinksWidth = 2
	End With
	With .Items
		.AddItem ""
		h3 = .AddItem("Task 3")
		.AddItem ""
		.AddBar h3,"Task",#1/13/2001#,#1/15/2001#,"K3"
		h1 = .AddItem("Task 1")
		.AddItem ""
		.AddBar h1,"Task",#1/2/2001#,#1/4/2001#,"K1"
		h2 = .AddItem("Task 2")
		.AddBar h2,"Task",#1/7/2001#,#1/9/2001#,"K2"
		.AddItem ""
		.AddLink "L1",h1,"K1",h2,"K2"
		.AddLink "L2",h2,"K2",h3,"K3"
		.Link("<*>",exLinkShowRound) = 3
	End With
	.EndUpdate 
End With
1786:
What options do I have to show the links between bars (straight)

With G2antt1
	.BeginUpdate 
	.AntiAliasing = True
	.Columns.Add "Task"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 128
		.NonworkingDays = 0
		.LinksWidth = 2
	End With
	With .Items
		.AddItem ""
		h3 = .AddItem("Task 3")
		.AddItem ""
		.AddBar h3,"Task",#1/13/2001#,#1/15/2001#,"K3"
		h1 = .AddItem("Task 1")
		.AddItem ""
		.AddBar h1,"Task",#1/2/2001#,#1/4/2001#,"K1"
		h2 = .AddItem("Task 2")
		.AddBar h2,"Task",#1/7/2001#,#1/9/2001#,"K2"
		.AddItem ""
		.AddLink "L1",h1,"K1",h2,"K2"
		.AddLink "L2",h2,"K2",h3,"K3"
		.Link("<*>",exLinkShowRound) = 2
	End With
	.EndUpdate 
End With
1785:
What options do I have to show the links between bars (direct)

With G2antt1
	.BeginUpdate 
	.AntiAliasing = True
	.Columns.Add "Task"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 128
		.NonworkingDays = 0
		.LinksWidth = 2
	End With
	With .Items
		.AddItem ""
		h3 = .AddItem("Task 3")
		.AddItem ""
		.AddBar h3,"Task",#1/13/2001#,#1/15/2001#,"K3"
		h1 = .AddItem("Task 1")
		.AddItem ""
		.AddBar h1,"Task",#1/2/2001#,#1/4/2001#,"K1"
		h2 = .AddItem("Task 2")
		.AddBar h2,"Task",#1/7/2001#,#1/9/2001#,"K2"
		.AddItem ""
		.AddLink "L1",h1,"K1",h2,"K2"
		.AddLink "L2",h2,"K2",h3,"K3"
		.Link("<*>",exLinkShowRound) = 1
	End With
	.EndUpdate 
End With
1784:
What options do I have to show the links between bars (round)

With G2antt1
	.BeginUpdate 
	.AntiAliasing = True
	.Columns.Add "Task"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 128
		.NonworkingDays = 0
		.LinksWidth = 2
	End With
	With .Items
		.AddItem ""
		h3 = .AddItem("Task 3")
		.AddItem ""
		.AddBar h3,"Task",#1/13/2001#,#1/15/2001#,"K3"
		h1 = .AddItem("Task 1")
		.AddItem ""
		.AddBar h1,"Task",#1/2/2001#,#1/4/2001#,"K1"
		h2 = .AddItem("Task 2")
		.AddBar h2,"Task",#1/7/2001#,#1/9/2001#,"K2"
		.AddItem ""
		.AddLink "L1",h1,"K1",h2,"K2"
		.AddLink "L2",h2,"K2",h3,"K3"
		.Link("<*>",exLinkShowRound) = -1
	End With
	.EndUpdate 
End With
1783:
What options do I have to show the links between bars (rectangular, default)

With G2antt1
	.BeginUpdate 
	.AntiAliasing = True
	.Columns.Add "Task"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 128
		.NonworkingDays = 0
		.LinksWidth = 2
	End With
	With .Items
		.AddItem ""
		h3 = .AddItem("Task 3")
		.AddItem ""
		.AddBar h3,"Task",#1/13/2001#,#1/15/2001#,"K3"
		h1 = .AddItem("Task 1")
		.AddItem ""
		.AddBar h1,"Task",#1/2/2001#,#1/4/2001#,"K1"
		h2 = .AddItem("Task 2")
		.AddBar h2,"Task",#1/7/2001#,#1/9/2001#,"K2"
		.AddItem ""
		.AddLink "L1",h1,"K1",h2,"K2"
		.AddLink "L2",h2,"K2",h3,"K3"
		.Link("<*>",exLinkShowRound) = 0
	End With
	.EndUpdate 
End With
1782:
I have a question about whether the control has the functionality to add two bars on the same item, as one would correspond to the item bar and another bar their progress, but progress is required to show dividedly at different times outside the activity bar item

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	.BackColorLevelHeader = .BackColor
	With .Chart
		.LevelCount = 2
		.FirstVisibleDate = #9/20/2006#
		.PaneWidth(0) = 64
		With .Bars.Copy("Progress","TProgressD")
			.Def(exBarHAlignCaption) = 18
			.Shape = exShapeThinDown
		End With
		With .Bars.Copy("Progress","TProgressC")
			.Def(exBarHAlignCaption) = 18
		End With
		With .Bars.Copy("Progress","TProgressU")
			.Def(exBarHAlignCaption) = 18
			.Shape = exShapeThinUp
		End With
	End With
	With .Items
		h = .AddItem("Task")
		.AddBar h,"Task",#9/25/2006#,#9/30/2006#,"T1"
		.AddBar h,"TProgressU",#9/25/2006#,#10/4/2006#,"TP1"
		.GroupBars h,"T1",True,h,"TP1",True,3
		.ItemBar(h,"TP1",exBarCaption) = "<font ;6>progress up"
		h = .AddItem("Task")
		.AddBar h,"Task",#9/26/2006#,#10/1/2006#,"T2"
		.AddBar h,"TProgressC",#9/26/2006#,#10/5/2006#,"TP2"
		.GroupBars h,"T2",True,h,"TP2",True,3
		.ItemBar(h,"TP2",exBarCaption) = "<font ;6>progress center"
		h = .AddItem("Task")
		.AddBar h,"Task",#9/25/2006#,#9/30/2006#,"T3"
		.AddBar h,"TProgressD",#9/25/2006#,#10/6/2006#,"TP3"
		.GroupBars h,"T3",True,h,"TP3",True,3
		.ItemBar(h,"TP3",exBarCaption) = "<font ;6>progress down"
	End With
	.EndUpdate 
End With
1781:
I have a column of date-type, the question is how can I move the associated bar, instead of resizing it (summary, inclusive, working)

With G2antt1
	.BeginUpdate 
	.MarkSearchColumn = False
	.Indent = 11
	.HasLines = exSolidLine
	.Items.AllowCellValueToItemBar = True
	With .Columns
		.Add "Tasks"
		With .Add("Start")
			.Def(exCellValueToItemBarProperty) = 544
			.Editor.EditType = DateType
			.LevelKey = 1
		End With
		With .Add("End")
			.Def(exCellValueToItemBarProperty) = 546
			.Editor.EditType = DateType
			.LevelKey = 1
		End With
	End With
	With .Chart
		.FirstVisibleDate = #9/20/2006#
		.AllowLinkBars = False
		.AllowCreateBar = exNoCreateBar
		.LevelCount = 2
		.PaneWidth(0) = 224
		With .Bars
			With .Add("Underline")
				.Color = RGB(0,0,255)
				.Shape = exShapeThinDown
			End With
			With .Add("Task:Underline")
				.Shortcut = "T"
				.Def(exBarKeepWorkingCount) = True
			End With
		End With
	End With
	With .Items
		h = .AddItem("Project")
		.AddBar h,"Summary",#9/21/2006#,#10/3/2006#
		h1 = .InsertItem(h,,"Task 1")
		.AddBar h1,"T",#9/21/2006#,#9/24/2006#
		h2 = .InsertItem(h,,"Task 2")
		.AddBar h2,"T",#9/24/2006#,#9/28/2006#
		h3 = .InsertItem(h,,"Task 3")
		.AddBar h3,"T",#9/28/2006#,#10/3/2006#
		.DefineSummaryBars h,"",h1,""
		.DefineSummaryBars h,"",h2,""
		.DefineSummaryBars h,"",h3,""
		.ExpandItem(h) = True
		.ItemBold(h) = True
		.ItemBar(h,"",exBarMoveStart) = #9/22/2006#
	End With
	.EndUpdate 
End With
1780:
I have a column of date-type, the question is how can I move the associated bar, instead of resizing it (summary)

With G2antt1
	.BeginUpdate 
	.MarkSearchColumn = False
	.Indent = 11
	.HasLines = exSolidLine
	.Items.AllowCellValueToItemBar = True
	With .Columns
		.Add "Tasks"
		With .Add("Start")
			.Def(exCellValueToItemBarProperty) = 544
			.Editor.EditType = DateType
			.LevelKey = 1
		End With
		With .Add("End")
			.Def(exCellValueToItemBarProperty) = 545
			.Editor.EditType = DateType
			.LevelKey = 1
		End With
	End With
	With .Chart
		.FirstVisibleDate = #9/20/2006#
		.AllowLinkBars = False
		.AllowCreateBar = exNoCreateBar
		.LevelCount = 2
		.PaneWidth(0) = 224
	End With
	With .Items
		h = .AddItem("Project")
		.AddBar h,"Summary",#9/21/2006#,#10/3/2006#
		h1 = .InsertItem(h,,"Task 1")
		.AddBar h1,"Task",#9/21/2006#,#9/24/2006#
		h2 = .InsertItem(h,,"Task 2")
		.AddBar h2,"Task",#9/24/2006#,#9/28/2006#
		h3 = .InsertItem(h,,"Task 3")
		.AddBar h3,"Task",#9/28/2006#,#10/3/2006#
		.DefineSummaryBars h,"",h1,""
		.DefineSummaryBars h,"",h2,""
		.DefineSummaryBars h,"",h3,""
		.ExpandItem(h) = True
		.ItemBold(h) = True
		.ItemBar(h,"",exBarMoveStart) = #9/22/2006#
	End With
	.EndUpdate 
End With
1779:
Is it possible to programmatically move all bars of specified key to end at specified date (inclusive)

With G2antt1
	.BeginUpdate 
	.Debug = True
	.Columns.Add "Tasks"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.LevelCount = 2
		.PaneWidth(False) = 48
	End With
	With .Items
		.AddBar .AddItem("Task A.1"),"Task",#1/1/2001#,#1/6/2001#,"A"
		.AddBar .AddItem("Task A.2"),"Task",#1/2/2001#,#1/7/2001#,"A"
		.AddBar .AddItem("Task B.1"),"Task",#1/3/2001#,#1/8/2001#,"B"
		.AddBar .AddItem("Task B.2"),"Task",#1/4/2001#,#1/9/2001#,"B"
		.ItemBar(0,"<A*>",exBarMoveEndInclusive) = #1/2/2001#
	End With
	.EndUpdate 
End With
1778:
Is it possible to programmatically move all bars to end at specified date (inclusive)

With G2antt1
	.BeginUpdate 
	.Debug = True
	.Columns.Add "Tasks"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.LevelCount = 2
		.PaneWidth(False) = 48
	End With
	With .Items
		.AddBar .AddItem("Task A.1"),"Task",#1/1/2001#,#1/6/2001#,"A"
		.AddBar .AddItem("Task A.2"),"Task",#1/2/2001#,#1/7/2001#,"A"
		.AddBar .AddItem("Task B.1"),"Task",#1/3/2001#,#1/8/2001#,"B"
		.AddBar .AddItem("Task B.2"),"Task",#1/4/2001#,#1/9/2001#,"B"
		.ItemBar(0,"<*>",exBarMoveEndInclusive) = #1/2/2001#
	End With
	.EndUpdate 
End With
1777:
Is it possible to programmatically move all bars of specified key to end at specified date

With G2antt1
	.BeginUpdate 
	.Debug = True
	.Columns.Add "Tasks"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.LevelCount = 2
		.PaneWidth(False) = 48
	End With
	With .Items
		.AddBar .AddItem("Task A.1"),"Task",#1/1/2001#,#1/6/2001#,"A"
		.AddBar .AddItem("Task A.2"),"Task",#1/2/2001#,#1/7/2001#,"A"
		.AddBar .AddItem("Task B.1"),"Task",#1/3/2001#,#1/8/2001#,"B"
		.AddBar .AddItem("Task B.2"),"Task",#1/4/2001#,#1/9/2001#,"B"
		.ItemBar(0,"<A*>",exBarMoveEnd) = #1/2/2001#
	End With
	.EndUpdate 
End With
1776:
Is it possible to programmatically move all bars to end at specified date

With G2antt1
	.BeginUpdate 
	.Debug = True
	.Columns.Add "Tasks"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.LevelCount = 2
		.PaneWidth(False) = 48
	End With
	With .Items
		.AddBar .AddItem("Task A.1"),"Task",#1/1/2001#,#1/6/2001#,"A"
		.AddBar .AddItem("Task A.2"),"Task",#1/2/2001#,#1/7/2001#,"A"
		.AddBar .AddItem("Task B.1"),"Task",#1/3/2001#,#1/8/2001#,"B"
		.AddBar .AddItem("Task B.2"),"Task",#1/4/2001#,#1/9/2001#,"B"
		.ItemBar(0,"<*>",exBarMoveEnd) = #1/2/2001#
	End With
	.EndUpdate 
End With
1775:
Is it possible to programmatically move all bars of specified key to start at specified date

With G2antt1
	.BeginUpdate 
	.Debug = True
	.Columns.Add "Tasks"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.LevelCount = 2
		.PaneWidth(False) = 48
	End With
	With .Items
		.AddBar .AddItem("Task A.1"),"Task",#1/1/2001#,#1/6/2001#,"A"
		.AddBar .AddItem("Task A.2"),"Task",#1/2/2001#,#1/7/2001#,"A"
		.AddBar .AddItem("Task B.1"),"Task",#1/3/2001#,#1/8/2001#,"B"
		.AddBar .AddItem("Task B.2"),"Task",#1/4/2001#,#1/9/2001#,"B"
		.ItemBar(0,"<A*>",exBarMoveStart) = #1/2/2001#
	End With
	.EndUpdate 
End With
1774:
Is it possible to programmatically move all bars to start at specified date

With G2antt1
	.BeginUpdate 
	.Debug = True
	.Columns.Add "Tasks"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.LevelCount = 2
		.PaneWidth(False) = 48
	End With
	With .Items
		.AddBar .AddItem("Task A.1"),"Task",#1/1/2001#,#1/6/2001#,"A"
		.AddBar .AddItem("Task A.2"),"Task",#1/2/2001#,#1/7/2001#,"A"
		.AddBar .AddItem("Task B.1"),"Task",#1/3/2001#,#1/8/2001#,"B"
		.AddBar .AddItem("Task B.2"),"Task",#1/4/2001#,#1/9/2001#,"B"
		.ItemBar(0,"<*>",exBarMoveStart) = #1/2/2001#
	End With
	.EndUpdate 
End With
1773:
Is it possible to programmatically move all bars of specified key

With G2antt1
	.BeginUpdate 
	.Debug = True
	.Columns.Add "Tasks"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.LevelCount = 2
		.PaneWidth(False) = 48
	End With
	With .Items
		.AddBar .AddItem("Task A.1"),"Task",#1/1/2001#,#1/6/2001#,"A"
		.AddBar .AddItem("Task A.2"),"Task",#1/2/2001#,#1/7/2001#,"A"
		.AddBar .AddItem("Task B.1"),"Task",#1/3/2001#,#1/8/2001#,"B"
		.AddBar .AddItem("Task B.2"),"Task",#1/4/2001#,#1/9/2001#,"B"
		.ItemBar(0,"<A*>",exBarMove) = 2
	End With
	.EndUpdate 
End With
1772:
Is it possible to programmatically move all bars

With G2antt1
	.BeginUpdate 
	.Debug = True
	.Columns.Add "Tasks"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.LevelCount = 2
		.PaneWidth(False) = 48
	End With
	With .Items
		.AddBar .AddItem("Task A.1"),"Task",#1/1/2001#,#1/6/2001#,"A"
		.AddBar .AddItem("Task A.2"),"Task",#1/2/2001#,#1/7/2001#,"A"
		.AddBar .AddItem("Task B.1"),"Task",#1/3/2001#,#1/8/2001#,"B"
		.AddBar .AddItem("Task B.2"),"Task",#1/4/2001#,#1/9/2001#,"B"
		.ItemBar(0,"<*>",exBarMove) = 2
	End With
	.EndUpdate 
End With
1771:
How can I programmatically move a bar, so it ends at specified date (inclusive)
With G2antt1
	.Columns.Add "Tasks"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.LevelCount = 2
		.PaneWidth(False) = 48
	End With
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/1/2001#,#1/6/2001#,"A"
		.ItemBar(h,"A",exBarMoveEndInclusive) = #1/4/2001#
	End With
End With
1770:
How can I programmatically move a bar, so it ends at specified date
With G2antt1
	.Columns.Add "Tasks"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.LevelCount = 2
		.PaneWidth(False) = 48
	End With
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/1/2001#,#1/6/2001#,"A"
		.ItemBar(h,"A",exBarMoveEnd) = #1/4/2001#
	End With
End With
1769:
How can I programmatically move a bar, so it starts at specified date
With G2antt1
	.Columns.Add "Tasks"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.LevelCount = 2
		.PaneWidth(False) = 48
	End With
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/1/2001#,#1/6/2001#,"A"
		.ItemBar(h,"A",exBarMoveStart) = #1/4/2001#
	End With
End With
1768:
I canít figure out how to control the date and time format (in level 0, 1 and 2) when the user click on the OverviewZoom bottom

With G2antt1
	.BeginUpdate 
	.HeaderHeight = 22
	With .Chart
		.FirstVisibleDate = #1/1/2016#
		.PaneWidth(False) = 0
		.LevelCount = 2
		.DrawLevelSeparator = exLevelSolidLine
		.AllowResizeChart = ResizeChartEnum.exAllowResizeChartMiddle Or ResizeChartEnum.exAllowResizeChartHeader
		.MaxUnitWidth = 196
		With .Level(0)
			.Alignment = AlignmentEnum.exHOutside Or AlignmentEnum.CenterAlignment
			.DrawTickLines = exLevelSolidLine
		End With
		With .Level(1)
			.DrawTickLines = LevelLineEnum.exLevelMiddleLine Or LevelLineEnum.exLevelDotLine
			.DrawTickLinesFrom 0,exLevelSolidLine
			.BackColor = RGB(240,240,240)
		End With
		.OverviewVisible = exOverviewShowAllVisible
		.AllowOverviewZoom = exAlwaysZoom
		.UnitWidth = 24
		.Label(exSecond) = ""
		.Label(exMinute) = ""
		.Label(exHour) = ""
		.Label(exWeek) = ""
		.Label(exDay) = "<font ;6><%d%><|><%d%><|><%d%> <fgcolor=A0A0A0><off -4><%d1%><|><%d%> <fgcolor=A0A0A0><off -4><%d2%><|><%d%> <fgcolor=A0A0A0><o" & _
"ff -4><%d3%><|><%d%> <fgcolor=A0A0A0><off -4><%dddd%><||><||>4096"
		.UnitScale = exDay
		.ScrollTo .FirstVisibleDate,1
	End With
	.Columns.Add "Default"
	.EndUpdate 
End With
1767:
Can I use GroupBars with OverlaidType method

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	.Debug = True
	.LinesAtRoot = exLinesAtRoot
	.ScrollBySingleLine = True
	.BackColorLevelHeader = .BackColor
	With .Chart
		.LevelCount = 2
		.FirstVisibleDate = #9/20/2006#
		.PaneWidth(0) = 96
		.Bars.Item("Task").OverlaidType = exOverlaidBarsStack
	End With
	With .Items
		h = .AddItem("Project")
		.AddBar h,"Summary",#9/21/2006#,#10/4/2006#
		h1 = .InsertItem(h,,"Tasks")
		.AddBar h1,"Task",#9/21/2006#,#9/26/2006#,"h1"
		h2 = h1
		.AddBar h2,"Task",#9/25/2006#,#9/30/2006#,"h2"
		.AddLink "L1",h1,"h1",h2,"h2"
		h3 = h1
		.AddBar h3,"Task",#9/29/2006#,#10/4/2006#,"h3"
		.AddLink "L2",h2,"h2",h3,"h3"
		.DefineSummaryBars h,"",h1,"h1"
		.DefineSummaryBars h,"",h2,"h2"
		.DefineSummaryBars h,"",h3,"h3"
		.ExpandItem(h) = True
		.ItemBold(h) = True
		.GroupBars h1,"h1",False,h2,"h2",True,31,"0;5;-1"
		.GroupBars h2,"h2",False,h3,"h3",True,31,"0;5;-1"
	End With
	.EndUpdate 
End With
1766:
How do I change the link's lag so I can schedule bars to start later (with nonworking part)

' BarResizing event - Occurs when a bar is moving or resizing.
Private Sub G2antt1_BarResizing(ByVal Item As EXG2ANTTLibCtl.HITEM,ByVal Key As Variant)
	With G2antt1
		.Items.SchedulePDM Item,Key
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.DefaultItemHeight = 22
	.HeaderHeight = .DefaultItemHeight
	.BackColorLevelHeader = .BackColor
	.AntiAliasing = True
	.Columns.Add "Task"
	With .Chart
		.LinksStyle = exLinkSolid
		.LinksColor = RGB(128,128,128)
		.LevelCount = 2
		.FirstVisibleDate = #12/28/2000#
		.PaneWidth(False) = 48
		With .Bars.Item("Task")
			.Def(exBarKeepWorkingCount) = True
			.Def(exBarHAlignCaption) = 18
			.Color = RGB(0,0,0)
			.StartColor = RGB(190,190,190)
			.EndColor = .StartColor
			.Pattern = exPatternBox
		End With
	End With
	With .Items
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task",#1/2/2001#,#1/5/2001#,"K1","FS lag=0 (default)"
		h2 = .AddItem("Task 2")
		.AddBar h2,"Task",#1/2/2001#,#1/5/2001#,"K2","FS lag=4"
		.AddLink "L1",h1,"K1",h2,"K2"
		h3 = .AddItem("Task 3")
		.AddBar h3,"Task",#1/2/2001#,#1/5/2001#,"K3","FS lag=-1"
		.AddLink "L2",h2,"K2",h3,"K3"
		.Link("L2",exLinkPDMWorkingDelay) = 4
		h4 = .AddItem("Task 4")
		.AddBar h4,"Task",#1/2/2001#,#1/5/2001#,"K4"
		.AddLink "L3",h3,"K3",h4,"K4"
		.Link("L3",exLinkPDMWorkingDelay) = -1
		.SchedulePDM 0,"K1"
	End With
	.EndUpdate 
End With
1765:
How do I change the link's lag so I can schedule bars to start later (without nonworking part)

' BarResizing event - Occurs when a bar is moving or resizing.
Private Sub G2antt1_BarResizing(ByVal Item As EXG2ANTTLibCtl.HITEM,ByVal Key As Variant)
	With G2antt1
		.Items.SchedulePDM Item,Key
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.DefaultItemHeight = 22
	.HeaderHeight = .DefaultItemHeight
	.BackColorLevelHeader = .BackColor
	.AntiAliasing = True
	.Columns.Add "Task"
	With .Chart
		.LinksStyle = exLinkSolid
		.LinksColor = RGB(128,128,128)
		.LevelCount = 2
		.NonworkingDays = 0
		.FirstVisibleDate = #12/28/2000#
		.PaneWidth(False) = 48
		With .Bars.Item("Task")
			.Def(exBarHAlignCaption) = 18
			.Color = RGB(0,0,0)
			.StartColor = RGB(190,190,190)
			.EndColor = .StartColor
			.Pattern = exPatternBox
		End With
	End With
	With .Items
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task",#1/2/2001#,#1/5/2001#,"K1","FS lag=0 (default)"
		h2 = .AddItem("Task 2")
		.AddBar h2,"Task",#1/2/2001#,#1/5/2001#,"K2","FS lag=4"
		.AddLink "L1",h1,"K1",h2,"K2"
		h3 = .AddItem("Task 3")
		.AddBar h3,"Task",#1/2/2001#,#1/5/2001#,"K3","FS lag=-1"
		.AddLink "L2",h2,"K2",h3,"K3"
		.Link("L2",exLinkPDMDelay) = 4
		h4 = .AddItem("Task 4")
		.AddBar h4,"Task",#1/2/2001#,#1/5/2001#,"K4"
		.AddLink "L3",h3,"K3",h4,"K4"
		.Link("L3",exLinkPDMDelay) = -1
		.SchedulePDM 0,"K1"
	End With
	.EndUpdate 
End With
1764:
Is it possible to select the entire row/line, when user clicks the first column, and select individually the rest of cells, while user clicks any other column

' AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
Private Sub G2antt1_AddGroupItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Summary",.CellValue(Item,2),.CellValue(Item,4)
			.DefineSummaryBars Item,"",-3,""
		End With
	End With
End Sub

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

' MouseDown event - Occurs when the user presses a mouse button.
Private Sub G2antt1_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)
	With G2antt1
		i = .ItemFromPoint(-1,-1,c,hit)
		.FullRowSelect = .Columns.Item(c).Data
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.HeaderHeight = 22
	.HeaderAppearance = Flat
	.BackColorLock = RGB(240,240,240)
	.BackColorHeader = .BackColorLock
	.HasLines = exNoLine
	.ColumnAutoResize = False
	.SortBarVisible = False
	.AllowGroupBy = True
	.ReadOnly = exReadOnly
	.ShowFocusRect = False
	.CountLockedColumns = 1
	.AutoDrag = exAutoDragScroll
	.SingleSort = False
	.ColumnsAllowSizing = True
	.DrawGridLines = exAllLines
	.GridLineStyle = exGridLinesSolid
	.GridLineColor = RGB(220,220,220)
	.Chart.FirstVisibleDate = #9/1/1994#
	.Chart.LevelCount = 2
	.Chart.PaneWidth(False) = 256
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb",3,3
	End With
	.DataSource = rs
	.Columns.Item(0).Data = -1
	.Layout = "singlesort=""C5:1"";multiplesort="" C1:2"""
	.EndUpdate 
End With
1763:
I've also hit a strange problem with the BeforeExpandItem event - the Cancel parameter is declared as const in Delphi when I believe it should be declared as var or out so I can use it to return OleVariant(True) to cancel the operation, or am I missing something, or how can I disable expanding / collapsing the items
' BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
Private Sub G2antt1_BeforeExpandItem(ByVal Item As EXG2ANTTLibCtl.HITEM,Cancel As Variant)
	With G2antt1
		.EventParam(1) = True
	End With
End Sub

' Event event - Notifies the application once the control fires an event.
Private Sub G2antt1_Event(ByVal EventID As Long)
	With G2antt1
		Debug.Print( .EventParam(-2) )
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.LinesAtRoot = exLinesAtRoot
	.Columns.Add "Default"
	With .Items
		h = .AddItem("Root A")
		.InsertItem h,,"Child 1"
		.InsertItem h,,"Child 2"
		.ExpandItem(h) = True
		h = .AddItem("Root B")
		.InsertItem h,,"Child 1"
		.InsertItem h,,"Child 2"
		.ExpandItem(h) = True
	End With
	.EndUpdate 
End With
1762:
Is there any way I can get rid / hide of the vertical blue lines ( today, selected date )
With G2antt1
	.BeginUpdate 
	With .Chart
		.PaneWidth(False) = 128
		.LevelCount = 2
		.MarkSelectDateColor = .BackColor
		.MarkTodayColor = .BackColor
	End With
	.EndUpdate 
End With
1761:
Is it possible to search for a bar through items only ( not including the locked items )

With G2antt1
	.BeginUpdate 
	.Debug = True
	With .Chart
		.PaneWidth(False) = 128
		.LevelCount = 2
		.FirstVisibleDate = #12/31/2015#
	End With
	.BackColorAlternate = RGB(250,250,250)
	.ShowLockedItems = True
	.Columns.Add "Column"
	With .Columns.Add("Find")
		.Def(exCellValueFormat) = 1
		.Visible = False
		.FormatColumn = "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "
	End With
	.Chart.ColumnsFormatLevel = "1"
	With .Items
		.LockedItemCount(exTop) = 3
		h = .LockedItem(exTop,0)
		.CellValue(h,0) = "locked-top 1"
		.AddBar h,"Task",#1/4/2016#,#1/8/2016#,"T1"
		h = .LockedItem(exTop,1)
		.CellValue(h,0) = "locked-top 2"
		.AddBar h,"Task",#1/5/2016#,#1/9/2016#,"T2"
		h = .LockedItem(exTop,2)
		.SelectItem(h) = False
		.ItemDivider(h) = 0
		.ItemHeight(h) = 2
		.AddBar .AddItem("un-locked item 1"),"Task",#1/4/2016#,#1/8/2016#,"T3"
		.AddBar .AddItem("un-locked item 2"),"Task",#1/5/2016#,#1/9/2016#,"T4"
		.LockedItemCount(exMiddle) = 3
		h = .LockedItem(exMiddle,0)
		.SelectItem(h) = False
		.ItemDivider(h) = 0
		.ItemHeight(h) = 2
		h = .LockedItem(exMiddle,1)
		.CellValue(h,0) = "locked-bottom 1"
		.AddBar h,"Task",#1/4/2016#,#1/8/2016#,"T5"
		h = .LockedItem(exMiddle,2)
		.CellValue(h,0) = "locked-bottom 2"
		.AddBar h,"Task",#1/5/2016#,#1/9/2016#,"T6"
	End With
	With .Items
		h = .FindBar("T4",0)
		.ItemBar(h,.FirstItemBar(h),exBarColor) = 255
		.CellValue(h,1) = h
	End With
	.EndUpdate 
End With
1760:
Is it possible to search for a bar through bottom-locked-items only

With G2antt1
	.BeginUpdate 
	.Debug = True
	With .Chart
		.PaneWidth(False) = 128
		.LevelCount = 2
		.FirstVisibleDate = #12/31/2015#
	End With
	.BackColorAlternate = RGB(250,250,250)
	.ShowLockedItems = True
	.Columns.Add "Column"
	With .Columns.Add("Find")
		.Def(exCellValueFormat) = 1
		.Visible = False
		.FormatColumn = "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "
	End With
	.Chart.ColumnsFormatLevel = "1"
	With .Items
		.LockedItemCount(exTop) = 3
		h = .LockedItem(exTop,0)
		.CellValue(h,0) = "locked-top 1"
		.AddBar h,"Task",#1/4/2016#,#1/8/2016#,"T1"
		h = .LockedItem(exTop,1)
		.CellValue(h,0) = "locked-top 2"
		.AddBar h,"Task",#1/5/2016#,#1/9/2016#,"T2"
		h = .LockedItem(exTop,2)
		.SelectItem(h) = False
		.ItemDivider(h) = 0
		.ItemHeight(h) = 2
		.AddBar .AddItem("un-locked item 1"),"Task",#1/4/2016#,#1/8/2016#,"T3"
		.AddBar .AddItem("un-locked item 2"),"Task",#1/5/2016#,#1/9/2016#,"T4"
		.LockedItemCount(exMiddle) = 3
		h = .LockedItem(exMiddle,0)
		.SelectItem(h) = False
		.ItemDivider(h) = 0
		.ItemHeight(h) = 2
		h = .LockedItem(exMiddle,1)
		.CellValue(h,0) = "locked-bottom 1"
		.AddBar h,"Task",#1/4/2016#,#1/8/2016#,"T5"
		h = .LockedItem(exMiddle,2)
		.CellValue(h,0) = "locked-bottom 2"
		.AddBar h,"Task",#1/5/2016#,#1/9/2016#,"T6"
	End With
	With .Items
		h = .FindBar("T6",-4)
		.ItemBar(h,.FirstItemBar(h),exBarColor) = 255
		.CellValue(h,1) = h
	End With
	.EndUpdate 
End With
1759:
Is it possible to search for a bar through top-locked-items only

With G2antt1
	.BeginUpdate 
	.Debug = True
	With .Chart
		.PaneWidth(False) = 128
		.LevelCount = 2
		.FirstVisibleDate = #12/31/2015#
	End With
	.BackColorAlternate = RGB(250,250,250)
	.ShowLockedItems = True
	.Columns.Add "Column"
	With .Columns.Add("Find")
		.Def(exCellValueFormat) = 1
		.Visible = False
		.FormatColumn = "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "
	End With
	.Chart.ColumnsFormatLevel = "1"
	With .Items
		.LockedItemCount(exTop) = 3
		h = .LockedItem(exTop,0)
		.CellValue(h,0) = "locked-top 1"
		.AddBar h,"Task",#1/4/2016#,#1/8/2016#,"T1"
		h = .LockedItem(exTop,1)
		.CellValue(h,0) = "locked-top 2"
		.AddBar h,"Task",#1/5/2016#,#1/9/2016#,"T2"
		h = .LockedItem(exTop,2)
		.SelectItem(h) = False
		.ItemDivider(h) = 0
		.ItemHeight(h) = 2
		.AddBar .AddItem("un-locked item 1"),"Task",#1/4/2016#,#1/8/2016#,"T3"
		.AddBar .AddItem("un-locked item 2"),"Task",#1/5/2016#,#1/9/2016#,"T4"
		.LockedItemCount(exMiddle) = 3
		h = .LockedItem(exMiddle,0)
		.SelectItem(h) = False
		.ItemDivider(h) = 0
		.ItemHeight(h) = 2
		h = .LockedItem(exMiddle,1)
		.CellValue(h,0) = "locked-bottom 1"
		.AddBar h,"Task",#1/4/2016#,#1/8/2016#,"T5"
		h = .LockedItem(exMiddle,2)
		.CellValue(h,0) = "locked-bottom 2"
		.AddBar h,"Task",#1/5/2016#,#1/9/2016#,"T6"
	End With
	With .Items
		h = .FindBar("T1",-3)
		.ItemBar(h,.FirstItemBar(h),exBarColor) = 255
		.CellValue(h,1) = h
	End With
	.EndUpdate 
End With
1758:
Is it possible to search for a bar through all locked-items only

With G2antt1
	.BeginUpdate 
	.Debug = True
	With .Chart
		.PaneWidth(False) = 128
		.LevelCount = 2
		.FirstVisibleDate = #12/31/2015#
	End With
	.BackColorAlternate = RGB(250,250,250)
	.ShowLockedItems = True
	.Columns.Add "Column"
	With .Columns.Add("Find")
		.Def(exCellValueFormat) = 1
		.Visible = False
		.FormatColumn = "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "
	End With
	.Chart.ColumnsFormatLevel = "1"
	With .Items
		.LockedItemCount(exTop) = 3
		h = .LockedItem(exTop,0)
		.CellValue(h,0) = "locked-top 1"
		.AddBar h,"Task",#1/4/2016#,#1/8/2016#,"T1"
		h = .LockedItem(exTop,1)
		.CellValue(h,0) = "locked-top 2"
		.AddBar h,"Task",#1/5/2016#,#1/9/2016#,"T2"
		h = .LockedItem(exTop,2)
		.SelectItem(h) = False
		.ItemDivider(h) = 0
		.ItemHeight(h) = 2
		.AddBar .AddItem("un-locked item 1"),"Task",#1/4/2016#,#1/8/2016#,"T3"
		.AddBar .AddItem("un-locked item 2"),"Task",#1/5/2016#,#1/9/2016#,"T4"
		.LockedItemCount(exMiddle) = 3
		h = .LockedItem(exMiddle,0)
		.SelectItem(h) = False
		.ItemDivider(h) = 0
		.ItemHeight(h) = 2
		h = .LockedItem(exMiddle,1)
		.CellValue(h,0) = "locked-bottom 1"
		.AddBar h,"Task",#1/4/2016#,#1/8/2016#,"T5"
		h = .LockedItem(exMiddle,2)
		.CellValue(h,0) = "locked-bottom 2"
		.AddBar h,"Task",#1/5/2016#,#1/9/2016#,"T6"
	End With
	With .Items
		h = .FindBar("T2",-2)
		.ItemBar(h,.FirstItemBar(h),exBarColor) = 255
		.CellValue(h,1) = h
	End With
	.EndUpdate 
End With
1757:
Is it possible to search for a bar through all items ( including locked items )

With G2antt1
	.BeginUpdate 
	.Debug = True
	With .Chart
		.PaneWidth(False) = 128
		.LevelCount = 2
		.FirstVisibleDate = #12/31/2015#
	End With
	.BackColorAlternate = RGB(250,250,250)
	.ShowLockedItems = True
	.Columns.Add "Column"
	With .Columns.Add("Find")
		.Def(exCellValueFormat) = 1
		.Visible = False
		.FormatColumn = "int(value) = 0 ? `` : ` <fgcolor=FF0000><b>found here ` "
	End With
	.Chart.ColumnsFormatLevel = "1"
	With .Items
		.LockedItemCount(exTop) = 3
		h = .LockedItem(exTop,0)
		.CellValue(h,0) = "locked-top 1"
		.AddBar h,"Task",#1/4/2016#,#1/8/2016#,"T1"
		h = .LockedItem(exTop,1)
		.CellValue(h,0) = "locked-top 2"
		.AddBar h,"Task",#1/5/2016#,#1/9/2016#,"T2"
		h = .LockedItem(exTop,2)
		.SelectItem(h) = False
		.ItemDivider(h) = 0
		.ItemHeight(h) = 2
		.AddBar .AddItem("un-locked item 1"),"Task",#1/4/2016#,#1/8/2016#,"T3"
		.AddBar .AddItem("un-locked item 2"),"Task",#1/5/2016#,#1/9/2016#,"T4"
		.LockedItemCount(exMiddle) = 3
		h = .LockedItem(exMiddle,0)
		.SelectItem(h) = False
		.ItemDivider(h) = 0
		.ItemHeight(h) = 2
		h = .LockedItem(exMiddle,1)
		.CellValue(h,0) = "locked-bottom 1"
		.AddBar h,"Task",#1/4/2016#,#1/8/2016#,"T5"
		h = .LockedItem(exMiddle,2)
		.CellValue(h,0) = "locked-bottom 2"
		.AddBar h,"Task",#1/5/2016#,#1/9/2016#,"T6"
	End With
	With .Items
		h = .FindBar("T5",-1)
		.ItemBar(h,.FirstItemBar(h),exBarColor) = 255
		.CellValue(h,1) = h
	End With
	.EndUpdate 
End With
1756:
How do I clip/hide/align the bar's caption/text based on the bar's size/width/length

With G2antt1
	.BeginUpdate 
	.Columns.Add "Clip"
	.ScrollBySingleLine = True
	.DrawGridLines = exRowLines
	With .Chart
		.AllowResizeChart = ResizeChartEnum.exAllowResizeChartMiddle Or ResizeChartEnum.exAllowResizeChartHeader
		.DrawGridLines = exRowLines
		.FirstVisibleDate = #12/23/2000#
		.LevelCount = 2
		.PaneWidth(False) = 216
		With .Bars.Item("Task")
			.Pattern = exPatternBox
			.Color = RGB(164,164,164)
			.StartColor = RGB(240,240,240)
			.EndColor = .StartColor
			.OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption Or OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or OverlaidBarsTypeEnum.exOverlaidBarsStack
			.Height = 15
		End With
		.MinUnitWidth = .UnitWidth
	End With
	With .Items
		h = .AddItem("no clip, (0-2)")
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"K1","no clip, right(<b>2</b>)"
		.ItemBar(h,"K1",exBarHAlignCaption) = 2
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"K2","no clip, center(<b>1</b>)"
		.ItemBar(h,"K2",exBarHAlignCaption) = 1
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"K3","no clip, left(<b>0</b>)"
		.ItemBar(h,"K3",exBarHAlignCaption) = 0
		h = .AddItem("clip, inside (3-5)")
		.AddBar h,"Task",#12/28/2000#,#1/8/2001#,"K1","clip, inside, right(<b>5</b>)"
		.ItemBar(h,"K1",exBarHAlignCaption) = 5
		.AddBar h,"Task",#12/28/2000#,#1/8/2001#,"K2","clip, inside, center(<b>4</b>)"
		.ItemBar(h,"K2",exBarHAlignCaption) = 4
		.AddBar h,"Task",#12/28/2000#,#1/8/2001#,"K3","clip, inside, left(<b>3</b>)"
		.ItemBar(h,"K3",exBarHAlignCaption) = 3
		h = .AddItem("hide on min width, clip if not fit, inside (6-8)")
		.AddBar h,"Task",#12/26/2000#,#1/10/2001#,"K1","hide on min width, clip if not fit, inside, right(<b>8</b>)"
		.ItemBar(h,"K1",exBarHAlignCaption) = 8
		.AddBar h,"Task",#12/26/2000#,#1/10/2001#,"K2","hide on min width, clip if not fit, inside, center(<b>7</b>)"
		.ItemBar(h,"K2",exBarHAlignCaption) = 7
		.AddBar h,"Task",#12/26/2000#,#1/10/2001#,"K3","hide on min width, clip if not fit, inside, left(<b>6</b>)"
		.ItemBar(h,"K3",exBarHAlignCaption) = 6
		h = .AddItem("hide if not fit, no clip, inside (9-11)")
		.AddBar h,"Task",#12/28/2000#,#1/8/2001#,"K1","hide if not fit, no clip, inside, right(<b>11</b>)"
		.ItemBar(h,"K1",exBarHAlignCaption) = 11
		.AddBar h,"Task",#12/28/2000#,#1/8/2001#,"K2","hide if not fit, no clip, center(<b>10</b>)"
		.ItemBar(h,"K2",exBarHAlignCaption) = 10
		.AddBar h,"Task",#12/28/2000#,#1/8/2001#,"K3","hide if not fit, no clip, inside, left(<b>9</b>)"
		.ItemBar(h,"K3",exBarHAlignCaption) = 9
		h = .AddItem("no clip, inside, outside (12-14)")
		.AddBar h,"Task",#12/28/2000#,#1/8/2001#,"K1","no clip, inside, outside, right(<b>14</b>)"
		.ItemBar(h,"K1",exBarHAlignCaption) = 14
		.AddBar h,"Task",#12/28/2000#,#1/8/2001#,"K2","no clip, inside, outside, center(<b>13</b>)"
		.ItemBar(h,"K2",exBarHAlignCaption) = 13
		.AddBar h,"Task",#12/28/2000#,#1/8/2001#,"K3","no clip, inside, outside, left(<b>12</b>)"
		.ItemBar(h,"K3",exBarHAlignCaption) = 12
		h = .AddItem("no clip, outside (16-18)")
		.AddBar h,"Task",#12/30/2000#,#1/6/2001#,"K1","no clip, outside, right(<b>18</b>)"
		.ItemBar(h,"K1",exBarHAlignCaption) = 18
		.AddBar h,"Task",#12/30/2000#,#1/6/2001#,"K2","no clip, outside, center(<b>17</b>)"
		.ItemBar(h,"K2",exBarHAlignCaption) = 17
		.AddBar h,"Task",#12/30/2000#,#1/6/2001#,"K3","no clip, outside, left(<b>16</b>)"
		.ItemBar(h,"K3",exBarHAlignCaption) = 16
	End With
	.EndUpdate 
End With
1755:
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar (method 2)
' DateChange event - Occurs when the first visible date is changed.
Private Sub G2antt1_DateChange()
	With G2antt1
		.Chart.FirstVisibleDate = #1/2/2001#
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Columns.Add("Start")
		.Def(exCellValueToItemBarProperty) = 1
		.Visible = False
		.Alignment = LeftAlignment
	End With
	With .Columns.Add("End")
		.Def(exCellValueToItemBarProperty) = 2
		.Visible = False
		.Alignment = RightAlignment
	End With
	With .Chart
		.FirstVisibleDate = #1/2/2001#
		.LevelCount = 2
		.PaneWidth(False) = 48
		.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52"
		.ColumnsTransparent = 50
		.ScrollBar = False
	End With
	With .Items
		.AllowCellValueToItemBar = True
		.AddBar .AddItem("Task 1"),"Task",#1/3/2001#,#1/7/2001#
		.AddBar .AddItem("Task 2"),"Task",#1/4/2001#,#1/8/2001#
	End With
	.EndUpdate 
End With
1754:
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar, including limiting the bars
' BarResizing event - Occurs when a bar is moving or resizing.
Private Sub G2antt1_BarResizing(ByVal Item As EXG2ANTTLibCtl.HITEM,ByVal Key As Variant)
	With G2antt1
		With .Items
			.ItemBar(Item,Key,exBarMinStart) = #1/1/2001#
			.ItemBar(Item,Key,exBarMaxEnd) = #2/1/2001#
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Columns.Add("Start")
		.Def(exCellValueToItemBarProperty) = 1
		.Visible = False
		.Alignment = LeftAlignment
	End With
	With .Columns.Add("End")
		.Def(exCellValueToItemBarProperty) = 2
		.Visible = False
		.Alignment = RightAlignment
	End With
	With .Chart
		.FirstVisibleDate = #1/2/2001#
		.LevelCount = 2
		.PaneWidth(False) = 48
		.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52"
		.ColumnsTransparent = 50
		.ScrollRange(exStartDate) = #1/1/2001#
		.ScrollRange(exEndDate) = #1/31/2001#
	End With
	With .Items
		.AllowCellValueToItemBar = True
		.AddBar .AddItem("Task 1"),"Task",#1/3/2001#,#1/7/2001#
		.AddBar .AddItem("Task 2"),"Task",#1/4/2001#,#1/8/2001#
	End With
	.EndUpdate 
End With
1753:
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar (method 1)
With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Columns.Add("Start")
		.Def(exCellValueToItemBarProperty) = 1
		.Visible = False
		.Alignment = LeftAlignment
	End With
	With .Columns.Add("End")
		.Def(exCellValueToItemBarProperty) = 2
		.Visible = False
		.Alignment = RightAlignment
	End With
	With .Chart
		.FirstVisibleDate = #1/2/2001#
		.LevelCount = 2
		.PaneWidth(False) = 48
		.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52"
		.ColumnsTransparent = 50
		.ScrollRange(exStartDate) = #1/1/2001#
		.ScrollRange(exEndDate) = #1/31/2001#
	End With
	With .Items
		.AllowCellValueToItemBar = True
		.AddBar .AddItem("Task 1"),"Task",#1/3/2001#,#1/7/2001#
		.AddBar .AddItem("Task 2"),"Task",#1/4/2001#,#1/8/2001#
	End With
	.EndUpdate 
End With
1752:
Is it possible to have "Preview Window" as a "Modal Window or 'always-on-top window'"
With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	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",exLinkStartPos) = 0
	End With
	.EndUpdate 
	With CreateObject("Exontrol.Print")
		Debug.Print( .Version )
		.Foreground = -1
		.PrintExt = G2antt1.Object
		.Preview 
	End With
End With
1751:
The week number is not correct. What can I do

With G2antt1
	With .Chart
		.FirstWeekDay = .LocFirstWeekDay
		.MonthNames = .LocMonthNames
		.WeekDays = .LocWeekDays
		.AMPM = .LocAMPM
		.LevelCount = 2
		.PaneWidth(False) = 0
		.UnitScale = exWeek
		.UnitWidth = 32
		.FirstVisibleDate = #1/1/2016#
		.AdjustLevelsToBase = True
		.WeekNumberAs = exISO8601WeekNumber
		.ShowNonworkingDates = False
		.ScrollTo .FirstVisibleDate,1
	End With
End With
1750:
When the user zooms with the mouse, the chart automatically switches the unit scale - ideally I'd like to replicate this so I can switch the unitscale at the same "zoom levels" that the mouse zooming does - is this possible
' ChartEndChanging event - Occurs after the chart has been changed.
Private Sub G2antt1_ChartEndChanging(ByVal Operation As EXG2ANTTLibCtl.BarOperationEnum)
	With G2antt1
		With .Chart
			Debug.Print( "FirstVisibleDate" )
			Debug.Print( .FirstVisibleDate )
			Debug.Print( "UnitScale" )
			Debug.Print( .UnitScale )
			Debug.Print( "UnitWidth" )
			Debug.Print( .UnitWidth )
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	With .Chart
		.LevelCount = 3
		.AllowResizeChart = ResizeChartEnum.exAllowChangeUnitScale Or ResizeChartEnum.exAllowResizeChartMiddle Or ResizeChartEnum.exAllowResizeChartHeader
		.PaneWidth(False) = 0
		.MarkTodayColor = .BackColor
	End With
	.EndUpdate 
End With
1749:
The first week number is not correctly assigned. What can I do

With G2antt1
	With .Chart
		.PaneWidth(False) = 0
		.FirstVisibleDate = #1/1/2016#
		.LevelCount = 2
		.FirstWeekDay = exMonday
		.UnitScale = exWeek
		.ScrollTo .FirstVisibleDate,1
		.DrawGridLines = exAllLines
		.AdjustLevelsToBase = True
		.Level(0).Label = "<c><%mmmm%>"
	End With
End With
1748:
How can I display the +/- expand - collapse buttons, a bit larger

With G2antt1
	.BeginUpdate 
	With .VisualAppearance
		.Add 3,"c:\exontrol\images\normal.ebn"
		.Add 4,"c:\exontrol\images\pushed.ebn"
		.Add 1,"CP:3 -4 -4 4 4"
		.Add 2,"CP:4 -4 -4 4 4"
	End With
	.LinesAtRoot = exGroupLinesAtRoot
	.HasButtons = exCustom
	.HasButtonsCustom(0) = 16777216
	.HasButtonsCustom(1) = 33554432
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Root 1")
		.InsertItem h,,"Child 1"
		.InsertItem h,,"Child 2"
		.ExpandItem(h) = True
		h = .AddItem("Root 2")
		.InsertItem h,,"Child"
	End With
	.EndUpdate 
End With
1747:
Is there any option to control where I can drop the items when using the AutoDrag property
' AllowAutoDrag event - Occurs when the user drags the item between InsertA and InsertB as child of NewParent.
Private Sub G2antt1_AllowAutoDrag(ByVal Item As EXG2ANTTLibCtl.HITEM,ByVal NewParent As EXG2ANTTLibCtl.HITEM,ByVal InsertA As EXG2ANTTLibCtl.HITEM,ByVal InsertB As EXG2ANTTLibCtl.HITEM,Cancel As Boolean)
	With G2antt1
		With .Items
			Debug.Print( "NewParent" )
			Debug.Print( .CellCaption(NewParent,0) )
			Debug.Print( "After" )
			Debug.Print( .CellCaption(InsertA,0) )
			Debug.Print( "Before" )
			Debug.Print( .CellCaption(InsertB,0) )
		End With
		Cancel = True
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.AutoDrag = exAutoDragPositionAny
	.LinesAtRoot = exNoLinesAtRoot
	.HasLines = exThinLine
	.ShowFocusRect = False
	.Columns.Add "Task"
	With .Chart
		.ShowNonworkingDates = False
		.FirstVisibleDate = #12/29/2000#
		.PaneWidth(False) = 96
		.LevelCount = 2
	End With
	With .Items
		h = .AddItem("Group 1")
		.ItemDivider(h) = 0
		.ItemBold(h) = True
		h1 = .InsertItem(h,,"Task 1")
		.AddBar h1,"Task",#1/2/2001#,#1/4/2001#,"K1"
		h2 = .InsertItem(h,,"Task 2")
		.AddBar h2,"Task",#1/5/2001#,#1/7/2001#,"K2"
		.AddLink "L1",h1,"K1",h2,"K2"
		.Link("L1",exLinkText) = "L1"
		h3 = .InsertItem(h,,"Task 3")
		.AddBar h3,"Task",#1/8/2001#,#1/10/2001#,"K3"
		.AddLink "L2",h2,"K2",h3,"K3"
		.Link("L2",exLinkText) = "L2"
		.ExpandItem(h) = True
		h = .AddItem("Group 2")
		.ItemBold(h) = True
		.ItemDivider(h) = 0
	End With
	.EndUpdate 
End With
1746:
The column (chart section ) overlaps the bars, when using the ColumnsFormatLevel property. How can I prevent that

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Columns.Add("Start")
		.Def(exCellValueToItemBarProperty) = 1
		.Visible = False
		.Alignment = LeftAlignment
	End With
	With .Columns.Add("End")
		.Def(exCellValueToItemBarProperty) = 2
		.Visible = False
		.Alignment = RightAlignment
	End With
	With .Chart
		.FirstVisibleDate = #1/2/2001#
		.LevelCount = 2
		.PaneWidth(False) = 48
		.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52"
		.ColumnsTransparent = 50
	End With
	With .Items
		.AllowCellValueToItemBar = True
		.AddBar .AddItem("Task 1"),"Task",#1/3/2001#,#1/7/2001#
		.AddBar .AddItem("Task 2"),"Task",#1/4/2001#,#1/8/2001#
	End With
	.EndUpdate 
End With
1745:
How do I show the column ( chart section ) with a different background color, when using the ColumnsFormatLevel property (method 2)

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Columns.Add("Start")
		.Def(exCellValueToItemBarProperty) = 1
		.Visible = False
		.Alignment = LeftAlignment
	End With
	With .Columns.Add("End")
		.Def(exCellValueToItemBarProperty) = 2
		.Visible = False
		.Alignment = RightAlignment
	End With
	With .Chart
		.FirstVisibleDate = #1/2/2001#
		.LevelCount = 2
		.PaneWidth(False) = 48
		.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52"
	End With
	With .Items
		.AllowCellValueToItemBar = True
		.AddBar .AddItem("Task 1"),"Task",#1/3/2001#,#1/7/2001#
		.AddBar .AddItem("Task 2"),"Task",#1/4/2001#,#1/8/2001#
	End With
	.EndUpdate 
End With
1744:
How do I show the column ( chart section ) with a different background color, when using the ColumnsFormatLevel property (method 1)

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Columns.Add("Start")
		.Def(exCellValueToItemBarProperty) = 1
		.Visible = False
		.Alignment = LeftAlignment
		.Def(exCellBackColor) = 12500670
	End With
	With .Columns.Add("End")
		.Def(exCellValueToItemBarProperty) = 2
		.Visible = False
		.Alignment = RightAlignment
		.Def(exCellBackColor) = 12500670
	End With
	With .Chart
		.FirstVisibleDate = #12/31/2000#
		.LevelCount = 2
		.PaneWidth(False) = 48
		.ColumnsFormatLevel = "1:52,|,2:52"
	End With
	With .Items
		.AllowCellValueToItemBar = True
		.AddBar .AddItem("Task 1"),"Task",#1/3/2001#,#1/7/2001#
		.AddBar .AddItem("Task 2"),"Task",#1/4/2001#,#1/8/2001#
	End With
	.EndUpdate 
End With
1743:
How can I display the control's content on an single A3 paper size, when using PDF format

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.AntiAliasing = True
	With .Chart
		.FirstVisibleDate = #12/24/2000#
		.PaneWidth(False) = 96
		.LevelCount = 2
		.UnitScale = exDay
		With .Bars.Item("Task")
			.Pattern = exPatternSolid
			.Color = RGB(0,0,0)
			.Height = 16
		End With
	End With
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#12/25/2000#,#1/5/2001#,"1","<fgcolor=FFFFFF>Center"
		.ItemBar(h,"1",exBarExtraCaption) = "left"
		.ItemBar(h,"1",exBarExtraCaptionHAlign) = 16
		h = .AddItem("Task 2")
		.AddBar h,"Task",#1/5/2001#,#1/16/2001#,"1","<fgcolor=FFFFFF>Center"
		h = .AddItem("Task 3")
		.AddBar h,"Task",#1/16/2001#,#1/26/2001#,"2","Center"
		.ItemBar(h,"2",exBarExtraCaption) = "right"
		.ItemBar(h,"2",exBarExtraCaptionHAlign) = 18
	End With
	With .Chart.Notes
		With .Add("1S",G2antt1.Items.ItemByIndex(1),"1","<%m3%>-<%d%>")
			.PartShadow(exNoteEnd) = False
			.PartHOffset(exNoteEnd) = -16
			.PartVOffset(exNoteEnd) = 4
		End With
		With .Add("1F",G2antt1.Items.ItemByIndex(1),"1","<%m3%>-<%d%>")
			.RelativePosition = 1
			.PartShadow(exNoteEnd) = False
			.PartHOffset(exNoteEnd) = 16
			.PartVOffset(exNoteEnd) = -4
		End With
	End With
	var_CopyTo = .CopyTo("C:\Temp\Preview.pdf|11.69 in x 16.53 in||single")
	Debug.Print( "Look for C:\Temp\Preview.pd file." )
	.EndUpdate 
End With
1742:
How can I display the control's content on an A3 paper size, when using PDF format

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.AntiAliasing = True
	With .Chart
		.FirstVisibleDate = #12/24/2000#
		.PaneWidth(False) = 96
		.LevelCount = 2
		.UnitScale = exDay
		With .Bars.Item("Task")
			.Pattern = exPatternSolid
			.Color = RGB(0,0,0)
			.Height = 16
		End With
	End With
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#12/25/2000#,#1/5/2001#,"1","<fgcolor=FFFFFF>Center"
		.ItemBar(h,"1",exBarExtraCaption) = "left"
		.ItemBar(h,"1",exBarExtraCaptionHAlign) = 16
		h = .AddItem("Task 2")
		.AddBar h,"Task",#1/5/2001#,#1/16/2001#,"1","<fgcolor=FFFFFF>Center"
		h = .AddItem("Task 3")
		.AddBar h,"Task",#1/16/2001#,#1/26/2001#,"2","Center"
		.ItemBar(h,"2",exBarExtraCaption) = "right"
		.ItemBar(h,"2",exBarExtraCaptionHAlign) = 18
	End With
	With .Chart.Notes
		With .Add("1S",G2antt1.Items.ItemByIndex(1),"1","<%m3%>-<%d%>")
			.PartShadow(exNoteEnd) = False
			.PartHOffset(exNoteEnd) = -16
			.PartVOffset(exNoteEnd) = 4
		End With
		With .Add("1F",G2antt1.Items.ItemByIndex(1),"1","<%m3%>-<%d%>")
			.RelativePosition = 1
			.PartShadow(exNoteEnd) = False
			.PartHOffset(exNoteEnd) = 16
			.PartVOffset(exNoteEnd) = -4
		End With
	End With
	var_CopyTo = .CopyTo("C:\Temp\Preview.pdf|11.69 in x 16.53 in")
	Debug.Print( "Look for C:\Temp\Preview.pd file." )
	.EndUpdate 
End With
1741:
How can I specify the grouping strategy, ie numbers from 1 to 5 are given the value (1-5) and grouping is done on this new value

' AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
Private Sub G2antt1_AddGroupItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.ItemBold(Item) = True
			.AddBar Item,"Summary",.CellValue(Item,1),.CellValue(Item,2)
			.DefineSummaryBars Item,"",-3,""
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.AllowGroupBy = True
	.SortBarVisible = True
	.MarkSearchColumn = False
	With .Columns
		.Add "Tasks"
		With .Add("Start")
			.Def(exCellValueToItemBarProperty) = 1
			.AllowGroupBy = False
		End With
		With .Add("End")
			.Def(exCellValueToItemBarProperty) = 2
			.AllowGroupBy = False
		End With
	End With
	With .Chart
		.FirstVisibleDate = #9/20/2006#
		.LevelCount = 2
		.PaneWidth(0) = 256
	End With
	With .Items
		.AllowCellValueToItemBar = True
		.AddBar .AddItem("1"),"Task",#9/21/2006#,#9/27/2006#
		.AddBar .AddItem("1"),"Task",#9/22/2006#,#9/28/2006#
		.AddBar .AddItem("2"),"Task",#9/22/2006#,#9/28/2006#
		.AddBar .AddItem("2"),"Task",#9/23/2006#,#9/29/2006#
		.AddBar .AddItem("3"),"Task",#9/25/2006#,#9/29/2006#
		.AddBar .AddItem("3"),"Task",#9/26/2006#,#9/30/2006#
	End With
	With .Columns.Add("Tasks - Group")
		.Visible = False
		.FormatColumn = "%0 in (1,2) ? `1 - 2` : `3 -`"
		.SortOrder = SortAscending
	End With
	.EndUpdate 
End With
1740:
How can I filter the chart and its content, not the items section

' RClick event - Fired when right mouse button is clicked
Private Sub G2antt1_RClick()
	With G2antt1
		.Columns.Item("Start").ShowFilter "-1,-1,128,128"
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.SortBarVisible = True
	.MarkSearchColumn = False
	With .Columns
		.Add "Tasks"
		With .Add("Start")
			.Def(exCellValueToItemBarProperty) = 1
			.DisplayFilterDate = True
			.DisplayFilterPattern = False
			.FilterList = FilterListEnum.exShowExclude Or FilterListEnum.exShowCheckBox
			.Visible = False
		End With
		With .Add("End")
			.Def(exCellValueToItemBarProperty) = 2
			.DisplayFilterDate = True
			.DisplayFilterPattern = False
			.Visible = False
			.FilterList = FilterListEnum.exShowExclude Or FilterListEnum.exShowCheckBox
			.Visible = False
		End With
	End With
	With .Chart
		.FirstVisibleDate = #9/20/2006#
		.LevelCount = 2
		.PaneWidth(0) = 128
	End With
	With .Items
		.AllowCellValueToItemBar = True
		.AddBar .AddItem("Task 1"),"Task",#9/21/2006#,#9/27/2006#
		.AddBar .AddItem("Task 2"),"Task",#9/22/2006#,#9/28/2006#
		.AddBar .AddItem("Task 3"),"Task",#9/22/2006#,#9/28/2006#
		.AddBar .AddItem("Task 4"),"Task",#9/23/2006#,#9/29/2006#
		.AddBar .AddItem("Task 5"),"Task",#9/25/2006#,#9/29/2006#
		.AddBar .AddItem("Task 6"),"Task",#9/26/2006#,#9/30/2006#
	End With
	.EndUpdate 
End With
1739:
How do I enable the Group-By feature

' AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
Private Sub G2antt1_AddGroupItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.ItemBackColor(Item) = RGB(240,240,240)
			G2antt1.Chart.ItemBackColor(Item) = RGB(240,240,240)
			.ItemDividerLine(Item) = EmptyLine
			.AddBar Item,"Summary",.CellValue(Item,1),.CellValue(Item,2)
			.DefineSummaryBars Item,"",-3,""
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.AllowGroupBy = True
	.SortBarVisible = True
	.MarkSearchColumn = False
	With .Columns
		.Add "Tasks"
		With .Add("Start")
			.Def(exCellValueToItemBarProperty) = 1
			.AllowGroupBy = False
		End With
		With .Add("End")
			.Def(exCellValueToItemBarProperty) = 2
			.AllowGroupBy = False
		End With
	End With
	With .Chart
		.FirstVisibleDate = #9/20/2006#
		.LevelCount = 2
		.PaneWidth(0) = 256
	End With
	With .Items
		.AllowCellValueToItemBar = True
		.AddBar .AddItem("Task 1"),"Task",#9/21/2006#,#9/27/2006#
		.AddBar .AddItem("Task 1"),"Task",#9/22/2006#,#9/28/2006#
		.AddBar .AddItem("Task 2"),"Task",#9/22/2006#,#9/28/2006#
		.AddBar .AddItem("Task 2"),"Task",#9/23/2006#,#9/29/2006#
		.AddBar .AddItem("Task 3"),"Task",#9/25/2006#,#9/29/2006#
		.AddBar .AddItem("Task 3"),"Task",#9/26/2006#,#9/30/2006#
	End With
	.Columns.Item(0).SortOrder = SortAscending
	.EndUpdate 
End With
1738:
Is there any method to know number/length/count/duration of working days in a bar ( excluding non-working days)

' SelectionChanged event - Fired after a new item has been selected.
Private Sub G2antt1_SelectionChanged()
	With G2antt1
		With .Items
			Debug.Print( .CellCaption(.FocusItem,0) )
			Debug.Print( .ItemBar(.FocusItem,"",exBarWorkingCount) )
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.SelBackColor = RGB(142,190,255)
	.SelForeColor = RGB(0,0,0)
	With .Chart
		.PaneWidth(False) = 96
		.FirstVisibleDate = #1/1/2002#
		With .Bars.Add("Task:Split")
			.Shortcut = "Task"
			.Def(exBarCaption) = "<%=%258%><font ;6><off 3>w/units"
			.Def(exBarHAlignCaption) = 18
		End With
		.SelBackColor = G2antt1.SelBackColor
	End With
	.Columns.Add "Task"
	With .Items
		h = .AddItem("Task A")
		.AddBar h,"Task",#1/2/2002#,#1/9/2002#
		h = .AddItem("Task B")
		.AddBar h,"Task",#1/3/2002#,#1/8/2002#
		.SelectItem(h) = True
		h = .AddItem("Task C")
		.AddBar h,"Task",#1/4/2002#,#1/5/2002#
	End With
	.EndUpdate 
End With
1737:
How do i verify weather specified unit is Nonworking Working Unit

' MouseMove event - Occurs when the user moves the mouse.
Private Sub G2antt1_MouseMove(Button As Integer,Shift As Integer,X As Single,Y As Single)
	With G2antt1
		h = .ItemFromPoint(-1,-1,c,hit)
		d = .Chart.DateFromPoint(-1,-1)
		Debug.Print( d )
		Debug.Print( .Chart.IsNonworkingDate(d,h) )
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Columns.Add "NonWorking"
	With .Chart
		.FirstWeekDay = exMonday
		.FirstVisibleDate = #1/24/2008#
		.PaneWidth(False) = 64
		.LevelCount = 2
	End With
	With .Items
		h = .AddItem("Default")
		h = .AddItem("January")
		.ItemNonworkingUnits(h,False) = "month(value) = 1"
		h = .AddItem("February, Saturday, Sunday")
		.ItemNonworkingUnits(h,False) = "month(value) = 2 or (weekday(value) = 0 or weekday(value) = 6)"
		h = .AddItem("Sunday")
		.ItemNonworkingUnits(h,False) = "weekday(value) = 0"
	End With
	.EndUpdate 
End With
1736:
How can I specify the bar's caption to be caption from a column/cell

' Change event - Occurs when the user changes the cell's content.
Private Sub G2antt1_Change(ByVal Item As EXG2ANTTLibCtl.HITEM,ByVal ColIndex As Long,NewValue As Variant)
	With G2antt1
		.Refresh 
	End With
End Sub

With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 64
		With .Bars.Item("Task")
			.Def(exBarCaption) = "<fgcolor=808080><%=%C0%>"
			.Def(exBarHAlignCaption) = 18
		End With
	End With
	With .Columns.Add("Task").Editor
		.EditType = DropDownListType
		.AddItem 1,"Aka"
		.AddItem 2,"Baka"
		.AddItem 3,"Taka"
	End With
	With .Items
		.AddBar .AddItem(1),"Task",#1/2/2001#,#1/5/2001#
		.AddBar .AddItem(2),"Task",#1/3/2001#,#1/6/2001#
		.AddBar .AddItem(3),"Task",#1/4/2001#,#1/7/2001#
	End With
	.EndUpdate 
End With
1735:
The histogram values displayed on the chart are using 2 decimal places. Can this be formated to just 0 decimal place, so 86.79% becomes 87%

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Columns.Add("Effort")
		.Def(exCellValueToItemBarProperty) = 21
		.Editor.EditType = SpinType
	End With
	With .Chart
		.LevelCount = 2
		.NonworkingDays = 0
		.PaneWidth(False) = 96
		.FirstVisibleDate = #6/20/2005#
		.HistogramVisible = True
		.HistogramHeight = 128
		.HistogramView = exHistogramAllItems
		With .Bars.Item("Task")
			.HistogramPattern = .Pattern
			.HistogramType = exHistOverload
			.HistogramCriticalValue = 3
			.ShowHistogramValues = "value>3?255:1"
			.HistogramItems = -11
			.HistogramGridLinesColor = RGB(192,192,192)
			.HistogramRulerLinesColor = RGB(0,0,1)
			.FormatHistogramValues = "(value format `0`) + ` units`"
		End With
	End With
	With .Items
		.AllowCellValueToItemBar = True
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task",#6/21/2005#,#6/23/2005#
		.CellValue(h1,1) = 6.79
		h1 = .AddItem("Task 2")
		.AddBar h1,"Task",#6/24/2005#,#6/26/2005#
		.CellValue(h1,1) = 3.19
		h1 = .AddItem("Task 3")
		.AddBar h1,"Task",#6/27/2005#,#6/29/2005#
		.CellValue(h1,1) = 2
		h1 = .AddItem("Task 4")
		.AddBar h1,"Task",#6/30/2005#,#7/2/2005#
		.CellValue(h1,1) = 1
	End With
	.EndUpdate 
End With
1734:
How can I create a relative time-scale

With G2antt1
	.BeginUpdate 
	.DefaultItemHeight = 24
	.HeaderHeight = .DefaultItemHeight
	.GridLineStyle = exGridLinesSolid
	.DrawGridLines = exAllLines
	.LinesAtRoot = exNoLinesAtRoot
	.BackColorLevelHeader = .BackColor
	With .Chart
		.DrawGridLines = exAllLines
		.GridLineStyle = exGridLinesSolid
		.PaneWidth(False) = 128
		.LevelCount = 2
		.FirstVisibleDate = 0
		.NonworkingDays = 0
		.UnitWidth = 36
		With .Level(0)
			.Unit = exDay
			.Count = 6
			.Alignment = CenterAlignment
			.Label = "<%i%>"
			.FormatLabel = "'<b>' + ( (value / 6)  array ('Jan','Feb','Mar','Apr','May','Jun','Jul','Aug','Sep','Oct','Nov','Dec') ) + '-16'"
		End With
		With .Level(1)
			.Label = "<%i%>"
			.FormatLabel = "1 + value mod 6 + ` `"
			.Alignment = RightAlignment
		End With
		.AdjustLevelsToBase = True
		.ScrollRange(exStartDate) = 0
		.ScrollRange(exEndDate) = 95
		With .Bars.Item("Task")
			.Height = 15
			.Color = RGB(252,213,180)
			.Pattern = exPatternSolid
			.Def(exBarCaption) = "date blocking"
		End With
	End With
	.Columns.Add "Company"
	With .Items
		h = .AddItem("ABC Company")
		.ItemBackColor(h) = RGB(240,240,240)
		G2antt1.Chart.ItemBackColor(h) = RGB(240,240,240)
		hChild = .InsertItem(h,,"line 1")
		.AddBar hChild,"Task",0,3
		hChild = .InsertItem(h,,"line 2")
		.AddBar hChild,"Task",3,5,"A"
		.AddBar hChild,"Task",7,10,"B"
		hChild = .InsertItem(h,,"line 3")
		.AddBar hChild,"Task",5,8,"A"
		.AddBar hChild,"Task",9,12,"B"
		.ExpandItem(h) = True
	End With
	.EndUpdate 
End With
1733:
Extending the bar's visual appearance with additional objects, EBNs, using the exBarBackgroundExt and exBarBackgroundExtInflate

With G2antt1
	.BeginUpdate 
	.DefaultItemHeight = 32
	With .VisualAppearance
		.Add 1,"gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYE" & _
"DGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XzAcj3dbmAYJQzB" & _
"JLxKSIDwCd6NXrCOJ5HhWDzjQjJMozLC8YiPG6fZRbeT4ToGNdXYhJWiyLiFeYtVzSMj1fD9Ir/EakbLtey4Lq2A53RzdHThSQpCwPA4BgIA="
		.Add 2,"gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYE" & _
"DGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NrXHZ9YwTOC5IDke67cr2J53XZAd4QTb2Cz7QC8" & _
"QAvDA7awafM1MSuHIcOw/AqTYDkTq4XjODYhTDEc4zPLcFx/I6haBoWCSLi+T5VVrRMo1TKtRxnNaubZqO5aRrGe5NW6EXThSQpCr+f4BgIA="
		.Add 3,"gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYE" & _
"DGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XxfV6YBa8B4JPaE" & _
"ZLwLB7dwaf6IQLiWLYHiAAYZRKTcxlDI8AwvFaaZjnWA5ZaOMZBU7RNRyHR9IyTDaWaTqeqbHIuJ4FUzaNY2fZrOz2F6FAA6cKSFIWFYVAMBA"
		.Add 4,"gBFLBCJwBAEHhEJAADhABb8IQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYE" & _
"DGHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XxfV6YBa8B4JPaE" & _
"ZLwLB7dwaf6IQLiWLYHiAAYBIbJI5yeb5Hx3HqfZjbeSxVoML43SzHcByGRcTwzC6pYjrGoZJpWZ4ZQrbNR3DZ8VzzNTrQxIUhYVhUAkB"
		.RenderType = -16777216
	End With
	With .Chart
		.PaneWidth(False) = 164
		.FirstVisibleDate = #1/1/2001#
		.NonworkingDaysColor = RGB(240,240,240)
		.NonworkingDaysPattern = exPatternBDiagonal
		With .Bars.Item("Task")
			.Height = 17
			.Color = RGB(255,255,255)
			.Pattern = exPatternSolid
			.Def(exBarFrameColor) = 1
		End With
	End With
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Task"),"Task",#1/2/2001#,#1/6/2001#,""
		h = .AddItem("Task+Rhombus(red)")
		.AddBar h,"Task",#1/2/2001#,#1/7/2001#,""
		.ItemBar(h,"",exBarBackgroundExt) = "none[(100%-11,50%-6,11,11),back=0x10000FF]"
		.ItemBar(h,"",exBarBackgroundExtInflate) = ",,5"
		h = .AddItem("Rhombus(red)+Task")
		.AddBar h,"Task",#1/2/2001#,#1/8/2001#,""
		.ItemBar(h,"",exBarBackgroundExt) = "none[(0,50%-6,11,11),back=0x10000FF]"
		.ItemBar(h,"",exBarBackgroundExtInflate) = "-5"
		h = .AddItem("Task(yellow)+Rhombus(blue)")
		.AddBar h,"Task",#1/2/2001#,#1/9/2001#,""
		.ItemBar(h,"",exBarBackgroundExt) = "none[(100%-11,50%-6,11,11),back=0x1FF0000]"
		.ItemBar(h,"",exBarBackgroundExtInflate) = ",,5"
		.ItemBar(h,"",exBarColor) = 65535
		h = .AddItem("Rhombus(blue)+Task(yellow)")
		.AddBar h,"Task",#1/2/2001#,#1/8/2001#,""
		.ItemBar(h,"",exBarBackgroundExt) = "none[(0,50%-6,11,11),back=0x1FF0000]"
		.ItemBar(h,"",exBarBackgroundExtInflate) = "-5"
		.ItemBar(h,"",exBarColor) = 65535
		h = .AddItem("TriangleUp(white)+Task")
		.AddBar h,"Task",#1/2/2001#,#1/7/2001#,""
		.ItemBar(h,"",exBarBackgroundExt) = "none[(0,50%-6,11,11),back=0x2FFFFFF]"
		.ItemBar(h,"",exBarBackgroundExtInflate) = "-5"
		h = .AddItem("TriangleUp(blue)+Task(magenta)+TriangleDown(red)")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#,""
		.ItemBar(h,"",exBarBackgroundExt) = "none[(0,50%-6,11,11),back=0x02FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]"
		.ItemBar(h,"",exBarBackgroundExtInflate) = "-5,0,5,0"
		.ItemBar(h,"",exBarColor) = 16744703
		h = .AddItem("Rhombus+Task+TriangleDown")
		.AddBar h,"Task",#1/2/2001#,#1/7/2001#,""
		.ItemBar(h,"",exBarBackgroundExt) = "none[(0,50%-6,11,11),back=0x01FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]"
		.ItemBar(h,"",exBarBackgroundExtInflate) = "-5, 0,5,0"
		.ItemBar(h,"",exBarColor) = 16744448
		h = .AddItem("Rhombus+Task+TriangleDown")
		.AddBar h,"Task",#1/2/2001#,#1/8/2001#,""
		.ItemBar(h,"",exBarBackgroundExt) = "none[(50%-6,0,11,11),back=0x01FF0000],none[(50%-6,100%-11,11,11),back=0x010000FF]"
		.ItemBar(h,"",exBarBackgroundExtInflate) = "0,-5,0,5"
		h = .AddItem("Task+Star")
		.AddBar h,"Task",#1/2/2001#,#1/9/2001#,""
		.ItemBar(h,"",exBarBackgroundExt) = "none[(100%-11,0,11,11),back=0x4FFFFFF]"
		.ItemBar(h,"",exBarBackgroundExtInflate) = 5
		h = .AddItem("Star+Task")
		.AddBar h,"Task",#1/2/2001#,#1/8/2001#,""
		.ItemBar(h,"",exBarBackgroundExt) = "none[(0,100%-11,11,11),back=0x04FFFFFF]"
		.ItemBar(h,"",exBarBackgroundExtInflate) = 5
		h = .AddItem("Task+Star")
		.AddBar h,"Task",#1/2/2001#,#1/7/2001#,""
		.ItemBar(h,"",exBarBackgroundExt) = "none[(100%-11,0,11,11),back=0x4FFFFFF]"
		.ItemBar(h,"",exBarBackgroundExtInflate) = "0,-6,14"
	End With
	.EndUpdate 
End With
1732:
I am using the ItemBar(exBarFrameColor) to display an additional EBN on the current bar. The problem is that I still need a black frame around the bar. How can I achieve that

With G2antt1
	.BeginUpdate 
	With .VisualAppearance
		.Add 1,"gBFLBCJwBAEHhEJAADhABXMIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EQLhGBRQCULQxDCBMIjLJoWhsASVRhnCBBR" & _
"hwAI7ShPUBgXBNCQzICTJJkSJZBiECIJFAaJhnIapZDKGKQWCjAgiNpqGQ2QiKFC2HAcEAxCxGJBoKKZGq2bpJQLbdxUXRVZzpNi7Louay5CrOCZvXxaeAXDa+Az5ODD" & _
"MRwLBcKhzCKDYzfdrZFaWFT3Qi8aCvG6sbw/HZ0OrEEIwCEBA"
		.Add 2,"CP:1 0 0 5 0"
		.Add 3,"gBFLBCJwBAEHhEJAADhABUEIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLIxhEYobgmGIaRiBMIxAKIZhzEgYRoiAYhXDiHwxARHUgRfIEOwHDiBZomWKZE" & _
"iaKIqRrLMryFLMZx3CqcAApGaqHiOCYlSbTcoyfJYZBzD6mKJpWipWheW48U7PVRDJSkNysASZIyrGKqJouX4WR7BcZgNR4YBgEoWRouSBLWrgNIVR6/eBABZFPzbNK3" & _
"ZzdOIIJgEgIA="
		.RenderType = -16777216
	End With
	With .Chart
		.PaneWidth(False) = 164
		.FirstVisibleDate = #1/1/2001#
		.Bars.Item("Task").Color = &H3ff0000
		.Bars.Copy("Task","NewTask").Height = 15
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Task")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#
		.AddBar h,"NewTask",#1/8/2001#,#1/12/2001#,"new"
		h = .AddItem("Task+Rhombus")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#
		.ItemBar(h,"",exBarFrameColor) = 33554432
		.AddBar h,"NewTask",#1/8/2001#,#1/12/2001#,"new"
		.ItemBar(h,"new",exBarFrameColor) = 33554432
		h = .AddItem("Task/Color+Rhombus")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#
		.ItemBar(h,"",exBarFrameColor) = 33554687
		.ItemBar(h,"",exBarColor) = 65280
		.AddBar h,"NewTask",#1/8/2001#,#1/12/2001#,"new"
		.ItemBar(h,"new",exBarFrameColor) = 33554687
		.ItemBar(h,"new",exBarColor) = 65280
		h = .AddItem("Task/Color+Rhombus/Color")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#
		.ItemBar(h,"",exBarFrameColor) = 33619712
		.ItemBar(h,"",exBarColor) = 16711935
		.AddBar h,"NewTask",#1/8/2001#,#1/12/2001#,"new"
		.ItemBar(h,"new",exBarFrameColor) = 33619712
		.ItemBar(h,"new",exBarColor) = 16711935
	End With
	.EndUpdate 
End With
1731:
I am using EBN objects to show my bars, but when apply a color to the EBN looks darker. Is it possible to get the same color brightness

With G2antt1
	.BeginUpdate 
	With .VisualAppearance
		.Add 1,"gBFLBCJwBAEHhEJAADhABWkIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EZBGABYJDUMAlCyNQBQSKIYxnAgYY4ACZ5I" & _
"jqAwLQjQEYzZI0SxJCqQZBBCCSQKkYx0HScRijDILBQwIQmaqjEZoJCiQZfQLCAYRMhkQx9DKTLRtKhYDqubpHUZbdwWRaVYTlM6RLbhGy7YqefJtXLfN4WZgWCz9QLD" & _
"I4wS78JruaqOW5hVz4BasfTrOzLcTzG4HLhCCYBgI"
		.Add 2,"CP:1 -6 0 0 0"
		.RenderType = -16777216
	End With
	With .Chart
		.PaneWidth(False) = 164
		.FirstVisibleDate = #1/1/2001#
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Task")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#
		h = .AddItem("Task+Rhombus")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#
		.ItemBar(h,"",exBarFrameColor) = 33554432
		h = .AddItem("Task/Color+Rhombus")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#
		.ItemBar(h,"",exBarFrameColor) = 33554687
		.ItemBar(h,"",exBarColor) = 65280
		h = .AddItem("Task/Color+Rhombus/Color")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#
		.ItemBar(h,"",exBarFrameColor) = 33619712
		.ItemBar(h,"",exBarColor) = 16711935
	End With
	.EndUpdate 
End With
1730:
The ItemBar(exBarColor) changes the color for margins, and there is no exBarStartColor/exBarEndColor. However in my case I would then like do dynamically change the bar color to a different color without changing the start shape color

With G2antt1
	.BeginUpdate 
	With .VisualAppearance
		.Add 1,"gBFLBCJwBAEHhEJAADhABWkIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EZBGABYJDUMAlCyNQBQSKIYxnAgYY4ACZ5I" & _
"jqAwLQjQEYzZI0SxJCqQZBBCCSQKkYx0HScRijDILBQwIQmaqjEZoJCiQZfQLCAYRMhkQx9DKTLRtKhYDqubpHUZbdwWRaVYTlM6RLbhGy7YqefJtXLfN4WZgWCz9QLD" & _
"I4wS78JruaqOW5hVz4BasfTrOzLcTzG4HLhCCYBgI"
		.Add 2,"CP:1 -6 0 0 0"
	End With
	With .Chart
		.PaneWidth(False) = 164
		.FirstVisibleDate = #1/1/2001#
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Task")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#
		h = .AddItem("Task+Rhombus")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#
		.ItemBar(h,"",exBarFrameColor) = 33554432
		h = .AddItem("Task/Color+Rhombus")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#
		.ItemBar(h,"",exBarFrameColor) = 33554432
		.ItemBar(h,"",exBarColor) = 65280
		h = .AddItem("Task/Color+Rhombus/Color")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#
		.ItemBar(h,"",exBarFrameColor) = 33619712
		.ItemBar(h,"",exBarColor) = 16711935
	End With
	.EndUpdate 
End With
1729:
The ItemBar(exBarColor) changes the color for margins, and there is no exBarStartColor/exBarEndColor. However in my case I would then like do dynamically change the bar color to a different color without changing the end shape color

With G2antt1
	.BeginUpdate 
	With .VisualAppearance
		.Add 1,"gBFLBCJwBAEHhEJAADhABXMIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EQLhGBRQCULQxDCBMIjLJoWhsASVRhnCBBR" & _
"hwAI7ShPUBgXBNCQzICTJJkSJZBiECIJFAaJhnIapZDKGKQWCjAgiNpqGQ2QiKFC2HAcEAxCxGJBoKKZGq2bpJQLbdxUXRVZzpNi7Louay5CrOCZvXxaeAXDa+Az5ODD" & _
"MRwLBcKhzCKDYzfdrZFaWFT3Qi8aCvG6sbw/HZ0OrEEIwCEBA"
		.Add 2,"CP:1 0 0 6 0"
	End With
	With .Chart
		.PaneWidth(False) = 164
		.FirstVisibleDate = #1/1/2001#
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Task")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#
		h = .AddItem("Task+Rhombus")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#
		.ItemBar(h,"",exBarFrameColor) = 33554432
		h = .AddItem("Task/Color+Rhombus")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#
		.ItemBar(h,"",exBarFrameColor) = 33554432
		.ItemBar(h,"",exBarColor) = 65280
		h = .AddItem("Task/Color+Rhombus/Color")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#
		.ItemBar(h,"",exBarFrameColor) = 33619712
		.ItemBar(h,"",exBarColor) = 16711935
	End With
	.EndUpdate 
End With
1728:
Is it possible to resize a column with the mouse without changing the width of the next column

With G2antt1
	.BeginUpdate 
	.ColumnAutoResize = False
	.Columns.Add("Column 1").Width = 256
	.Columns.Add("Column 2").Width = 512
	.DrawGridLines = exAllLines
	.EndUpdate 
End With
1727:
How can I align captions of items with checkbox, with items with no checkbox

With G2antt1
	.BeginUpdate 
	.Columns.Add "Default"
	With .Items
		.CellImages(.AddItem(0),0) = "1"
		.CellHasCheckBox(.AddItem(1),0) = True
		.CellImages(.AddItem(2),0) = "1"
	End With
	.EndUpdate 
End With
1726:
How can I show each group header ( not-subroup ), with a different background color, while alternate background colors for inside items

' AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
Private Sub G2antt1_AddGroupItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Summary",.CellValue(Item,2),.CellValue(Item,4)
			.DefineSummaryBars Item,"",-3,""
		End With
	End With
End Sub

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

' LayoutChanged event - Occurs when column's position or column's size is changed.
Private Sub G2antt1_LayoutChanged()
	With G2antt1
		.Refresh 
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Chart.FirstVisibleDate = #9/1/1994#
	.Chart.PaneWidth(False) = 312
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb",3,3
	End With
	.DataSource = rs
	.Items.AllowCellValueToItemBar = True
	.Columns.Item(2).Def(exCellValueToItemBarProperty) = 1
	.Columns.Item(4).Def(exCellValueToItemBarProperty) = 2
	.SortBarVisible = True
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = True
	.Columns.Item(1).SortOrder = SortAscending
	With .Columns.Add("Position")
		.FormatColumn = "(0:= (1 rpos '')) right ( ( 1:= ( =:0 rfind `.` ) ) != -1 ? =:1 : len(=:0))"
		.Visible = False
	End With
	With .Columns.Add("Position")
		.FormatColumn = "(1 rpos '') contains '.'"
		.Visible = False
	End With
	.ConditionalFormats.Add("(%C13 mod 2) != 0").BackColor = RGB(240,240,240)
	.ConditionalFormats.Add("%C14 = 0").BackColor = RGB(190,190,190)
	.EndUpdate 
End With
1725:
What is the difference between %0 and %C0, when using in expressions ( format, conditional format, computed fields, and so on )

With G2antt1
	.BeginUpdate 
	.Chart.PaneWidth(True) = 0
	.HeaderAppearance = Etched
	.HeaderHeight = 24
	.ScrollBySingleLine = True
	.DrawGridLines = exRowLines
	.Columns.Add("Value").Def(exCellValueFormat) = 1
	With .Columns.Add("FormatColumn = `%0` ~ CellValue")
		.FormatColumn = "%0"
		.Def(exCellSingleLine) = False
	End With
	With .Columns.Add("FormatColumn = `%C0`~ CellCaption")
		.FormatColumn = "%C0"
		.Def(exCellSingleLine) = False
	End With
	With .Items
		.AddItem 1.1234
		.CellValueFormat(.AddItem("<sha ;;0>This <fgcolor=FF0000>is a <s><b>HTM</fgcolor>L</b> text</s>."),0) = exHTML
		With .CellEditor(.AddItem(3))
			.EditType = CheckListType
			.AddItem 1,"Border"
			.AddItem 2,"Thick"
			.AddItem 4,"Shadow"
		End With
		.FormatCell(.AddItem(10000),0) = "`<b>` + currency(value)"
	End With
	.EndUpdate 
End With
1724:
How can I alternate colors for each group header ( not-subroup ), with a different background color, while items of the same group showing with a different color

' AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
Private Sub G2antt1_AddGroupItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Summary",.CellValue(Item,2),.CellValue(Item,4)
			.DefineSummaryBars Item,"",-3,""
		End With
	End With
End Sub

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

' LayoutChanged event - Occurs when column's position or column's size is changed.
Private Sub G2antt1_LayoutChanged()
	With G2antt1
		.Refresh 
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Chart.FirstVisibleDate = #9/1/1994#
	.Chart.PaneWidth(False) = 312
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb",3,3
	End With
	.DataSource = rs
	.Items.AllowCellValueToItemBar = True
	.Columns.Item(2).Def(exCellValueToItemBarProperty) = 1
	.Columns.Item(4).Def(exCellValueToItemBarProperty) = 2
	.SortBarVisible = True
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = True
	.Columns.Item(1).SortOrder = SortAscending
	With .Columns.Add("Position")
		.FormatColumn = "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
		.Visible = False
	End With
	With .Columns.Add("Position")
		.FormatColumn = "(1 rpos '') contains '.'"
		.Visible = False
	End With
	.ConditionalFormats.Add("(%C13 mod 2) != 0").BackColor = RGB(240,240,240)
	.ConditionalFormats.Add("%C14 = 0").BackColor = RGB(190,190,190)
	.EndUpdate 
End With
1723:
How can I highlight each group header, with a different background color (method 2)

' AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
Private Sub G2antt1_AddGroupItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.ItemBackColor(Item) = RGB(190,190,190)
			.AddBar Item,"Summary",.CellValue(Item,2),.CellValue(Item,4)
			.DefineSummaryBars Item,"",-3,""
		End With
	End With
End Sub

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

' LayoutChanged event - Occurs when column's position or column's size is changed.
Private Sub G2antt1_LayoutChanged()
	With G2antt1
		.Refresh 
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Chart.FirstVisibleDate = #9/1/1994#
	.Chart.PaneWidth(False) = 312
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb",3,3
	End With
	.DataSource = rs
	.Items.AllowCellValueToItemBar = True
	.Columns.Item(2).Def(exCellValueToItemBarProperty) = 1
	.Columns.Item(4).Def(exCellValueToItemBarProperty) = 2
	.SortBarVisible = True
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = True
	.Columns.Item(1).SortOrder = SortAscending
	.EndUpdate 
End With
1722:
How can I highlight each group header ( not-subroup ), with a different background color (method 1)

' AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
Private Sub G2antt1_AddGroupItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Summary",.CellValue(Item,2),.CellValue(Item,4)
			.DefineSummaryBars Item,"",-3,""
		End With
	End With
End Sub

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

' LayoutChanged event - Occurs when column's position or column's size is changed.
Private Sub G2antt1_LayoutChanged()
	With G2antt1
		.Refresh 
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Chart.FirstVisibleDate = #9/1/1994#
	.Chart.PaneWidth(False) = 312
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb",3,3
	End With
	.DataSource = rs
	.Items.AllowCellValueToItemBar = True
	.Columns.Item(2).Def(exCellValueToItemBarProperty) = 1
	.Columns.Item(4).Def(exCellValueToItemBarProperty) = 2
	.SortBarVisible = True
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = True
	.Columns.Item(1).SortOrder = SortAscending
	With .Columns.Add("Position")
		.FormatColumn = "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
		.Visible = False
	End With
	With .Columns.Add("Position")
		.FormatColumn = "(1 rpos '') contains '.'"
		.Visible = False
	End With
	.ConditionalFormats.Add("%C14 = 0").BackColor = RGB(190,190,190)
	.EndUpdate 
End With
1721:
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for each sub-tree, ConditionalFormats, Add

' LayoutChanged event - Occurs when column's position or column's size is changed.
Private Sub G2antt1_LayoutChanged()
	With G2antt1
		.Refresh 
	End With
End Sub

' Sort event - Fired when the control sorts a column.
Private Sub G2antt1_Sort()
	With G2antt1
		.Refresh 
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.LinesAtRoot = exLinesAtRoot
	With .Columns.Add("P1")
		.Def(exCellHasCheckBox) = True
		.PartialCheck = True
	End With
	.Chart.PaneWidth(True) = 0
	With .Columns.Add("P2")
		.Def(exCellHasCheckBox) = True
		.PartialCheck = True
	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"
		.ExpandItem(h) = True
		h = .AddItem("Root 2")
		.InsertItem h,,"Child 1"
		.InsertItem h,,"Child 2"
		.ExpandItem(h) = True
	End With
	With .Columns.Add("Position")
		.FormatColumn = "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
		.Visible = False
	End With
	.ConditionalFormats.Add("(%C2 mod 2) != 0").BackColor = RGB(240,240,240)
	.EndUpdate 
End With
1720:
The BackColorAlternate displays each second row with a different background color. Is it possible to apply a different background color, for 2nd, 3rd, 4th, row, and so on

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

' LayoutChanged event - Occurs when column's position or column's size is changed.
Private Sub G2antt1_LayoutChanged()
	With G2antt1
		.Refresh 
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Chart.FirstVisibleDate = #9/1/1994#
	.Chart.PaneWidth(False) = 312
	.ColumnAutoResize = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb",3,3
	End With
	.DataSource = rs
	.Items.AllowCellValueToItemBar = True
	.Columns.Item(2).Def(exCellValueToItemBarProperty) = 1
	.Columns.Item(4).Def(exCellValueToItemBarProperty) = 2
	.Columns.Item(1).SortOrder = SortAscending
	With .Columns.Add("Position")
		.FormatColumn = "1 apos ''"
		.Visible = False
	End With
	.ConditionalFormats.Add("(%C13 mod 5) = 1").BackColor = RGB(128,128,128)
	.ConditionalFormats.Add("(%C13 mod 5) = 2").BackColor = RGB(164,164,164)
	.ConditionalFormats.Add("(%C13 mod 5) = 3").BackColor = RGB(190,190,190)
	.ConditionalFormats.Add("(%C13 mod 5) = 4").BackColor = RGB(240,240,240)
	.EndUpdate 
End With
1719:
The BackColorAlternate displays each second row with a different background color. The question I have it is possible to apply a different background color for 3rd, 4th, row, and so on

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

' LayoutChanged event - Occurs when column's position or column's size is changed.
Private Sub G2antt1_LayoutChanged()
	With G2antt1
		.Refresh 
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Chart.FirstVisibleDate = #9/1/1994#
	.Chart.PaneWidth(False) = 312
	.ColumnAutoResize = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb",3,3
	End With
	.DataSource = rs
	.Items.AllowCellValueToItemBar = True
	.Columns.Item(2).Def(exCellValueToItemBarProperty) = 1
	.Columns.Item(4).Def(exCellValueToItemBarProperty) = 2
	.Columns.Item(1).SortOrder = SortAscending
	With .Columns.Add("Position")
		.FormatColumn = "1 apos ''"
		.Visible = False
	End With
	.ConditionalFormats.Add("(%C13 mod 4) = 0").BackColor = RGB(240,240,240)
	.EndUpdate 
End With
1718:
The BackColorAlternate looks fine for flat tables, but how about using it when displaying a hierarchy/tree, like grouping rows. The sample alternate colors for each group found

' AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
Private Sub G2antt1_AddGroupItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Summary",.CellValue(Item,2),.CellValue(Item,4)
			.DefineSummaryBars Item,"",-3,""
		End With
	End With
End Sub

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

' LayoutChanged event - Occurs when column's position or column's size is changed.
Private Sub G2antt1_LayoutChanged()
	With G2antt1
		.Refresh 
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Chart.FirstVisibleDate = #9/1/1994#
	.Chart.PaneWidth(False) = 312
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb",3,3
	End With
	.DataSource = rs
	.Items.AllowCellValueToItemBar = True
	.Columns.Item(2).Def(exCellValueToItemBarProperty) = 1
	.Columns.Item(4).Def(exCellValueToItemBarProperty) = 2
	.SortBarVisible = True
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = True
	.Columns.Item(1).SortOrder = SortAscending
	With .Columns.Add("Position")
		.FormatColumn = "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
		.Visible = False
	End With
	.ConditionalFormats.Add("(%C13 mod 2) != 0").BackColor = RGB(240,240,240)
	.EndUpdate 
End With
1717:
How do I show the chart's labels in 24-hour clock format

With G2antt1
	With .Chart
		.PaneWidth(False) = 0
		.FirstVisibleDate = #1/1/2001#
		.LevelCount = 3
		With .Level(0)
			.Label = "<%mmm%> <%d%>, <%yyyy%>"
			.Alignment = AlignmentEnum.exHOutside Or AlignmentEnum.CenterAlignment
			.Unit = exDay
		End With
		With .Level(1)
			.Label = "<b><%h%>:00</b>"
			.Alignment = CenterAlignment
			.Unit = exHour
			.DrawTickLines = exLevelDefaultLine
			.DrawGridLines = True
		End With
		With .Level(2)
			.Label = "<%nn%>"
			.Unit = exMinute
			.Count = 15
		End With
		.ScrollTo #1/1/2001 8:30:00 AM#,0
	End With
End With
1716:
How do I show the chart's labels in 12-hour clock format

With G2antt1
	With .Chart
		.PaneWidth(False) = 0
		.FirstVisibleDate = #1/1/2001#
		.LevelCount = 3
		With .Level(0)
			.Label = "<%mmm%> <%d%>, <%yyyy%>"
			.Alignment = AlignmentEnum.exHOutside Or AlignmentEnum.CenterAlignment
			.Unit = exDay
		End With
		With .Level(1)
			.Label = "<b><%h%>:00</b> <%AM/PM%>"
			.Alignment = CenterAlignment
			.Unit = exHour
			.DrawTickLines = exLevelDefaultLine
			.DrawGridLines = True
		End With
		With .Level(2)
			.Label = "<%nn%>"
			.Unit = exMinute
			.Count = 15
		End With
		.ScrollTo #1/1/2001 8:30:00 AM#,0
	End With
End With
1715:
I would like to avoid manual typing in the date-cell because user often type wrong things (no decimal points and so on) and so the todays-date is generated for the cell. What can be done

' KeyPress event - Occurs when the user presses and releases an ANSI key.
Private Sub G2antt1_KeyPress(KeyAscii As Integer)
	With G2antt1
		Debug.Print( "if .Editying != 0 then" )
		Debug.Print( .Editing )
		KeyAscii = 0
	End With
End Sub

With G2antt1
	.BeginUpdate 
	With .Columns
		.Add "Tasks"
		With .Add("Start")
			.Def(exCellValueToItemBarProperty) = 1
			.Editor.EditType = DateType
		End With
		With .Add("End")
			.Def(exCellValueToItemBarProperty) = 2
			.Editor.EditType = DateType
		End With
	End With
	With .Chart
		.FirstVisibleDate = #9/20/2006#
		.AllowLinkBars = True
		.AllowCreateBar = exNoCreateBar
		.LevelCount = 2
		.PaneWidth(0) = 196
	End With
	With .Items
		.AllowCellValueToItemBar = True
		.AddBar .AddItem("Task 1"),"Task",#9/21/2006#,#9/24/2006#
		.AddBar .AddItem("Task 2"),"Task",#9/22/2006#,#9/25/2006#
		.AddBar .AddItem("Task 3"),"Task",#9/23/2006#,#9/26/2006#
	End With
	.EndUpdate 
End With
1714:
When a Day, Week etc is clicked how can we make it centre/zoom the chart to cover all the bars

' OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area.
Private Sub G2antt1_OverviewZoom()
	With G2antt1
		With .Chart
			.ScrollTo #1/1/2001#,1
			Debug.Print( "Start" )
			Debug.Print( .StartPrintDate )
			Debug.Print( "End" )
			Debug.Print( .EndPrintDate )
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	With .Chart
		.PaneWidth(False) = 128
		.LevelCount = 2
		.OverviewVisible = exOverviewShowAllVisible
		.AllowOverviewZoom = exAlwaysZoom
		.Label(exSecond) = ""
		.Label(exMinute) = ""
		.Label(exHour) = ""
		.UnitScale = exDay
		.ScrollTo #1/1/2001#,1
		.MarkTimeZone "zone",#1/1/2001#,#1/2/2001#,10516548
	End With
	.Columns.Add "Default"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#12/15/2000#,#1/10/2001#
		.AddBar .AddItem("Item 2"),"Task",#1/1/2001#,#1/5/2001#
	End With
	.EndUpdate 
End With
1713:
The first time we run the application, the day label headers looks different then pressing Week and then Day again on the control's overview part. How do we make to show the header in the same format

With G2antt1
	With .Chart
		.PaneWidth(False) = 128
		.LevelCount = 2
		.OverviewVisible = exOverviewShowAllVisible
		.AllowOverviewZoom = exAlwaysZoom
		.Label(exSecond) = ""
		.Label(exMinute) = ""
		.Label(exHour) = ""
		.UnitScale = exDay
	End With
End With
1712:
How to sort numerically by columns

With G2antt1
	.BeginUpdate 
	.Columns.Add("Numeric").SortType = SortNumeric
	With .Items
		.AddItem 1
		.AddItem 2
		.AddItem 12
		.AddItem 22
	End With
	.Columns.Item(0).SortOrder = SortAscending
	.EndUpdate 
End With
1711:
The control does not ensure the item to fit the control's client area once the user clicks the cell's button or check box. What can be done
' MouseDown event - Occurs when the user presses a mouse button.
Private Sub G2antt1_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single)
	' Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit))
End Sub

With G2antt1
	.BeginUpdate 
	.TreeColumnIndex = -1
	.SelForeColor = .ForeColor
	With .Columns.Add("Buttons")
		.Alignment = CenterAlignment
		.Def(exCellHasButton) = True
	End With
	With .Items
		.AddItem "Button A"
		.AddItem "Button B"
		.AddItem "Button C"
	End With
	.EndUpdate 
End With
1710:
How do I arrange the levels when the user changes the scale using the control's overview part

' OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area.
Private Sub G2antt1_OverviewZoom()
	With G2antt1
		Debug.Print( .Chart.UnitScale )
		.EnsureVisibleColumn 0
		With .Chart
			.Level(0).DrawTickLines = exLevelNoLine
			.ScrollTo #11/18/2015#,1
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #11/18/2015#
		.PaneWidth(False) = 0
		.LevelCount = 2
		.DrawLevelSeparator = exLevelSolidLine
		With .Level(0)
			.Alignment = AlignmentEnum.exHOutside Or AlignmentEnum.CenterAlignment
			.DrawTickLines = exLevelSolidLine
			.BackColor = G2antt1.BackColor
		End With
		With .Level(1)
			.DrawTickLines = LevelLineEnum.exLevelMiddleLine Or LevelLineEnum.exLevelDotLine
			.DrawTickLinesFrom 0,exLevelSolidLine
		End With
		.OverviewVisible = exOverviewShowAllVisible
		.AllowOverviewZoom = exAlwaysZoom
		.UnitWidth = 24
		.Label(exSecond) = ""
		.Label(exMinute) = ""
		.Label(exHour) = ""
		.Label(exWeek) = ""
		.Label(exDay) = "<|><%d%><|><%d3%>, <%m3%> <%d%>, '<%yy%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%><||><||>4096"
		.UnitScale = exDay
		.ScrollTo .FirstVisibleDate,1
	End With
	.Columns.Add "Default"
	.EndUpdate 
End With
1709:
I am using AllowGroupBy, the question is it is possible to add summary bars for child item, when user do grouping

' AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
Private Sub G2antt1_AddGroupItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Summary",.CellValue(Item,2),.CellValue(Item,4)
			.DefineSummaryBars Item,"",-3,""
		End With
	End With
End Sub

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Chart.FirstVisibleDate = #9/1/1994#
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb",3,3
	End With
	.DataSource = rs
	.SortBarVisible = True
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = True
	.Columns.Item(1).SortOrder = SortAscending
	.EndUpdate 
End With
1708:
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 3)

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Chart.FirstVisibleDate = #9/1/1994#
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb",3,3
	End With
	.DataSource = rs
	.SortBarVisible = True
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = True
	.Chart.ShowCollapsedBars = True
	.EndUpdate 
	.Layout = "multiplesort=""C1:1"";collapse=""0-9999"""
End With
1707:
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 2)

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Chart.FirstVisibleDate = #9/1/1994#
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb",3,3
	End With
	.DataSource = rs
	.SortBarVisible = True
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = True
	.Columns.Item(1).SortOrder = SortAscending
	.EndUpdate 
	.BeginUpdate 
	.EnsureVisibleColumn 0
	.Items.ExpandItem(0) = False
	.EndUpdate 
End With
1706:
I noticed that when grouping on a field, its details are always expanded. Is it possible to show collapsed by default (method 1)

' AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection.
Private Sub G2antt1_AddGroupItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		.Items.ExpandItem(Item) = False
	End With
End Sub

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Chart.FirstVisibleDate = #9/1/1994#
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb",3,3
	End With
	.DataSource = rs
	.SortBarVisible = True
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = True
	.Columns.Item(1).SortOrder = SortAscending
	.EndUpdate 
End With
1705:
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Chart.FirstVisibleDate = #9/1/1994#
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb",3,3
	End With
	.DataSource = rs
	.SortBarVisible = True
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = True
	.Columns.Item(1).SortOrder = SortAscending
	.EndUpdate 
	.EnsureVisibleColumn 0
	.BeginUpdate 
	With .Items
		.ExpandItem(.RootItem(0)) = False
		.ExpandItem(.RootItem(1)) = False
		.ExpandItem(.RootItem(2)) = False
	End With
	.EndUpdate 
End With
1704:
Is there a possibility to expand / collapse all groups (or group by group) at runtime with a method (equivalent to pressing the + or - button in the group header)

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Chart.FirstVisibleDate = #9/1/1994#
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb",3,3
	End With
	.DataSource = rs
	.SortBarVisible = True
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = True
	.Columns.Item(1).SortOrder = SortAscending
	.EndUpdate 
	.BeginUpdate 
	.EnsureVisibleColumn 0
	With .Items
		.ExpandItem(.FirstVisibleItem) = False
	End With
	.EndUpdate 
End With
1703:
How can I move automatically a bar once another is moved ( non-working bars )

With G2antt1
	.BeginUpdate 
	.MarkSearchColumn = False
	.OnResizeControl = exResizeChart
	.Columns.Add "Tasks"
	.Columns.Add("Start").Visible = False
	.Columns.Add("End").Visible = False
	With .Chart
		.FirstVisibleDate = #9/20/2006#
		.PaneWidth(0) = 64
		With .Bars.Add("Task:Split")
			.Shortcut = "TSplit"
			.Def(exBarKeepWorkingCount) = True
		End With
	End With
	With .Items
		h = .AddItem("Project")
		.CellValue(h,1) = #9/22/2006#
		.CellValue(h,2) = #10/3/2006#
		.AddBar h,"Summary",.CellValue(h,1),.CellValue(h,2)
		h1 = .InsertItem(h,,"Task 1")
		.CellValue(h1,1) = .CellValue(h,1)
		.CellValue(h1,2) = #9/26/2006#
		.AddBar h1,"TSplit",.CellValue(h1,1),.CellValue(h1,2)
		h2 = .InsertItem(h,,"Task 2")
		.CellValue(h2,1) = .CellValue(h1,2)
		.CellValue(h2,2) = #9/28/2006#
		.AddBar h2,"TSplit",.CellValue(h2,1),.CellValue(h2,2)
		.AddLink "L1",h1,"",h2,""
		h3 = .InsertItem(h,,"Task 3")
		.CellValue(h3,1) = .CellValue(h2,2)
		.CellValue(h3,2) = .CellValue(h,2)
		.AddBar h3,"TSplit",.CellValue(h3,1),.CellValue(h3,2)
		.AddLink "L2",h2,"",h3,""
		.GroupBars h1,"",False,h2,"",True,7
		.GroupBars h2,"",False,h3,"",True,7
		.DefineSummaryBars h,"",h1,""
		.DefineSummaryBars h,"",h2,""
		.DefineSummaryBars h,"",h3,""
		.ExpandItem(h) = True
		.ItemBold(h) = True
	End With
	.EndUpdate 
End With
1702:
How can I get notified once the user expands a column

' LayoutChanged event - Occurs when column's position or column's size is changed.
Private Sub G2antt1_LayoutChanged()
	With G2antt1
		Debug.Print( "Column-Expanded" )
		Debug.Print( .Columns.Item("C0").Expanded )
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.ShowFocusRect = False
	.ColumnAutoResize = False
	.DrawGridLines = exAllLines
	.BackColorLevelHeader = .BackColor
	With .Columns
		With .Add("C0")
			.ExpandColumns = "0,1,2"
			.DisplayExpandButton = True
		End With
		.Add "C1"
		.Add "C2"
	End With
	With .Items
		h = .AddItem("Cell 0.0")
		.CellValue(h,1) = "Cell 0.1"
		.CellValue(h,2) = "Cell 0.2"
		h = .AddItem("Cell 1.0")
		.CellValue(h,1) = "Cell 1.1"
		.CellValue(h,2) = "Cell 1.2"
	End With
	.EndUpdate 
End With
1701:
I am using expandable headers, the question is how I can display the column itself, not just the child columns

With G2antt1
	.BeginUpdate 
	.ColumnAutoResize = False
	.DrawGridLines = exAllLines
	.BackColorLevelHeader = .BackColor
	With .Columns
		With .Add("C0")
			.ExpandColumns = "0,1,2"
			.DisplayExpandButton = True
		End With
		.Add "C1"
		.Add "C2"
	End With
	With .Items
		h = .AddItem("Cell 0.0")
		.CellValue(h,1) = "Cell 0.1"
		.CellValue(h,2) = "Cell 0.2"
		h = .AddItem("Cell 1.0")
		.CellValue(h,1) = "Cell 1.1"
		.CellValue(h,2) = "Cell 1.2"
	End With
	.EndUpdate 
End With
1700:
How do I layout expandable columns

With G2antt1
	.BeginUpdate 
	.ColumnAutoResize = False
	.DrawGridLines = exAllLines
	.BackColorLevelHeader = .BackColor
	With .Columns
		With .Add("C0")
			.ExpandColumns = "1,2"
			.DisplayExpandButton = True
		End With
		.Add "C1"
		.Add "C2"
		.Add "C3"
		With .Add("C4")
			.ExpandColumns = "5,6"
			.DisplayExpandButton = True
		End With
		.Add "C5"
		With .Add("C6")
			.ExpandColumns = "6,7"
			.DisplayExpandButton = True
		End With
		.Add "C7"
	End With
	.EndUpdate 
	.Columns.Item("C4").Expanded = False
End With
1699:
Is it possible to display automatically the start/end margins of the bars

With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 64
		With .Bars.Item("Task")
			.Def(exBarCaption) = "<%=%1%>"
			.Def(exBarHAlignCaption) = 16
			.Def(exBarExtraCaption) = "<%=%2%>"
			.Def(exBarExtraCaptionHAlign) = 18
		End With
		.ScrollTo .FirstVisibleDate,1
	End With
	.Columns.Add "Task"
	.Columns.Add("ToolTip").Visible = False
	With .Items
		h = .AddItem("Item 1")
		.CellValue(h,1) = "bar <b>a"
		.AddBar h,"Task",#12/29/2000#,#1/5/2001#
		h = .AddItem("Item 2")
		.CellValue(h,1) = "bar <b>b"
		.AddBar h,"Task",#12/30/2000#,#1/6/2001#
	End With
	.EndUpdate 
End With
1698:
Is it possible to assign the bar's caption from a hidden column

With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 64
		With .Bars.Item("Task")
			.Def(exBarCaption) = "<%=%C1%>"
			.Def(exBarHAlignCaption) = 18
		End With
	End With
	.Columns.Add "Task"
	.Columns.Add("ToolTip").Visible = False
	With .Items
		h = .AddItem("Item 1")
		.CellValue(h,1) = "bar <b>a"
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#
		h = .AddItem("Item 2")
		.CellValue(h,1) = "bar <b>b"
		.AddBar h,"Task",#1/3/2001#,#1/6/2001#
	End With
	.EndUpdate 
End With
1697:
Is it possible to assign the bar's tooltip from a hidden column

With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 64
		.Bars.Item("Task").Def(exBarToolTip) = "<%=%C1%>"
	End With
	.Columns.Add "Task"
	.Columns.Add("ToolTip").Visible = False
	With .Items
		h = .AddItem("Item 1")
		.CellValue(h,1) = "This is a bit of text that's shown when the cursor hovers the bar on item 1."
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#
		h = .AddItem("Item 2")
		.CellValue(h,1) = "This is a bit of text that's shown when the cursor hovers the bar on item 2."
		.AddBar h,"Task",#1/3/2001#,#1/6/2001#
	End With
	.EndUpdate 
End With
1696:
I am using exBarFrameColor, but no black frame is shown. What could be wrong (method 2)

With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 128
	End With
	.Columns.Add "Task"
	With .Items
		h = .AddItem("Default")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#
		.ItemBar(h,"",exBarFrameColor) = 65536
	End With
	.EndUpdate 
End With
1695:
I am using exBarFrameColor, but no black frame is shown. What could be wrong (method 1)

With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 128
		.Bars.Item("Task").Def(exBarFrameColor) = 65536
	End With
	.Columns.Add "Task"
	With .Items
		.AddBar .AddItem("Default"),"Task",#1/2/2001#,#1/5/2001#
	End With
	.EndUpdate 
End With
1694:
What I need is bars that have a solid color, but with a black frame. How can we do that

With G2antt1
	.BeginUpdate 
	.DefaultItemHeight = 22
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.LevelCount = 2
		.PaneWidth(False) = 0
	End With
	With .Chart.Bars.Add("Frame")
		.Pattern = exPatternSolid
		.Color = RGB(0,255,0)
		.Def(exBarFrameColor) = 65536
		.Def(exBarCaption) = "<font ;6><%=%C0%>"
		.Def(exBarHAlignCaption) = 18
		.Height = 15
	End With
	.Columns.Add "Frames"
	With .Items
		.AddBar .AddItem("Default"),"Frame",#1/2/2001#,#1/7/2001#
		h = .AddItem("Inside Color")
		.AddBar h,"Frame",#1/2/2001#,#1/7/2001#
		.ItemBar(h,"",exBarColor) = 255
		h = .AddItem("Border Color")
		.AddBar h,"Frame",#1/2/2001#,#1/7/2001#
		.ItemBar(h,"",exBarFrameColor) = 33023
		h = .AddItem("Inside/Border Color")
		.AddBar h,"Frame",#1/2/2001#,#1/7/2001#
		.ItemBar(h,"",exBarColor) = 16711680
		.ItemBar(h,"",exBarFrameColor) = 33023
		h = .AddItem("Thick-Border")
		.AddBar h,"Frame",#1/2/2001#,#1/7/2001#
		.ItemBar(h,"",exBarPattern) = 4097
		h = .AddItem("Thick-Border + Pattern")
		.AddBar h,"Frame",#1/2/2001#,#1/7/2001#
		.ItemBar(h,"",exBarPattern) = 4098
	End With
	.EndUpdate 
End With
1693:
How can we drag bars from one item to the other

With G2antt1
	.BeginUpdate 
	.DefaultItemHeight = 22
	.DrawGridLines = exAllLines
	.Columns.Add("Members").Def(exCellValueFormat) = 1
	With .Chart
		.FirstVisibleDate = #9/20/2006#
		.AllowLinkBars = False
		.AllowCreateBar = exNoCreateBar
		.AllowSelectObjects = exNoSelectObjects
		.LevelCount = 2
		.PaneWidth(False) = 96
		.DrawGridLines = exAllLines
		With .Bars.Item("Task")
			.OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption Or OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or OverlaidBarsTypeEnum.exOverlaidBarsStack
			.Height = 18
			.Pattern = exPatternSolid
			.Color = RGB(0,128,255)
		End With
	End With
	With .Items
		h = .AddItem("Member <b>1</b>")
		.AddBar h,"Task",#9/21/2006#,#9/23/2006#,"T102","<font ;6><fgcolor FFFFFF>Task <b>102</b>"
		.ItemBar(h,"T102",exBarCanMoveToAnother) = True
		h = .AddItem("Member <b>2</b>")
		h = .AddItem("Member <b>3</b>")
		h = .AddItem("Member <b>4</b>")
		.AddBar h,"Task",#9/21/2006#,#9/23/2006#,"T103","<font ;6><fgcolor FFFFFF>Task <b>103</b>"
		.ItemBar(h,"T103",exBarCanMoveToAnother) = True
	End With
	.EndUpdate 
End With
1692:
How can I use the exBarBackgroundExt option of the Items.ItemBar property

With G2antt1
	.BeginUpdate 
	.DefaultItemHeight = 26
	With .Chart
		.NonworkingDays = 0
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 128
		.Bars.Item("Task").Height = 22
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Border-Top")
		.AddBar h,"Task",#1/3/2001#,#1/7/2001#
		.ItemBar(h,"",exBarBackgroundExt) = "top[3,back=RGB(0,0,0)]"
		h = .AddItem("Border-Bottom")
		.AddBar h,"Task",#1/3/2001#,#1/7/2001#
		.ItemBar(h,"",exBarBackgroundExt) = "bottom[3,back=RGB(255,0,0)]"
		h = .AddItem("Border-Left")
		.AddBar h,"Task",#1/3/2001#,#1/7/2001#
		.ItemBar(h,"",exBarBackgroundExt) = "left[6,back=RGB(0,255,0)]"
		h = .AddItem("Border-Right")
		.AddBar h,"Task",#1/3/2001#,#1/7/2001#
		.ItemBar(h,"",exBarBackgroundExt) = "right[6,back=RGB(0,0,255)]"
		h = .AddItem("Border-All")
		.AddBar h,"Task",#1/3/2001#,#1/7/2001#
		.ItemBar(h,"",exBarBackgroundExt) = "top[3,back=RGB(0,0,0)],right[3,back=RGB(0,0,255)],bottom[3,back=RGB(255,0,0)],left[3,back=RGB(0,255,0)],client"
		h = .AddItem("Middle")
		.AddBar h,"Task",#1/3/2001#,#1/7/2001#
		.ItemBar(h,"",exBarBackgroundExt) = "none[(25%,25%,50%,50%),back=RGB(255,0,0)]"
		h = .AddItem("Horizontal")
		.AddBar h,"Task",#1/3/2001#,#1/7/2001#
		.ItemBar(h,"",exBarBackgroundExt) = "none[(0,50%-2,100%,4),back=RGB(255,0,0)]"
		h = .AddItem("Vertical")
		.AddBar h,"Task",#1/3/2001#,#1/7/2001#
		.ItemBar(h,"",exBarBackgroundExt) = "none[(50%-2,0,4,100%),back=RGB(255,0,0)]"
		h = .AddItem("Mixt")
		.AddBar h,"Task",#1/3/2001#,#1/7/2001#
		.ItemBar(h,"",exBarBackgroundExt) = "[[patterncolor=RGB(255,0,0)](none[(4,4,100%-8,100%-8),pattern=0x006,patterncolor=RGB(255,0,0),frame=RGB(255,0,0),framethick])]"
		h = .AddItem("Misc")
		.AddBar h,"Task",#1/3/2001#,#1/7/2001#
		.ItemBar(h,"",exBarBackgroundExt) = "bottom[50%,pattern=10,frame]"
		h = .AddItem("Complex")
		.AddBar h,"Task",#1/3/2001#,#1/7/2001#
		.ItemBar(h,"",exBarBackgroundExt) = "left[10%](top[90%,back=RGB(0,0,0)]),top[30%,back=RGB(254,217,102)],client[back=RGB(91,156,212)]"
	End With
	.EndUpdate 
End With
1691:
Does the title of the cell's tooltip supports HTML format

With G2antt1
	.BeginUpdate 
	.Chart.PaneWidth(True) = 0
	With .Columns.Add("")
		.Caption = ""
		.HTMLCaption = "Column"
	End With
	With .Items
		.CellToolTip(.AddItem("tooltip w/h different title"),0) = "<c><b><fgcolor=FF0000>Title</fgcolor></b><br>This is bit of text that's shown when the user hovers the cell. This shows the tit" & _
"le centered with a different color."
	End With
	.EndUpdate 
End With
1690:
How do I specify a different title for the cell's tooltip

With G2antt1
	.BeginUpdate 
	.Chart.PaneWidth(True) = 0
	With .Columns.Add("")
		.Caption = "This is the title"
		.HTMLCaption = "Column"
	End With
	With .Items
		.CellToolTip(.AddItem("tooltip w/h different title"),0) = "This is bit of text that's shown when the user hovers the cell."
	End With
	.EndUpdate 
End With
1689:
The cell's tooltip displays the column's caption in its title. How can I get ride of that

With G2antt1
	.BeginUpdate 
	.Chart.PaneWidth(True) = 0
	With .Columns
		.Add "C1"
		.Add "C2"
	End With
	With .Items
		h = .AddItem("tooltip w/h caption")
		.CellToolTip(h,0) = "This is bit of text that's shown when the user hovers the cell. This shows the column's caption in the title."
		.CellValue(h,1) = "tooltip no caption"
		.CellToolTip(h,1) = "This is bit of text that's shown when the user hovers the cell. This shows no column's caption in the title."
	End With
	With .Columns.Item("C2")
		.HTMLCaption = .Caption
		.Caption = ""
	End With
	.EndUpdate 
End With
1688:
How can I programmatically show the column's filter

' RClick event - Fired when right mouse button is clicked
Private Sub G2antt1_RClick()
	With G2antt1
		i = .ItemFromPoint(-1,-1,c,hit)
		.Columns.Item(c).ShowFilter "-1,-1,128,128"
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.ShowFocusRect = False
	With .Columns.Add("Items ")
		.DisplayFilterPattern = False
		.FilterList = FilterListEnum.exShowExclude Or FilterListEnum.exShowFocusItem Or FilterListEnum.exShowCheckBox
	End With
	With .Items
		.AddItem "Item 1"
		.AddItem "Item 2"
		.AddItem "Item 3"
	End With
	.EndUpdate 
End With
1687:
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 2)

' ColumnClick event - Fired after the user clicks on column's header.
Private Sub G2antt1_ColumnClick(ByVal Column As EXG2ANTTLibCtl.IColumn)
	' Column.SortOrder = 1
	With G2antt1
		.SortOnClick = exDefaultSort
		.Columns.Item("Sort").SortOrder = SortAscending
		.SortOnClick = exUserSort
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.SortOnClick = exUserSort
	.Columns.Add "Items"
	.Columns.Add("Sort").Visible = False
	With .Items
		.CellValue(.AddItem("Item 1 (3)"),1) = 3
		.CellValue(.AddItem("Item 2 (1)"),1) = 1
		.CellValue(.AddItem("Item 3 (2)"),1) = 2
	End With
	.EndUpdate 
End With
1686:
I want to be able to click on one of the headers, and sort by other column. How can I do that (method 1)

' ColumnClick event - Fired after the user clicks on column's header.
Private Sub G2antt1_ColumnClick(ByVal Column As EXG2ANTTLibCtl.IColumn)
	' Column.SortOrder = 1
	With G2antt1
		.Items.SortChildren 0,"Sort",True
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.SortOnClick = exUserSort
	.Columns.Add "Items"
	.Columns.Add("Sort").Visible = False
	With .Items
		.CellValue(.AddItem("Item 1 (3)"),1) = 3
		.CellValue(.AddItem("Item 2 (1)"),1) = 1
		.CellValue(.AddItem("Item 3 (2)"),1) = 2
	End With
	.EndUpdate 
End With
1685:
How do I get information about control's events
' Event event - Notifies the application once the control fires an event.
Private Sub G2antt1_Event(ByVal EventID As Long)
	With G2antt1
		Debug.Print( .ExecuteTemplate("EventParam(-2)") )
	End With
End Sub

With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 48
		.AllowLinkBars = False
		.Bars.Item("Task").OverlaidType = OverlaidBarsTypeEnum.exOverlaidBarsTransparent Or OverlaidBarsTypeEnum.exOverlaidBarsOffset
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Item 1")
		.EnableItem(h) = False
		.ItemData(h) = -1
		h = .AddItem("Item 2")
		.ItemData(h) = 0
		.AddBar h,"Task",#1/5/2001#,#1/7/2001#,"B"
		.ItemBar(h,"B",exBarCanMoveToAnother) = True
		.ItemData(.AddItem("Item 3")) = 0
		h = .AddItem("Item 4")
		.EnableItem(h) = False
		.ItemData(h) = -1
	End With
	.EndUpdate 
End With
1684:
How can I sort by two-columns, one by date and one by time

With G2antt1
	.BeginUpdate 
	.SingleSort = False
	With .Columns
		.Add("Index").FormatColumn = "1 index ``"
		.Add("Date").SortType = SortDate
		With .Add("Time")
			.SortType = SortTime
			.FormatColumn = "time(value)"
		End With
	End With
	With .Items
		h = .AddItem(0)
		.CellValue(h,1) = #1/1/2001#
		.CellValue(h,2) = #1/1/2001 10:00:00 AM#
		h = .AddItem(0)
		.CellValue(h,1) = #12/31/2000#
		.CellValue(h,2) = #1/1/2001 10:00:00 AM#
		h = .AddItem(0)
		.CellValue(h,1) = #1/1/2001#
		.CellValue(h,2) = #1/1/2001 6:00:00 AM#
		h = .AddItem(0)
		.CellValue(h,1) = #12/31/2000#
		.CellValue(h,2) = #1/1/2001 8:00:00 AM#
		h = .AddItem(0)
		.CellValue(h,1) = #1/1/2001#
		.CellValue(h,2) = #1/1/2001 8:00:00 AM#
		h = .AddItem(0)
		.CellValue(h,1) = #12/31/2000#
		.CellValue(h,2) = #1/1/2001 6:00:00 AM#
	End With
	.Layout = "multiplesort=""C1:1 C2:1"""
	.EndUpdate 
End With
1683:
I am trying to hide the non-working dates by using the AddNonworkingDate to specify custom non-working dates while NonworkingDays property is 0, but the non-working date is still shown. What can be wrong

With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #1/1/2008#
		.PaneWidth(False) = 0
		.LevelCount = 2
		.ShowNonworkingUnits = False
		.ShowNonworkingDates = False
		.NonworkingDays = 128
		.AddNonworkingDate #1/7/2008#
		.AddNonworkingDate #1/8/2008#
		.AddNonworkingDate #1/9/2008#
		.AddNonworkingDate #1/10/2008#
	End With
	.EndUpdate 
End With
1682:
How can I display the task's duration, in days, hours and minutes

With G2antt1
	.BeginUpdate 
	With .Columns.Add("Tasks")
		.AllowSizing = False
		.Width = 36
	End With
	With .Columns.Add("Duration")
		.Def(exCellValueToItemBarProperty) = 513
		.FormatColumn = "((1:=int(0:= (value))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 " & _
"? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')"
	End With
	With .Chart
		.PaneWidth(False) = 148
		.FirstVisibleDate = #4/6/2009#
		.LevelCount = 2
		.UnitScale = exHour
		.ResizeUnitScale = exMinute
	End With
	.Items.AllowCellValueToItemBar = True
	With .Items
		.AddBar .AddItem("T1"),"Task",#4/6/2009 2:30:00 AM#,#4/6/2009 0:35:00 PM#
		.AddBar .AddItem("T2"),"Task",#4/6/2009 9:00:00 AM#,#4/6/2009 10:10:00 AM#
	End With
	.EndUpdate 
End With
1681:
Does your control support working half-hour/minutes/seconds

With G2antt1
	.BeginUpdate 
	With .Columns.Add("Tasks")
		.AllowSizing = False
		.Width = 36
	End With
	With .Columns.Add("Working")
		.Def(exCellValueToItemBarProperty) = 258
		.FormatColumn = "((1:=int(0:= (value))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 " & _
"? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')"
	End With
	With .Chart
		.FirstVisibleDate = #4/6/2009#
		.PaneWidth(False) = 148
		.LevelCount = 2
		.UnitScale = exHour
		.ResizeUnitScale = exMinute
		.ResizeUnitCount = 15
		.NonworkingHours = 15728767
		.ShowNonworkingDates = False
		.ShowNonworkingUnits = False
		With .Bars
			.Item("Task").Def(exBarKeepWorkingCount) = True
			.Add("Task:Split").Shortcut = "Task"
		End With
		.AllowLinkBars = False
		.UnitWidth = 26
	End With
	.Items.AllowCellValueToItemBar = True
	With .Items
		h = .AddItem("T1")
		.ItemNonworkingUnits(h,False) = "(weekday(value) in (1,2,3,4,5) and (timeF(value)<""09:30""  or timeF(value)>=""17:30"")) or (weekday(value) in (0,6))"
		.AddBar h,"Task",#4/6/2009 10:00:00 AM#,#4/6/2009 0:30:00 PM#
		h = .AddItem("T2")
		.ItemNonworkingUnits(h,False) = "(weekday(value) in (1,2,3,4,5) and (timeF(value)<""08:00""  or timeF(value)>=""16:00"")) or (weekday(value) in (0,6))"
		.AddBar h,"Task",#4/6/2009 9:30:00 AM#,#4/6/2009 10:45:00 AM#
	End With
	.EndUpdate 
End With
1680:
How can I programmatically move a bar to a specified date-time
With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 64
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Original")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,"key"
		h = .AddItem("Moved")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,"key"
		duration = .ItemBar(h,"key",exBarDuration)
		.AddBar h,"Task",#1/5/2001#,#1/5/2001#,"key"
		.ItemBar(h,"key",exBarDuration) = duration
	End With
	.EndUpdate 
End With
1679:
How can I programmatically move a bar, with a specified ammount
With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 64
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Original")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,"key"
		h = .AddItem("Moved")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,"key"
		.ItemBar(h,"key",exBarMove) = 3
	End With
	.EndUpdate 
End With
1678:
How can I programmatically move a bar to a specified date-time (auto-adjust spans over a non-working period)

With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 64
		With .Bars
			.Item("Task").Def(exBarKeepWorkingCount) = True
			.Add("Task:Split").Shortcut = "Task"
		End With
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Original")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,"key"
		h = .AddItem("Moved")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,"key"
		workingCount = .ItemBar(h,"key",exBarWorkingCount)
		.AddBar h,"Task",#1/5/2001#,#1/5/2001#,"key"
		.ItemBar(h,"key",exBarWorkingCount) = workingCount
	End With
	.EndUpdate 
End With
1677:
How can I programmatically move a bar, with a specified ammount (auto-adjust spans over a non-working period)

With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 64
		With .Bars
			.Item("Task").Def(exBarKeepWorkingCount) = True
			.Add("Task:Split").Shortcut = "Task"
		End With
	End With
	.Columns.Add "Column"
	With .Items
		h = .AddItem("Original")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,"key"
		h = .AddItem("Moved")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,"key"
		.ItemBar(h,"key",exBarMove) = 3
	End With
	.EndUpdate 
End With
1676:
How can I show a secondary curve, line in the control's histogram

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	.AntiAliasing = True
	With .Chart
		.FirstWeekDay = exMonday
		.LevelCount = 2
		.PaneWidth(0) = 40
		.FirstVisibleDate = #6/9/2005#
		.HistogramVisible = True
		.HistogramView = HistogramViewEnum.exHistogramNoGrouping Or HistogramViewEnum.exHistogramAllItems
		.HistogramHeight = 128
		With .Bars.Item("Task")
			.HistogramPattern = .Pattern
			.HistogramType = exHistOverload
			.HistogramItems = 8
			.HistogramRulerLinesColor = RGB(0,0,1)
		End With
		.Level(1).Label = "<font ;3><%d%>"
		.UnitWidth = 9
		With .Bars.Item("Summary")
			.HistogramPattern = exRoundCurve
			.HistogramColor = RGB(255,0,0)
			.HistogramType = exHistOverload
			.HistogramItems = 8
			.HistogramBorderSize = 1
		End With
	End With
	With .Items
		.LockedItemCount(exTop) = 1
		h = .LockedItem(exTop,0)
		.ItemHeight(h) = 0
		.AddBar h,"Summary",#1/1/2005#,#12/31/2005#,"1"
		.ItemBar(h,"1",exBarEffort) = "(value mod 31) array (1,1,1,2,1,2.5,3,4,5,4,3,2,1,2,2,3,4.5,4,5,6,7,6,1,2,3,1,1,1,2,3,2,2)"
		h = .AddItem("Task")
		.AddBar h,"Task",#6/10/2005#,#7/16/2005#,""
		.ItemBar(h,"",exBarEffort) = "weekday(value) in (0,6) ? 0.25 : 2"
		h = .AddItem("Task")
		.AddBar h,"Task",#6/18/2005#,#7/21/2005#,""
		.ItemBar(h,"",exBarEffort) = "weekday(value) = 1 ? 2.5 : .5"
	End With
	.EndUpdate 
End With
1675:
How can I add an owner-draw bar
' AfterDrawPart event - Occurs right after drawing the part of the control.
Private Sub G2antt1_AfterDrawPart(ByVal Part As EXG2ANTTLibCtl.DrawPartEnum,ByVal hDC As Long,ByVal X As Long,ByVal Y As Long,ByVal Width As Long,ByVal Height As Long)
	With G2antt1
		Debug.Print( "AfterDrawPart" )
		Debug.Print( Part )
		Debug.Print( .Items.CellCaption(G2antt1.DrawPartItem,0) )
		Debug.Print( G2antt1.DrawPartKey )
	End With
End Sub

' BeforeDrawPart event - Occurs just before drawing a part of the control.
Private Sub G2antt1_BeforeDrawPart(ByVal Part As EXG2ANTTLibCtl.DrawPartEnum,ByVal hDC As Long,X As Long,Y As Long,Width As Long,Height As Long,Cancel As Boolean)
	With G2antt1
		Cancel = True
		Debug.Print( "BeforeDrawPart" )
		Debug.Print( Part )
		Debug.Print( .Items.CellCaption(G2antt1.DrawPartItem,0) )
		Debug.Print( G2antt1.DrawPartKey )
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 128
		.LevelCount = 2
		.Bars.Add "OwnerDraw"
	End With
	With .Items
		.AddBar .AddItem("Draw-Item-Bar-1"),"OwnerDraw",#1/2/2001#,#1/5/2001#,"K1"
		.AddBar .AddItem("Draw-Item-Bar-2"),"OwnerDraw",#1/6/2001#,#1/9/2001#,"K1"
		.ItemBar(0,"<*>",exBarSelected) = True
	End With
	.EndUpdate 
End With
1674:
Is it possible to show a status left or right to the bar (method 2, exBarFrameColor, EBN)

With G2antt1
	.BeginUpdate 
	With .VisualAppearance
		.Add 2,"gBFLBCJwBAEHhEJAAChABP0IQAAYAQGKIaBoAKBQAGaAoDDYMQyQwAAxDOKsEwsACEIrjKCRShyCYZRrGUQyAKESRAGyTJBlKKodgOLYYSrFcgSIAsEhqGASRZGUBIJ" & _
"DEMI4AJPIwxNIDfyNGKWI6gOQKIoSCYlU7IED0fQNGxVF6XaYqYAIRDINQlVzXcQzPYEbRxCKLKppWqIfpuSIBgI="
		.Add 1,"CP:2 -8 -1 0 0"
		.Add 3,"CP:2 0 -1 0 0"
	End With
	.Columns.Add "Task"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 128
	End With
	With .Items
		h = .AddItem("Red-Status-Outside")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,"K1"
		.ItemBar(h,"K1",exBarFrameColor) = 16777471
		h = .AddItem("Blue-Status-Outside")
		.AddBar h,"Task",#1/3/2001#,#1/6/2001#,"K1"
		.ItemBar(h,"K1",exBarFrameColor) = 33488896
		h = .AddItem("Red-Status-Inside")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,"K1"
		.ItemBar(h,"K1",exBarFrameColor) = 50331903
		h = .AddItem("Blue-Status-Inside")
		.AddBar h,"Task",#1/3/2001#,#1/6/2001#,"K1"
		.ItemBar(h,"K1",exBarFrameColor) = 67043328
	End With
	.EndUpdate 
End With
1673:
Is it possible to show a status left or right to the bar (method 1, exBarBackgroundExt)

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 128
	End With
	With .Items
		h = .AddItem("Red-Left-Status-Inside")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,"K1"
		.ItemBar(h,"K1",exBarBackgroundExt) = "left[6,back=RGB(255,0,0)]"
		h = .AddItem("Blue-Left-Status-Inside")
		.AddBar h,"Task",#1/3/2001#,#1/6/2001#,"K1"
		.ItemBar(h,"K1",exBarBackgroundExt) = "left[6,back=RGB(0,0,255)]"
		h = .AddItem("Red-Right-Status-Inside")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,"K1"
		.ItemBar(h,"K1",exBarBackgroundExt) = "right[6,back=RGB(255,0,0)]"
		h = .AddItem("Blue-Right-Status-Inside")
		.AddBar h,"Task",#1/3/2001#,#1/6/2001#,"K1"
		.ItemBar(h,"K1",exBarBackgroundExt) = "right[6,back=RGB(0,0,255)]"
	End With
	.EndUpdate 
End With
1672:
How can I use the ItemBar(exBarBackgroundExt) property for a bar

With G2antt1
	.BeginUpdate 
	.DefaultItemHeight = 31
	.DrawGridLines = exAllLines
	.GridLineColor = RGB(224,224,224)
	.BackColorLevelHeader = .BackColor
	.Columns.Add "Task"
	With .Chart
		.LevelCount = 2
		.Level(0).GridLineColor = G2antt1.GridLineColor
		.Level(1).GridLineColor = G2antt1.GridLineColor
		.ShowNonworkingDates = False
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 128
		.Bars.Item("Task").Height = 21
		.DrawGridLines = exAllLines
	End With
	With .Items
		h = .AddItem("Normal")
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"K1"
		h = .AddItem("Red-Frame-Inside")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,"K1"
		.ItemBar(h,"K1",exBarBackgroundExt) = "[frame=RGB(255,0,0),framethick]"
		h = .AddItem("LR-Margins")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#,"K1"
		.ItemBar(h,"K1",exBarBackgroundExt) = "left[4,back=RGB(0,255,0)],right[4,back=RGB(0,0,255)]"
		h = .AddItem("LR-Margins (front)")
		.AddBar h,"Task",#1/2/2001#,#1/7/2001#,"K1"
		.ItemBar(h,"K1",exBarBackgroundExt) = "left[4,back=RGB(0,255,0)],right[4,back=RGB(0,0,255)]"
		.ItemBar(h,"K1",exBarBackgroundExtFlags) = 2
		h = .AddItem("LR-Margins (back)")
		.AddBar h,"Task",#1/2/2001#,#1/8/2001#,"K1"
		.ItemBar(h,"K1",exBarBackgroundExt) = "left[4,back=RGB(0,255,0)],right[4,back=RGB(0,0,255)]"
		.ItemBar(h,"K1",exBarBackgroundExtFlags) = 3
		h = .AddItem("TB-Margins")
		.AddBar h,"Task",#1/2/2001#,#1/9/2001#,"K1"
		.ItemBar(h,"K1",exBarBackgroundExt) = "top[4,back=RGB(255,0,0)],bottom[4,back=RGB(0,255,0)]"
		h = .AddItem("TB-Margins")
		.AddBar h,"Task",#1/2/2001#,#1/10/2001#,"K1"
		.ItemBar(h,"K1",exBarBackgroundExt) = "top[2,back=RGB(255,0,0)],bottom[2,back=RGB(0,255,0)]"
		.ItemBar(h,"K1",exBarBackgroundExtFlags) = 2
		h = .AddItem("Caption(back)")
		.AddBar h,"Task",#1/2/2001#,#1/11/2001#,"K1"
		.ItemBar(h,"K1",exBarBackgroundExt) = "client(bottom[14,text=`<sha ;;0><font ;8>background`,align=0x11])"
		.ItemBar(h,"K1",exBarBackgroundExtFlags) = 2
		h = .AddItem("Pattern-Outside")
		.AddBar h,"Task",#1/2/2001#,#1/12/2001#,"K1"
		.ItemBar(h,"K1",exBarBackgroundExt) = "bottom[10%,pattern=7,frame]"
		.ItemBar(h,"K1",exBarBackgroundExtFlags) = 2
		h = .AddItem("Pattern-Inside")
		.AddBar h,"Task",#1/2/2001#,#1/13/2001#,"K1"
		.ItemBar(h,"K1",exBarBackgroundExt) = "bottom[7,pattern=3,frame]"
		h = .AddItem("Pattern-Inside-Caption")
		.AddBar h,"Task",#1/2/2001#,#1/12/2001#,"K1"
		.ItemBar(h,"K1",exBarBackgroundExt) = "top[4](left[4],right[4],client),bottom[4](left[4],right[4],client),left[4],right[4],client(left[75%,text=`<fgcolor FFFFFF>75%`," & _
"align=0x11,pattern=0x001,frame=RGB(255,0,0)])"
		h = .AddItem("Complex(back)")
		.AddBar h,"Task",#1/2/2001#,#1/11/2001#,"K1"
		.ItemBar(h,"K1",exBarBackgroundExt) = "top[30%,back=RGB(253,218,101)],client[back=RGB(91,157,210)],none[(0%,0%,10%,100%)](top[90%,back=RGB(0,0,0)])"
		.ItemBar(h,"K1",exBarBackgroundExtFlags) = 3
		h = .AddItem("Complex(inside)")
		.AddBar h,"Task",#1/2/2001#,#1/12/2001#,"K1"
		.ItemBar(h,"K1",exBarBackgroundExt) = "top[30%,back=RGB(253,218,101)],client[back=RGB(91,157,210)],none[(0%,0%,10%,100%)](top[90%,back=RGB(0,0,0)])"
	End With
	.EndUpdate 
End With
1671:
How can display seconds

With G2antt1
	With .Chart
		.PaneWidth(False) = 96
		.FirstVisibleDate = #1/17/2008#
		.LevelCount = 2
		.UnitScale = exSecond
		.Level(0).Alignment = AlignmentEnum.exHOutside Or AlignmentEnum.CenterAlignment
		.Level(1).FormatLabel = "(0:=sec(dvalue)) mod 10 ? 0=: : '<c><font ;6>sec<br><b>' + 0=:"
	End With
	.Columns.Add "Tasks"
	With .Items
		.AddBar .AddItem("Task 1"),"Task",#1/17/2008 0:00:02 AM#,#1/17/2008 0:00:08 AM#
		.AddBar .AddItem("Task 2"),"Task",#1/17/2008 0:00:05 AM#,#1/17/2008 0:00:15 AM#
	End With
End With
1670:
How can I check if an item contains a bar
' SelectionChanged event - Fired after a new item has been selected.
Private Sub G2antt1_SelectionChanged()
	With G2antt1
		With .Items
			Debug.Print( "Count of A: " )
			Debug.Print( .ItemBar(.FocusItem,"A",exBarsCount) )
			Debug.Print( "Count of B: " )
			Debug.Print( .ItemBar(.FocusItem,"B",exBarsCount) )
			Debug.Print( "Count of C: " )
			Debug.Print( .ItemBar(.FocusItem,"C",exBarsCount) )
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	With .Chart
		.LevelCount = 2
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 48
		.Bars.Item("Task").Def(exBarHAlignCaption) = 18
	End With
	With .Items
		.AddBar .AddItem("Task"),"Task",#1/2/2001#,#1/4/2001#,"A","A"
		.AddBar .AddItem("Task"),"Task",#1/2/2001#,#1/4/2001#,"B","B"
		.AddBar .AddItem("Task"),"Task",#1/2/2001#,#1/4/2001#,"C","C"
	End With
	.EndUpdate 
End With
1669:
How can I connect to a DBF file
With G2antt1
	.BeginUpdate 
	.ColumnAutoResize = False
	.ContinueColumnScroll = False
	Set rs = CreateObject("ADODB.Recordset")
	With rs
		.Open "Select * From foxcode.DBF","Provider=vfpoledb;Data Source=C:\Program Files\Microsoft Visual FoxPro 9\",3,3
	End With
	.DataSource = rs
	.Chart.PaneWidth(True) = 0
	.EndUpdate 
End With
1668:
How do I get the caption with no HTML format

With G2antt1
	.Columns.Add "Default"
	With .Items
		h = .AddItem("This is a bit of <b>HTML-formatted</b> text")
		.CellValueFormat(h,0) = exHTML
		.AddItem .CellCaption(h,0)
	End With
End With
1667:
How can I change the bar's color based on its length/duration

With G2antt1
	.BeginUpdate 
	With .Columns
		.Add "Tasks"
		With .Add("Duration")
			.Def(exCellValueToItemBarProperty) = 513
			.Editor.EditType = SpinType
		End With
	End With
	.Items.AllowCellValueToItemBar = True
	With .Chart
		.FirstWeekDay = exMonday
		.LevelCount = 2
		.FirstVisibleDate = #6/6/2005#
		.PaneWidth(False) = 128
	End With
	With .ConditionalFormats.Add("%1 >= 4")
		.ApplyTo = &H1
		.Bold = True
		.ApplyToBars = "Task"
		.BarColor = RGB(255,0,0)
		.ForeColor = .BarColor
	End With
	With .Items
		.AddBar .AddItem("Task"),"Task",#6/10/2005#,#6/13/2005#,""
		.AddBar .AddItem("Task"),"Task",#6/11/2005#,#6/16/2005#,""
		.AddBar .AddItem("Task"),"Task",#6/12/2005#,#6/15/2005#,""
	End With
	.EndUpdate 
End With
1666:
Is it possible to colorize the bars based on its starting/ending date

With G2antt1
	.BeginUpdate 
	.OnResizeControl = OnResizeControlEnum.exDisableSplitter Or OnResizeControlEnum.exResizeChart
	With .Columns
		.Add "Tasks"
		With .Add("Start")
			.Def(exCellValueToItemBarProperty) = 1
			.Visible = False
		End With
	End With
	.Items.AllowCellValueToItemBar = True
	With .Chart
		.FirstWeekDay = exMonday
		.LevelCount = 2
		.FirstVisibleDate = #5/31/2005#
		.PaneWidth(False) = 0
		.AllowInsideZoom = True
		.AllowResizeInsideZoom = False
		.InsideZoomOnDblClick = False
		With .DefaultInsideZoomFormat
			.PatternChart = exPatternBDiagonal
			.PatternColorChart = RGB(255,0,0)
			.ForeColor = .PatternColorChart
		End With
		With .InsideZooms
			.SplitBaseLevel = False
			.DefaultWidth = 18
			.Add(#6/10/2005#).AllowInsideFormat = False
		End With
	End With
	With .ConditionalFormats.Add("%1 <= #6/10/2005#")
		.ApplyToBars = "Task"
		.BarColor = RGB(255,0,0)
	End With
	With .Items
		.AddBar .AddItem("Task"),"Task",#6/10/2005#,#6/14/2005#,""
		.AddBar .AddItem("Task"),"Task",#6/11/2005#,#6/15/2005#,""
		.AddBar .AddItem("Task"),"Task",#6/12/2005#,#6/16/2005#,""
	End With
	.EndUpdate 
End With
1665:
How can I change the bar's color based on values on the columns

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #8/3/1994#
		.PaneWidth(False) = 256
		.LevelCount = 2
		.UnitScale = exDay
		.FirstWeekDay = exMonday
		.OverviewVisible = exOverviewShowAllVisible
	End With
	.ColumnAutoResize = False
	.ContinueColumnScroll = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\VB\SAMPLE.MDB",3,3
	End With
	.DataSource = rs
	.Items.AllowCellValueToItemBar = True
	.Columns.Item(2).Def(exCellValueToItemBarProperty) = 1
	.Columns.Item(4).Def(exCellValueToItemBarProperty) = 2
	With .ConditionalFormats
		With .Add("1")
			.ApplyTo = &H1
			.Bold = True
			.BackColor = RGB(250,250,250)
		End With
		With .Add("%1 = 5")
			.ApplyToBars = "Task"
			.BarColor = RGB(255,0,0)
			.ForeColor = RGB(255,0,0)
			.BarOverviewColor = RGB(255,0,0)
		End With
		With .Add("%1 = 3")
			.ApplyToBars = "Task"
			.BarColor = RGB(0,255,0)
			.ForeColor = RGB(0,255,0)
			.BarOverviewColor = RGB(0,255,0)
		End With
	End With
	.EndUpdate 
End With
1664:
How can I display / specify a fixed percent for the task in the histogram, no matter how long the task is

With G2antt1
	.BeginUpdate 
	.DefaultItemHeight = 32
	.Columns.Add "Tasks"
	With .Chart
		.UnitWidth = 32
		.LevelCount = 2
		.NonworkingDays = 0
		.PaneWidth(0) = 64
		.FirstVisibleDate = #6/20/2005#
		.HistogramVisible = True
		.HistogramView = exHistogramAllItems
		.HistogramHeight = 64
		With .Bars.Item("Task")
			.HistogramPattern = .Pattern
			.HistogramType = exHistOverAllocation
			.ShowHistogramValues = 1
		End With
		With .Bars.Copy("Task","TaskFixed")
			.HistogramType = HistogramTypeEnum.exHistOverAllocationFixed Or HistogramTypeEnum.exHistOverAllocation
			.ShowHistogramValues = 1
		End With
		With .Bars.Copy("Task","TaskMultiply")
			.HistogramType = HistogramTypeEnum.exHistOverAllocationMultiply Or HistogramTypeEnum.exHistOverAllocation
			.ShowHistogramValues = 1
		End With
	End With
	With .Items
		h = .AddItem("Allocation")
		.AddBar h,"Task",#6/21/2005#,#6/23/2005#,"A","Effort/Length"
		.ItemBar(h,"A",exBarEffort) = 0.25
		.ItemBar(h,"A",exBarVAlignCaption) = 18
		.AddBar h,"TaskFixed",#6/24/2005#,#6/26/2005#,"B","Effort"
		.ItemBar(h,"B",exBarEffort) = 0.25
		.ItemBar(h,"B",exBarVAlignCaption) = 18
		.AddBar h,"TaskMultiply",#6/27/2005#,#6/29/2005#,"C","Effort*Length"
		.ItemBar(h,"C",exBarEffort) = 0.25
		.ItemBar(h,"C",exBarVAlignCaption) = 18
	End With
	.EndUpdate 
End With
1663:
Does your control supports scrolling by touching the screen

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	With .Chart
		.FirstVisibleDate = #8/3/1994#
		.PaneWidth(False) = 256
		.LevelCount = 2
		.UnitScale = exDay
		.FirstWeekDay = exMonday
		.OverviewVisible = exOverviewShowAllVisible
	End With
	.ColumnAutoResize = False
	.ContinueColumnScroll = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb",3,3
	End With
	.DataSource = rs
	.Items.AllowCellValueToItemBar = True
	.Columns.Item(2).Def(exCellValueToItemBarProperty) = 1
	.Columns.Item(4).Def(exCellValueToItemBarProperty) = 2
	.ContinueColumnScroll = True
	.ScrollBySingleLine = True
	.Chart.AllowCreateBar = exNoCreateBar
	.AutoDrag = AutoDragEnum.exAutoDragScrollOnShortTouch Or AutoDragEnum.exAutoDragScroll
	.EndUpdate 
End With
1662:
Is it possible to use build-in zoom-functionality to zoom time periods spanning to just some hours of one day (zoom-onfly)

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	With .Chart
		.UnitScale = exDay
		.PaneWidth(0) = 0
		.LevelCount = 2
		.FirstVisibleDate = #1/1/2001#
		.DrawGridLines = exAllLines
		.AllowZoomOnFly = exZoomOnFly
		.ResizeUnitScale = exHour
		.ResizeUnitCount = 4
		.Label(exHour) = "<font ;5><b><%h%><br><%AM/PM%></b></font><||>4<||>65536"
		.ZoomOnFlyCaption = "<br><c><b><font ;12><%=%C0%>"
	End With
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/7/2001#,#1/10/2001#,"T1","T1"
		.AddBar h,"Task",#1/11/2001#,#1/14/2001#,"T3","T3"
		h = .AddItem()
		.AddBar h,"",#1/15/2001#,#1/15/2001#,"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown."
		.SelectableItem(h) = False
	End With
	.EndUpdate 
End With
1661:
Is it possible to use build-in zoom-functionality to zoom time periods spanning to just some hours of one day (inside-zoom)

With G2antt1
	.BeginUpdate 
	With .Chart
		.UnitScale = exDay
		.PaneWidth(0) = 0
		.LevelCount = 2
		.FirstVisibleDate = #1/1/2008#
		With .DefaultInsideZoomFormat
			.InsideLabel = "<%hh%>"
			.InsideUnit = exHour
			.InsideCount = 8
		End With
		.AllowInsideZoom = True
		With .InsideZooms
			.Add #1/4/2008#
		End With
		.DrawGridLines = exAllLines
	End With
	.EndUpdate 
End With
1660:
How can I export the control's content to a PDF document (method 1)
With G2antt1
	.BeginUpdate 
	.MarkSearchColumn = False
	With .Columns
		.Add "Tasks"
		With .Add("Start")
			.Def(exCellValueToItemBarProperty) = 1
			.Editor.EditType = SpinType
		End With
		With .Add("End")
			.Def(exCellValueToItemBarProperty) = 2
			.Editor.EditType = SpinType
		End With
	End With
	With .Chart
		.PaneWidth(False) = 196
		.LevelCount = 2
		.ShowEmptyBars = 1
		.FirstVisibleDate = #1/1/2009#
	End With
	With .Items
		.AllowCellValueToItemBar = True
		.AddBar .AddItem("Task 1"),"Task",#1/2/2009#,#1/7/2009#
		.AddBar .AddItem("Task 2"),"Task",#1/4/2009#,#1/9/2009#
	End With
	With CreateObject("Exontrol.Print")
		.PrintExt = G2antt1.Object
		.CopyTo "c:/temp/xtest.pdf"
	End With
	Debug.Print( "Look for C:\Temp\xtest.pdf file." )
	.EndUpdate 
End With
1659:
How can I export the control's content to a PDF document (method 2)
With G2antt1
	.BeginUpdate 
	.MarkSearchColumn = False
	With .Columns
		.Add "Tasks"
		With .Add("Start")
			.Def(exCellValueToItemBarProperty) = 1
			.Editor.EditType = SpinType
		End With
		With .Add("End")
			.Def(exCellValueToItemBarProperty) = 2
			.Editor.EditType = SpinType
		End With
	End With
	With .Chart
		.PaneWidth(False) = 196
		.LevelCount = 2
		.ShowEmptyBars = 1
		.FirstVisibleDate = #1/1/2009#
	End With
	With .Items
		.AllowCellValueToItemBar = True
		.AddBar .AddItem("Task 1"),"Task",#1/2/2009#,#1/7/2009#
		.AddBar .AddItem("Task 2"),"Task",#1/4/2009#,#1/9/2009#
	End With
	var_CopyTo = .CopyTo("c:/temp/xtest.pdf")
	Debug.Print( "Look for C:\Temp\xtest.pdf file." )
	.EndUpdate 
End With
1658:
Today date is shown, if we use the Column.FormatColumn and Editor.Option(exDateAllowNullDate) properties. What can be done

With G2antt1
	.BeginUpdate 
	With .Columns.Add("Date")
		.FormatColumn = "len(value) ? ( (longdate(date(value)) left 3) + ' ' + day(date(value)) + '/' + month(date(value)) + '/' + (year(date(value)) ri" & _
"ght 2) ) : '' )"
		With .Editor
			.EditType = DateType
			.Option(exDateAllowNullDate) = True
		End With
	End With
	With .Items
		.AddItem #5/12/2012#
		.AddItem 
		.AddItem #5/14/2012#
	End With
	.EndUpdate 
End With
1657:
Is there a syntax for conditional formatting of items, based on CellState/CellStateChange

' CellStateChanged event - Fired after cell's state has been changed.
Private Sub G2antt1_CellStateChanged(ByVal Item As EXG2ANTTLibCtl.HITEM,ByVal ColIndex As Long)
	With G2antt1
		With .Items
			.CellValue(Item,2) = .CellState(Item,0)
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.ShowFocusRect = False
	.SelBackMode = exTransparent
	Set var_ConditionalFormat = .ConditionalFormats.Add("%2 != 0")
	With var_ConditionalFormat
		.Bold = True
		.ForeColor = RGB(255,0,0)
		.ApplyTo = exFormatToItems
	End With
	With .Columns.Add("")
		.Def(exCellHasCheckBox) = True
		.Width = 16
		.AllowSizing = False
	End With
	.Columns.Add "Information"
	.Columns.Add("Hidden").Visible = False
	With .Items
		.CellValue(.AddItem(""),1) = "This is a bit of text associated"
		h = .AddItem("")
		.CellValue(h,1) = "This is a bit of text associated"
		.CellState(h,0) = 1
		.CellValue(.AddItem(""),1) = "This is a bit of text associated"
	End With
	.EndUpdate 
End With
1656:
How can I hide the items/grid section of the control

With G2antt1
	.BeginUpdate 
	.OnResizeControl = OnResizeControlEnum.exDisableSplitter Or OnResizeControlEnum.exResizeChart
	.Columns.Add "Tasks"
	With .Chart
		.FirstWeekDay = exMonday
		.LevelCount = 2
		.FirstVisibleDate = #6/9/2005#
		.HistogramVisible = True
		.HistogramView = exHistogramAllItems
		.HistogramHeight = 128
		With .Bars.Item("Task")
			.HistogramPattern = .Pattern
		End With
		.PaneWidth(False) = 0
	End With
	With .Items
		.AddBar .AddItem("Task"),"Task",#6/10/2005#,#6/14/2005#,""
		.AddBar .AddItem("Task"),"Task",#6/11/2005#,#6/15/2005#,""
		.AddBar .AddItem("Task"),"Task",#6/12/2005#,#6/16/2005#,""
	End With
	.EndUpdate 
End With
1655:
How can I draw an extra line which could indicate deadline for my tasks

With G2antt1
	.BeginUpdate 
	.DefaultItemHeight = 24
	With .VisualAppearance
		.Add 2,"gBFLBCJwBAEHhEJAAChABLMIQAAYAQGKIaBoAKBQAGaAoDDQOQ4QwAAxjAKUEwsACEIrjKCYVgOHYYRrIIEvZAAMIlSbCMoxcAsSQSf6YJBmKL4fiWMobRCMQyiLLMd" & _
"wiGoYJ4hGgKChqI43RZNErURRkEwCgIA="
		.Add 1,"CP:2 0 -4 0 4"
	End With
	.Columns.Add "Task"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 128
	End With
	With .Items
		h = .AddItem("Default")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,"K1"
		.ItemBar(h,"K1",exBarFrameColor) = 16777471
		.AddBar h,"Task",#1/9/2001#,#1/14/2001#,"K2"
		.ItemBar(h,"K2",exBarFrameColor) = 33488896
	End With
	.EndUpdate 
End With
1654:
How can I mark/highlight a zone in the control's histogram

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Chart
		.FirstWeekDay = exMonday
		.LevelCount = 2
		.PaneWidth(0) = 40
		.FirstVisibleDate = #6/9/2005#
		.HistogramVisible = True
		.HistogramView = exHistogramAllItems
		.HistogramHeight = 128
		With .Bars.Item("Task")
			.HistogramPattern = .Pattern
			.HistogramType = exHistOverload
			.HistogramItems = 12
			.HistogramRulerLinesColor = RGB(0,0,1)
		End With
	End With
	With .Items
		.AddBar .AddItem("Task"),"Task",#6/10/2005#,#6/14/2005#,""
		.AddBar .AddItem("Task"),"Task",#6/11/2005#,#6/15/2005#,""
		.AddBar .AddItem("Task"),"Task",#6/12/2005#,#6/16/2005#,""
	End With
	.Chart.MarkTimeZone "zone",#6/13/2005#,#6/14/2005#,15790320,";;;;histogram;1"
	.EndUpdate 
End With
1653:
How can I get the min/max values from the histogram
' MouseMove event - Occurs when the user moves the mouse.
Private Sub G2antt1_MouseMove(Button As Integer,Shift As Integer,X As Single,Y As Single)
	With G2antt1
		With .Chart
			Debug.Print( "Value" )
			Debug.Print( .HistogramValue(.DateFromPoint(-1,-1)) )
			Debug.Print( "MIN" )
			Debug.Print( .HistogramValue("min") )
			Debug.Print( "MAX" )
			Debug.Print( .HistogramValue("max") )
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Chart
		.FirstWeekDay = exMonday
		.LevelCount = 2
		.PaneWidth(0) = 40
		.FirstVisibleDate = #6/9/2005#
		.HistogramVisible = True
		.HistogramView = exHistogramAllItems
		.HistogramHeight = 128
		With .Bars.Item("Task")
			.HistogramPattern = .Pattern
			.HistogramType = exHistOverload
			.HistogramItems = 12
			.HistogramRulerLinesColor = RGB(0,0,1)
		End With
	End With
	With .Items
		.AddBar .AddItem("Task"),"Task",#6/10/2005#,#6/14/2005#,""
		.AddBar .AddItem("Task"),"Task",#6/11/2005#,#6/15/2005#,""
		.AddBar .AddItem("Task"),"Task",#6/12/2005#,#6/16/2005#,""
	End With
	.EndUpdate 
End With
1652:
How can I assign different efforts to the same bar

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Chart
		.FirstWeekDay = exMonday
		.LevelCount = 2
		.PaneWidth(0) = 40
		.FirstVisibleDate = #6/9/2005#
		.HistogramVisible = True
		.HistogramView = exHistogramAllItems
		.HistogramHeight = 128
		With .Bars.Item("Task")
			.HistogramPattern = .Pattern
			.HistogramType = exHistOverload
			.HistogramItems = 12
			.HistogramRulerLinesColor = RGB(0,0,1)
		End With
		.Level(1).Label = "<font ;3><%d%>"
		.UnitWidth = 9
	End With
	With .Items
		h = .AddItem("Task")
		.AddBar h,"Task",#6/10/2005#,#6/14/2005#,""
		.ItemBar(h,"",exBarEffort) = "weekday(value) in (0,6) ? 0.25 : 2"
		h = .AddItem("Task")
		.AddBar h,"Task",#6/18/2005#,#6/21/2005#,""
		.ItemBar(h,"",exBarEffort) = "weekday(value) = 1 ? 2 : 1"
		h = .AddItem("Task")
		.AddBar h,"Task",#6/27/2005#,#7/9/2005#,""
		.ItemBar(h,"",exBarEffort) = "month (value) = 7 ? 1 : 0"
		h = .AddItem("Task")
		.AddBar h,"Task",#6/27/2005#,#7/5/2005#,""
		.ItemBar(h,"",exBarEffort) = "(month(value)=month(value+1)) ? 1 : 0"
		h = .AddItem("Task")
		.AddBar h,"Task",#6/22/2005#,#6/26/2005#,""
		.ItemBar(h,"",exBarEffort) = "int(value-start) ? 1 : 2"
		h = .AddItem("Task")
		.AddBar h,"Task",#7/10/2005#,#7/14/2005#,""
		.ItemBar(h,"",exBarEffort) = "(int(value-start) and int(end-value) != 0 ) ? 1 : 2"
		h = .AddItem("Task")
		.AddBar h,"Task",#7/15/2005#,#7/22/2005#,""
		.ItemBar(h,"",exBarEffort) = "(int(value-start)+1) mod 2 ? 1 : 0"
	End With
	.EndUpdate 
End With
1651:
How can I prevent showing the representation of the bar on the week days, nonworking part

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Chart
		.LevelCount = 2
		.PaneWidth(0) = 40
		.FirstVisibleDate = #6/9/2005#
		.HistogramVisible = True
		.HistogramView = exHistogramAllItems
		.HistogramHeight = 128
		With .Bars.Item("Task")
			.HistogramPattern = .Pattern
			.HistogramType = exHistOverload
			.HistogramItems = 12
			.HistogramRulerLinesColor = RGB(0,0,1)
		End With
	End With
	With .Items
		h = .AddItem("Task")
		.AddBar h,"Task",#6/10/2005#,#6/21/2005#,""
		.ItemBar(h,"",exBarEffort) = "weekday(value) in (0,6) ? 0 : 2"
	End With
	.EndUpdate 
End With
1650:
How do I programatically focus a cell
' FocusChanged event - Occurs when a cell gets the focus.
Private Sub G2antt1_FocusChanged()
	With G2antt1
		With .Items
			.CellBackColor(.FocusItem,G2antt1.FocusColumnIndex) = RGB(255,0,0)
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.SelForeColor = .ForeColor
	.SelBackColor = .BackColor
	.DrawGridLines = exRowLines
	With .Columns
		.Add "Column1"
		.Add "Column2"
	End With
	With .Items
		.CellValue(.AddItem("Cell 1.1"),1) = "Cell 1.2"
		.CellValue(.AddItem("Cell 2.1"),1) = "Cell 2.2"
	End With
	With .Items
		.SelectItem(.ItemByIndex(1)) = True
	End With
	.FocusColumnIndex = 1
	.EndUpdate 
End With
1649:
How do I programatically focus a cell (excrd)
' FocusChanged event - Occurs when a cell gets the focus.
Private Sub G2antt1_FocusChanged()
	With G2antt1
		With .Items
			.CellBackColor(.FocusItem,G2antt1.FocusColumnIndex) = RGB(255,0,0)
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.SelForeColor = .ForeColor
	.SelBackColor = .BackColor
	.DrawGridLines = exRowLines
	.DefaultItemHeight = 36
	With .Columns
		.Add("Column1").Visible = False
		.Add("Column2").Visible = False
		.Add("Column3").Visible = False
		With .Add("FormatLevel")
			.FormatLevel = "(0/1),2"
			.Def(exCellFormatLevel) = .FormatLevel
		End With
	End With
	With .Items
		h = .AddItem("Cell 1.1")
		.CellValue(h,1) = "Cell 1.2"
		.CellValue(h,2) = "Cell 1.3"
		h = .AddItem("Cell 2.1")
		.CellValue(h,1) = "Cell 2.2"
		.CellValue(h,2) = "Cell 2.3"
	End With
	With .Items
		.SelectItem(.ItemByIndex(1)) = True
	End With
	.FocusColumnIndex = 2
	.EndUpdate 
End With
1648:
How can I get task's user data ( exBarData ) when user double clicks the bar
' DblClick event - Occurs when the user dblclk the left mouse button over an object.
Private Sub G2antt1_DblClick(Shift As Integer,X As Single,Y As Single)
	With G2antt1
		item = .ItemFromPoint(-1,-1,c,hit)
		key = .Chart.BarFromPoint(-1,-1)
		Debug.Print( .Items.ItemBar(item,key,exBarData) )
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 48
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,""
		.ItemBar(h,"",exBarData) = "this is a bit of extra data associated with task 1"
		h = .AddItem("Task 2")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,""
		.ItemBar(h,"",exBarData) = "this is a bit of extra data associated with task 2"
	End With
	.EndUpdate 
End With
1647:
How do I get arranged the levels to display, weeks, days and so on

With G2antt1
	.BeginUpdate 
	With .Chart
		.UnitWidth = 24
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(0) = 0
		.LevelCount = 2
		.FirstWeekDay = exMonday
		With .Level(0)
			.Alignment = CenterAlignment
			.Label = "<b><Font Tahoma;7><%m3%>, <%yyyy%></b><b>, <Font Tahoma;7>Wk <%ww%>"
			.Unit = exWeek
			.DrawGridLines = True
		End With
		With .Level(1)
			.Alignment = CenterAlignment
			.Label = "<Font Tahoma;7><%d%>"
			.Unit = exDay
		End With
		.DrawGridLines = exAllLines
	End With
	.EndUpdate 
End With
1646:
How can I add a task and a milestone to the same item
With G2antt1
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Milestone",#1/2/2001#,#1/2/2001#,"MKey"
		.AddBar h,"Task",#1/3/2001#,#1/7/2001#
	End With
End With
1645:
How can I change the visual appearance of the buttons on the control's overview part

With G2antt1
	.VisualAppearance.Add 1,"gBFLBCJwBAEHhEJAADhABdQFg6AADACAxRDAMgBQKAAzQFAYawdBgABoGUZ4JhUAIIRZGMIjFDcEwxC6NIpAWCYQDENQwSSMMJwSKYYBiASEYJASQZUhmHIDTbIEBxf" & _
"IMIRLE6PZbmEYYfgeNY6TQCcIgVD0ExhAZ2Q4EQAKRpOFY/DBQNLgAKNCQ3LaQY7BaKgZouTYDVrVNSVFC0IBkGoSbauCIJHrGCZ1RBYMI0VDNRwHJiMbRtSyqXjGJ4p" & _
"SrAcq0FAgYRHI6jZxnGL5chqPqGVjMNZ1bQuKwzT0Ld5wTYsdydBK1MIkTKKaoORZgRpYUI6FAeSgBWyPcCqPSoDrKdo4XLdYwbeAFcSPD6+NBhG7tXm/NarNTgTB6DB" & _
"thsGJbgYYw9AQVxBoOch2hEbh+nAARYkQdZ7CMPYGH+FxmlqbJ5lqDAdjMC5AmIW54hwaBvA4IQ8D+T8IFscgenAAZMHiEgWiWdRZlSAAhAkFAGq6dAdEcIYVF4QJKCA" & _
"HQDBCBJYGUGQNhCEIhiSCJaGAYQWBsIYmEEFgJAGQ42CyC4iliPgygsT4olSXg3g2Qwwk0MpMiMLJIg8Y54niTYOmPPJMDMDIonSSU7jMJJbDaTYjlYUoMmMCRWFQAAl" & _
"EkZgtDgTgjgCJQpEoIgkgkIQHnIAB7CACARnIaIaiaGYuG6GxmhmFB7CGSICAyHwoAmQxQlQNIlikWgthYIwaAYVQvAuQpsg0IxIhKTIzCwToTiiaYACkChGhKJJpEOQ" & _
"oWC+C5imyCgiggYpUzMZ5Yj6AIfg6UpcjgLYInIPILhOTYaEIUg9EoItfCGCByAiCV2lIKILCGK4qnKO4YggWpQgIJxJmIaJhDgDgKECaIykkUhUhILQLEKRh9iiYpzC" & _
"SSQxmgcgkm2NppAKbI8C4RoBiQYgSgSMQQEEEIDjECBDA8LorjKa47EQMQSm4DpEhEKBDBeRgBGqMQnmkA5in4JAJAINoEC6JR4jyaQ6E6AhEhIIxNBMRJPiQCYyHCGA" & _
"UgUMQwEgEhhkEOBHBOBJxCMHJHjGXB/CKSBxlENwaj1qgsEwERICIDB/iQDgjgiYYvE2cx8l2KIinoEI5CYSYiFqEAz0mMBZBbwIkEsEN+gMSpSHSTITEqSoEFyGBHCo" & _
"SoihqEAsgsIo8ikKhKGiVJ6AADwTkicQlAkUhElA+Z4VUHpHGuRA8lMdI9DscJc8r5QQAaIYsGUOpOjoOwHCEJAUgBh8B1EAAcHIzg5gPCGNgdQfRPhnGiLINhhQEDCB" & _
"cGUDYphxjLHkNgfwTARhiHEBYWAVxpI1HQDcDjthiAADoKcCgJgbs7FyG4LQagBBgE0CMOYOxLhtGY/AcAegNgTHIPkHISAHADEQNYOA2BwAHEQHABwQxMDbCQEscoEB" & _
"AAgEOD0V4cR0jyGCPAPwHAvh0EAOIHIDRfA/EaGMfYfguAACiBQIg/xWAbH0F8J4bxSD6G8MUMo7Q9ieHuI8eA0gLjfG2PUPQnwvhvHsPsGABxhD8E+AMbgfhVDJH2L8" & _
"U48wAjbEGPwPo7x8j4F4FccwHAhhiEgBQEQhAnCDGgHwBonxiAZD+G8Lo/hHj3H8PELIiBwgOFCNQHAqQAhYBWAUIARAECgHyKkIIqAIgGGCLgUIFAhB5CQAcFAGgcEH" & _
"HKBwUYkAdiHDgOaAIKBigYCCFAFQhBzChAWKEOYzwDhCEwFMBQNxwD3C8CsPgHQhANEuA4Uw+gdhHDAOwBogRYAzFuGAQIEgQAzCSGUAIbAXAFCiKIGghhBCQAeAFIgD" & _
"gwjMByEAAYXg1hiEwFgBYAQugAGIPsTodgnDSBgMca4LhqChCgD4CIYgYBDmcI4GIxgUCYAm1oPIjwgjmFQMYWA1gNCiBUqcII6gegUEAHwB4oRwhzEGLge4GAOC6HUA" & _
"cMIsAbCGDqLYHYVBACTAkIIIAYigCIGcBQCArQKiiFQFERQUQhDMAOBgcIWAggUBGIMfAVAHhCBwEgBAMg+jbFqCcHYLxvg4D2A8QI3AziMHiJoUgFhACyCwIINofwHi" & _
"JDAJUKw2B2ARGEEAIwCxIh2BaNQQA/ROBRGoFYQ48B/AeEGEt99lQOgDFgGcAtFgdgHEANIMAhAIDKAygkQAEAAjxBeIoCI7QfjUEEEwDIIgWBFEQHUSANxsAqEEEUdw" & _
"lA4iJCSFYEwhBsCXE0KoIAexnj4DoDkEwaBmgYCGAwMADAkCFCMMYAQOgMhQEIHsaIVQQDXFOOgRtwAUguAcAUU1iw1CWA6OwdIOQFBxCgCkDgeBribBmIgP4KQiAAB+" & _
"KoAg2QNiDDoG0BQyQzg+EGOAWAFgRC4DsEURQYAdhWFKAoKAVQAB/AcHEaAORiioFqBYMWFATCZEsBsIYcA0gMGCJwGAhg4DQAwKsDAYQGzZBkAcSA8gODEBEGQVIQha" & _
"jUEeeYKY1QIDrBCIAEg0xIAwEgBNkAAADUTA6B4MQEwv0UEGLAUgzhf04AKGEg4BhYD2B0MUAABApAAvqI8WAqAdDGGwJsEIXwWDtE0AAA4fhmDZCmJMMwbBkgBIC"
	With .Chart
		.PaneWidth(False) = 0
		.LevelCount = 2
		.OverviewVisible = exOverviewShowAllVisible
		.AllowOverviewZoom = exAlwaysZoom
		.Label(exSecond) = ""
		.Label(exYear) = ""
	End With
	.Chart.OverviewSelBackColor = &H1ffff00
End With
1644:
Is there a way to show the Start and End dates in mm-dd-yyyy format

With G2antt1
	.BeginUpdate 
	.MarkSearchColumn = False
	.Items.AllowCellValueToItemBar = True
	With .Chart
		.LevelCount = 2
		.FirstVisibleDate = #12/25/2000#
		.PaneWidth(False) = 196
	End With
	With .Columns.Add("Start")
		.Def(exCellValueToItemBarProperty) = 1
		.Def(exCellValueToItemBarKey) = "K1"
		.FormatColumn = "(0 array (0:=(shortdateF(value) split `/`))) + `-` + (1 array (=:0) ) + `-` + (2 array (=:0) )"
	End With
	With .Columns.Add("End")
		.Def(exCellValueToItemBarProperty) = 2
		.Def(exCellValueToItemBarKey) = "K1"
		.FormatColumn = "shortdateF(value) replace `/` with `-`"
	End With
	With .Items
		.AddBar .AddItem(),"Task",#1/1/2001#,#1/5/2001#,"K1"
		.AddBar .AddItem(),"Task",#1/2/2001#,#1/6/2001#,"K1"
	End With
	.EndUpdate 
End With
1643:
Is there a way to show the Start and End dates in dd-mm-yyyy format

With G2antt1
	.BeginUpdate 
	.MarkSearchColumn = False
	.Items.AllowCellValueToItemBar = True
	With .Chart
		.LevelCount = 2
		.FirstVisibleDate = #12/25/2000#
		.PaneWidth(False) = 196
	End With
	With .Columns.Add("Start")
		.Def(exCellValueToItemBarProperty) = 1
		.Def(exCellValueToItemBarKey) = "K1"
		.FormatColumn = "(1 array (0:=(shortdateF(value) split `/`))) + `-` + (0 array (=:0) ) + `-` + (2 array (=:0) )"
	End With
	With .Columns.Add("End")
		.Def(exCellValueToItemBarProperty) = 2
		.Def(exCellValueToItemBarKey) = "K1"
		.FormatColumn = "(1 array (0:=(shortdateF(value) split `/`))) + `-` + (0 array (=:0) ) + `-` + (2 array (=:0) )"
	End With
	With .Items
		.AddBar .AddItem(),"Task",#1/1/2001#,#1/5/2001#,"K1"
		.AddBar .AddItem(),"Task",#1/2/2001#,#1/6/2001#,"K1"
	End With
	.EndUpdate 
End With
1642:
If we have bars with dark color, we use white font/color. But if the bars are too small for the caption, you canít read it. What can we do

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #12/29/2000#
	.Chart.PaneWidth(False) = 48
	With .Chart.Bars.Item("Task")
		.Pattern = exPatternSolid
		.Height = 17
	End With
	With .Chart.Bars.Item("Progress")
		.Pattern = exPatternSolid
		.Height = 17
		.Shape = exShapeSolid
		.Color = RGB(0,0,255)
	End With
	With .Chart.Bars.Add("Task%Progress")
		.Pattern = exPatternSolid
		.Height = 17
		.Shortcut = "Percent"
	End With
	.DefaultItemHeight = 21
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/2/2001#,#1/5/2001#,""
		.ItemBar(h,"",exBarColor) = 4112616
		.ItemBar(h,"",exBarCaption) = "<fgcolor=FFFFFF><sha 0;;0>Pause"
		.AddBar h,"Task",#1/9/2001#,#1/12/2001#,"white"
		.ItemBar(h,"white",exBarColor) = 4112616
		.ItemBar(h,"white",exBarCaption) = "<fgcolor=FFFFFF>Pause"
		h = .AddItem("Task 2")
		.AddBar h,"Task",#1/3/2001#,#1/4/2001#,""
		.ItemBar(h,"",exBarColor) = 2017557
		.ItemBar(h,"",exBarCaption) = "<fgcolor=FFFFFF><sha 0;;0>Production"
		.AddBar h,"Task",#1/10/2001#,#1/11/2001#,"white"
		.ItemBar(h,"white",exBarColor) = 2017557
		.ItemBar(h,"white",exBarCaption) = "<fgcolor=FFFFFF>Production"
		h = .AddItem("Task 3")
		.AddBar h,"Percent",#1/3/2001#,#1/4/2001#,""
		.ItemBar(h,"",exBarPercent) = 0.5
		.ItemBar(h,"",exBarColor) = 2017557
		.ItemBar(h,"",exBarCaption) = "<fgcolor=FFFFFF><sha 0;;0>Pausing"
		.AddBar h,"Percent",#1/10/2001#,#1/11/2001#,"white"
		.ItemBar(h,"white",exBarPercent) = 0.5
		.ItemBar(h,"white",exBarColor) = 2017557
		.ItemBar(h,"white",exBarCaption) = "<fgcolor=FFFFFF>Pausing"
		h = .AddItem("Task 4")
		.AddBar h,"Task",#1/3/2001#,#1/4/2001#,""
		.ItemBar(h,"",exBarColor) = 8421504
		.ItemBar(h,"",exBarCaption) = "<fgcolor=FFFFFF><sha 0;;0>Planned downtime"
		.AddBar h,"Task",#1/10/2001#,#1/11/2001#,"white"
		.ItemBar(h,"white",exBarColor) = 8421504
		.ItemBar(h,"white",exBarCaption) = "<fgcolor=FFFFFF>Planned downtime"
	End With
	.EndUpdate 
End With
1641:
How do I programmatically exclude items from the filter

With G2antt1
	.BeginUpdate 
	.LinesAtRoot = exLinesAtRoot
	With .Columns.Add("Items")
		.DisplayFilterButton = True
		.DisplayFilterPattern = False
		.FilterList = FilterListEnum.exShowExclude Or FilterListEnum.exShowFocusItem Or FilterListEnum.exShowCheckBox
	End With
	With .Items
		.AddItem "Item 1"
		.AddItem "Item 2"
		.AddItem "Item 3"
		.AddItem "Item 4"
	End With
	With .Columns.Item(0)
		.FilterType = FilterTypeEnum.exFilterExclude Or FilterTypeEnum.exFilter
		.Filter = "Item 1|Item 4"
	End With
	.ApplyFilter 
	.EndUpdate 
End With
1640:
How do I show in histogram, more values for a single task

' BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
Private Sub G2antt1_BeforeExpandItem(ByVal Item As EXG2ANTTLibCtl.HITEM,Cancel As Variant)
	With G2antt1
		Cancel = True
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.SingleSel = True
	.ExpandOnDblClick = False
	With .Chart
		.LevelCount = 2
		.AllowLinkBars = False
		.DrawGridLines = exAllLines
		.FirstVisibleDate = #12/29/2000#
		.HistogramVisible = True
		.HistogramHeight = 167
		.PaneWidth(0) = 128
		.HistogramView = HistogramViewEnum.exHistogramNoGrouping Or HistogramViewEnum.exHistogramUnlockedItems
		With .Bars.Item("Task")
			.HistogramType = exHistCumulative
			.HistogramItems = 6
			.HistogramPattern = exPatternSolid
			.HistogramItems = -40000
			.HistogramCriticalValue = 100000
			.HistogramRulerLinesColor = RGB(128,128,128)
			.HistogramCumulativeColors = 3
		End With
		.ShowNonworkingDates = False
	End With
	.Columns.Add("Costs").Visible = False
	.Columns.Add("Tasks").Visible = True
	With .Items
		h = .AddItem("Estimated")
		.CellValue(h,1) = "Task 1"
		.AddBar h,"Task",#1/1/2001#,#1/10/2001#
		.ItemBar(h,"",exBarEffort) = 8000
		hR = .InsertItem(h,,"Actual")
		.AddBar hR,"Task",#1/1/2001#,#1/10/2001#
		.ItemBar(hR,"",exBarEffort) = 9000
		.GroupBars h,"",True,hR,"",True
		.GroupBars h,"",False,hR,"",False
		hR = .InsertItem(h,,"Cost")
		.AddBar hR,"Task",#1/1/2001#,#1/10/2001#
		.ItemBar(hR,"",exBarEffort) = 200
		.GroupBars h,"",True,hR,"",True
		.GroupBars h,"",False,hR,"",False
		h = .AddItem("Estimated")
		.CellValue(h,1) = "Task 2"
		.AddBar h,"Task",#1/9/2001#,#1/15/2001#
		.ItemBar(h,"",exBarEffort) = 7000
		hR = .InsertItem(h,,"Actual")
		.AddBar hR,"Task",#1/9/2001#,#1/15/2001#
		.ItemBar(hR,"",exBarEffort) = 8000
		.GroupBars h,"",True,hR,"",True
		.GroupBars h,"",False,hR,"",False
		hR = .InsertItem(h,,"Cost")
		.AddBar hR,"Task",#1/9/2001#,#1/15/2001#
		.ItemBar(hR,"",exBarEffort) = 150
		.GroupBars h,"",True,hR,"",True
		.GroupBars h,"",False,hR,"",False
	End With
	.EndUpdate 
End With
1639:
How can I align the caption of the bar

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Chart
		.FirstVisibleDate = #12/25/2000#
		.PaneWidth(False) = 48
	End With
	With .Items
		h = .AddItem("Task")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#,"K","exBarHAlignCaption = 0"
		.ItemBar(h,"K",exBarHAlignCaption) = 0
		h = .AddItem("Task")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#,"K","exBarHAlignCaption = 1"
		.ItemBar(h,"K",exBarHAlignCaption) = 1
		h = .AddItem("Task")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#,"K","exBarHAlignCaption = 2"
		.ItemBar(h,"K",exBarHAlignCaption) = 2
		h = .AddItem("Task")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#,"K","Clip 3"
		.ItemBar(h,"K",exBarHAlignCaption) = 3
		h = .AddItem("Task")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#,"K","Clip 4"
		.ItemBar(h,"K",exBarHAlignCaption) = 4
		h = .AddItem("Task")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#,"K","Clip 5"
		.ItemBar(h,"K",exBarHAlignCaption) = 5
		h = .AddItem("Task")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#,"K","Outside Left 16"
		.ItemBar(h,"K",exBarHAlignCaption) = 16
		h = .AddItem("Task")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#,"K","Outside Right 18"
		.ItemBar(h,"K",exBarHAlignCaption) = 18
		h = .AddItem("Task")
		.AddBar h,"Task",#1/2/2001#,#1/6/2001#,"K","Outside Center 17"
		.ItemBar(h,"K",exBarHAlignCaption) = 17
	End With
	.EndUpdate 
End With
1638:
How can I change the drop down filter background color

With G2antt1
	.BeginUpdate 
	.LinesAtRoot = exLinesAtRoot
	.Background(exBackColorFilter) = RGB(255,255,255)
	With .Columns.Add("Items")
		.DisplayFilterButton = True
		.DisplayFilterPattern = False
		.FilterList = FilterListEnum.exShowFocusItem Or FilterListEnum.exShowCheckBox Or FilterListEnum.exSortItemsAsc Or FilterListEnum.exLeafItems
	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"
		.InsertItem h,,"Child 3"
		.ExpandItem(h) = True
	End With
	.EndUpdate 
End With
1637:
How can I arrange the columns using CRD (eXCRD ) strings (Sample 2)

With G2antt1
	.BeginUpdate 
	.DrawGridLines = exAllLines
	.DefaultItemHeight = 36
	With .Columns
		With .Add("C1")
			.Def(exCellHasCheckBox) = True
			.Width = 18
			.AllowSizing = False
		End With
		With .Add("C2")
			.Def(exCellHasCheckBox) = True
			.Width = 18
		End With
		.Add("Column1").Visible = False
		.Add("Column2").Visible = False
		.Add("Column3").Visible = False
		With .Add("FormatLevel")
			.FormatLevel = "18;""Info""[a=17]/(2/3,4)"
			.Def(exCellFormatLevel) = "2/3,4"
		End With
	End With
	With .Chart
		.DrawGridLines = exAllLines
		.FirstVisibleDate = #6/22/2014#
	End With
	With .Items
		h = .AddItem("Cell 1.1")
		.CellValue(h,1) = "Cell 1.2"
		.CellValue(h,2) = "Cell 1.3"
		.AddBar h,"Task",#6/23/2014#,#6/25/2014#
		h = .AddItem("Cell 2.1")
		.CellValue(h,1) = "Cell 2.2"
		.CellValue(h,2) = "Cell 2.3"
		.AddBar h,"Task",#6/26/2014#,#6/28/2014#
	End With
	.EndUpdate 
End With
1636:
How can I arrange the columns using CRD (eXCRD ) strings (Sample 1)

With G2antt1
	.BeginUpdate 
	.DrawGridLines = exAllLines
	.DefaultItemHeight = 36
	With .Columns
		.Add("Column1").Visible = False
		.Add("Column2").Visible = False
		.Add("Column3").Visible = False
		With .Add("FormatLevel")
			.FormatLevel = "(0/1),2"
			.Def(exCellFormatLevel) = .FormatLevel
		End With
	End With
	With .Chart
		.DrawGridLines = exAllLines
		.FirstVisibleDate = #6/22/2014#
	End With
	With .Items
		h = .AddItem("Cell 1.1")
		.CellValue(h,1) = "Cell 1.2"
		.CellValue(h,2) = "Cell 1.3"
		.AddBar h,"Task",#6/23/2014#,#6/25/2014#
		h = .AddItem("Cell 2.1")
		.CellValue(h,1) = "Cell 2.2"
		.CellValue(h,2) = "Cell 2.3"
		.AddBar h,"Task",#6/26/2014#,#6/28/2014#
	End With
	.EndUpdate 
End With
1635:
How do I display the histogram for filtered items only
With G2antt1
	.BeginUpdate 
	.SingleSel = False
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.LevelCount = 2
		.HistogramVisible = True
		.HistogramHeight = 32
		.HistogramView = exHistogramFilteredItems
		.Bars.Item("Task").HistogramPattern = exPatternBDiagonal
	End With
	With .Columns.Add("Column")
		.DisplayFilterButton = True
		.Filter = "Item 1"
		.FilterType = exFilter
	End With
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .AddItem("Item 2"),"Task",#1/3/2001#,#1/7/2001#
	End With
	.ApplyFilter 
	.EndUpdate 
End With
1634:
How can I use no scroll bars for touch-screens

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

' MouseMove event - Occurs when the user moves the mouse.
Private Sub G2antt1_MouseMove(Button As Integer,Shift As Integer,X As Single,Y As Single)
	With G2antt1
		.ShowToolTip "<font ;6><sha ;;0><off -4>Tip</off></sha></font> If the cursor hovers bars, click and wait for a second to start scrolling."
	End With
End Sub

With G2antt1
	.BeginUpdate 
	With .Chart
		.AllowCreateBar = exNoCreateBar
		.FirstVisibleDate = #8/3/1994#
		.PaneWidth(False) = 256
		.LevelCount = 2
		.UnitScale = exDay
		.FirstWeekDay = exMonday
		.OverviewVisible = exOverviewShowAllVisible
	End With
	.ColumnAutoResize = False
	.ContinueColumnScroll = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb",3,3
	End With
	.DataSource = rs
	.AutoDrag = exAutoDragScroll
	.ScrollWidth = 4
	.ScrollHeight = 4
	.Background(exHSLeft) = RGB(192,192,192)
	.Background(exHSRight) = RGB(192,192,192)
	.Background(exHSBack) = RGB(224,224,224)
	.Background(exHSThumb) = RGB(128,128,128)
	.Background(exVSBack) = RGB(224,224,224)
	.Background(exVSDown) = RGB(192,192,192)
	.Background(exVSThumb) = RGB(128,128,128)
	.Background(exVSUp) = RGB(192,192,192)
	.ScrollButtonWidth = 0
	.ScrollButtonHeight = 0
	.EndUpdate 
End With
1633:
How can I display values in the histogram legend

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	With .Columns.Add("Effort")
		.Def(exCellValueToItemBarProperty) = 21
		.Editor.EditType = SpinType
	End With
	With .Chart
		.LevelCount = 2
		.NonworkingDays = 0
		.PaneWidth(False) = 96
		.FirstVisibleDate = #6/20/2005#
		.HistogramVisible = True
		.HistogramHeight = 128
		.HistogramView = exHistogramAllItems
		With .Bars.Item("Task")
			.HistogramPattern = .Pattern
			.HistogramType = exHistOverload
			.HistogramCriticalValue = 3
			.HistogramItems = -7
			.HistogramGridLinesColor = RGB(192,192,192)
			.HistogramRulerLinesColor = RGB(0,0,1)
		End With
	End With
	With .Items
		.AllowCellValueToItemBar = True
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task",#6/21/2005#,#6/23/2005#
		.CellValue(h1,1) = 4
		h1 = .AddItem("Task 2")
		.AddBar h1,"Task",#6/24/2005#,#6/26/2005#
		.CellValue(h1,1) = 3
		h1 = .AddItem("Task 3")
		.AddBar h1,"Task",#6/27/2005#,#6/29/2005#
		.CellValue(h1,1) = 2
		h1 = .AddItem("Task 4")
		.AddBar h1,"Task",#6/30/2005#,#7/2/2005#
		.CellValue(h1,1) = 1
	End With
	.EndUpdate 
End With
1632:
I am using AllowGroupBy property and calling the Column.SortOrder property groups by that column. Is it possible to prevent that, so I have a similar behavior like I click the column's header rather than dragging it to the control's GroupBy bar

With G2antt1
	With .Columns
		.Add "First"
		.Add "Second"
		.Add "Third"
	End With
	.SortBarVisible = True
	.SingleSort = False
	.AllowGroupBy = True
	.Layout = "SingleSort = ""C0:1"";MultipleSort = ""C1:2 C2:1"""
End With
1631:
Calling programatically the Column.SortOrder property adds the column to the sort bar. Is it possible to prevent that, so I have a similar behavior like I click the column's header rather than dragging it to the control's Sort bar
With G2antt1
	With .Columns
		.Add "First"
		.Add "Second"
		.Add "Third"
	End With
	.SortBarVisible = True
	.SingleSort = False
	.Layout = "SingleSort = ""C0:1"""
End With
1630:
How can I specify different working parts for different items

With G2antt1
	.BeginUpdate 
	With .Columns
		.Add "Tasks"
		With .Add("Working")
			.Def(exCellValueToItemBarProperty) = 258
			.Def(exCellValueToItemBarKey) = "A"
			.FormatColumn = "(0:=round(value*24)) != 0 ? =:0 : ''"
		End With
		With .Add("NonWorking")
			.Def(exCellValueToItemBarProperty) = 259
			.Def(exCellValueToItemBarKey) = "A"
			.FormatColumn = "(0:=round(value*24)) != 0 ? =:0 : ''"
		End With
	End With
	With .Chart
		.PaneWidth(0) = 78
		.AllowCreateBar = exCreateBarAuto
		.FirstVisibleDate = #6/20/2005#
		.DrawLevelSeparator = exLevelNoLine
		.LevelCount = 3
		.Level(1).DrawGridLines = False
		.AllowInsideZoom = True
		.DrawDateTicker = True
		.DateTickerLabel = "<%mmm%> <%d%><br><b><%hh%>:<%nn%></b>"
		.MarkSelectDateColor = &H7ffff8ee
		With .DefaultInsideZoomFormat
			.OwnerLabel = "<%mmm%> <%d%>"
			.BackColor = RGB(238,248,255)
			.BackColorChart = .BackColor
			.InsideCount = 4
			.InsideLabel = "<b><%hh%></b>"
		End With
		.InsideZooms.Add #6/22/2005#
		.DrawGridLines = exVLines
		.Bars.Item("Split").Color = RGB(255,0,0)
		With .Bars.Add("Task:Split")
			.Color = RGB(255,0,0)
			.Pattern = exPatternBDiagonal
			.Shortcut = "Task"
		End With
	End With
	With .Items
		.AllowCellValueToItemBar = True
		h1 = .AddItem("Task 1")
		.AddBar h1,"Task",#6/22/2005 8:00:00 AM#,#6/28/2005#,"A"
		.ItemBar(h1,"A",exBarKeepWorkingCount) = True
		.ItemNonworkingUnits(h1,False) = "weekday(value) in (1,2)"
		.ItemNonworkingUnits(h1,True) = "weekday(value) in (1,2) or (hour(value)<8 or hour(value)>=16 )"
		h2 = .AddItem("Task 1")
		.AddBar h2,"Task",#6/22/2005 4:00:00 AM#,#6/29/2005 0:00:00 PM#,"A"
		.ItemBar(h2,"A",exBarKeepWorkingCount) = True
		.ItemNonworkingUnits(h2,False) = "weekday(value) in (1,2)"
		.ItemNonworkingUnits(h2,True) = "weekday(value) in (1, 2) or (hour(value)<4 or hour(value)>=12 )"
	End With
	.EndUpdate 
End With
1629:
How can I define the default bar's foreground color

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	With .Chart
		.FirstVisibleDate = #1/1/2001#
		.PaneWidth(False) = 48
		With .Bars.Item("Task")
			.Height = 15
			.Pattern = exPatternSolid
			.Def(exBarForeColor) = 16777215
		End With
	End With
	With .Items
		.AddBar .AddItem("Task 1"),"Task",#1/2/2001#,#1/6/2001#,"K1","bar A"
		.AddBar .AddItem("Task 2"),"Task",#1/2/2001#,#1/6/2001#,"K2","bar B"
		.AddBar .AddItem("Task 3"),"Task",#1/2/2001#,#1/6/2001#,"K3","bar C"
	End With
	.EndUpdate 
End With
1628:
How can I print the selected items only

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.SingleSel = False
	.ColumnAutoResize = False
	.ContinueColumnScroll = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb",3,3
	End With
	.DataSource = rs
	.Chart.FirstVisibleDate = #8/4/1994#
	With .Items
		.SelectItem(.ItemByIndex(0)) = True
		.SelectItem(.ItemByIndex(2)) = True
		.SelectItem(.ItemByIndex(4)) = True
	End With
	.EndUpdate 
	With CreateObject("Exontrol.Print")
		.Options = "Print = Selection"
		.PrintExt = G2antt1.Object
		.Preview 
	End With
End With
1627:
How can I sort the columns to be displayed on the columns floating bar
With G2antt1
	.ColumnAutoResize = False
	With .Columns
		.Add("City").Visible = False
		.Add("Start").Visible = False
		.Add("End").Visible = False
	End With
	.ColumnsFloatBarVisible = exColumnsFloatBarVisibleIncludeHiddenColumns
	.ColumnsFloatBarSortOrder = SortAscending
End With
1626:
How can I add a vertical padding for my cells
With G2antt1
	.BeginUpdate 
	.DrawGridLines = exAllLines
	With .Columns.Add("Padding")
		.Def(exCellHasCheckBox) = True
		.Def(exCellSingleLine) = False
		.Def(exCellPaddingLeft) = 6
		.Def(exCellPaddingRight) = 6
		.Def(exCellPaddingTop) = 6
		.Def(exCellPaddingBottom) = 6
	End With
	With .Items
		.AddItem "padding"
		.AddItem "padding"
	End With
	.EndUpdate 
End With
1625:
Trying to fill the second columns. How can I do that
With G2antt1
	.BeginUpdate 
	With .Columns
		.Add "Column 1"
		.Add "Column 2"
		.Add "Column 3"
	End With
	With .Items
		h = .AddItem("SubItem 1.1")
		.CellValue(h,1) = "SubItem 1.2"
		.CellValue(h,2) = "SubItem 1.3"
		h = .AddItem("SubItem 2.1")
		.CellValue(h,1) = "SubItem 2.2"
		.CellValue(h,2) = "SubItem 2.3"
	End With
	.EndUpdate 
End With
1624:
How can I specify a different background color for item, in chart or list panels

With G2antt1
	.Columns.Add "Default"
	With .Items
		h = .AddItem("Root")
		hC = .InsertItem(h,,"Child 1")
		.ItemBackColor(hC) = RGB(255,0,0)
		G2antt1.Chart.ItemBackColor(hC) = RGB(0,255,0)
		.InsertItem h,,"Child 2"
		.ExpandItem(h) = True
	End With
End With
1623:
Is it possible to specify a status part for each bar

With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 64
	.Debug = True
	.VisualAppearance.Add 1,"gBFLBCJwBAEHhEJAAChABL8IQAAYAQGKIaBwAKBQAGaAoDDQNgyQwAAxwdBMKgBBCLIxhEYobgmGIaRjHcQjEKoSxHEqIRpGCRoJiqLIZAJIEZRZAcaQvGSQYRASCRN" & _
"DEOA0TDAY4jPD4aQiGIbRjjeL5YjiNo2UxTNRQCEB"
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"A"
		.AddBar h,"Task",#1/5/2001#,#1/7/2001#,"B1"
		.AddBar h,"Task",#1/8/2001#,#1/17/2001#,"B2"
		.AddBar .AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K3"
		.AddBar .AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"K4"
		.ItemBar(0,"<*>",exBarColor) = 255
		.ItemBar(0,"<*>",exBarFrameColor) = 16777216
	End With
	.EndUpdate 
End With
1622:
How can I change the the focus rectangle

With G2antt1
	.BeginUpdate 
	.VisualAppearance.Add 1,"E:\Exontrol\ExG2antt\sample\EBN\hoverinsert.ebn"
	.Background(exShowFocusRect) = &H1000000
	With .Columns.Add("Check")
		.Def(exCellPaddingLeft) = 2
		.Def(exCellHasCheckBox) = True
	End With
	.SelForeColor = .ForeColor
	.SelBackColor = .BackColor
	.DefaultItemHeight = 22
	.ShowFocusRect = True
	With .Items
		.AddItem ""
		.AddItem ""
	End With
	.EndUpdate 
End With
1621:
Can each cell have their own dropdown lists that contain "different list item values" for each cell, not predefined for the entire column
With G2antt1
	.BeginUpdate 
	With .Columns.Add("Column/Cell-Same").Editor
		.EditType = DropDownListType
		.AddItem 0,"Zero"
		.AddItem 1,"One"
		.AddItem 2,"Two"
	End With
	With .Columns.Add("Column/Cell-Different").Editor
		.EditType = EditType
	End With
	With .Items
		.AddItem 
		h = .AddItem(0)
		With .CellEditor(h,1)
			.EditType = DropDownListType
			.AddItem 3,"Three"
			.AddItem 4,"Four"
		End With
		.CellValue(h,1) = 3
		.AddItem 
		h = .AddItem(0)
		With .CellEditor(h,1)
			.EditType = CheckListType
			.AddItem 1,"Single"
			.AddItem 2,"Double"
		End With
		.CellValue(h,1) = 3
	End With
	.EndUpdate 
End With
1620:
How can I specify just a few fonts in a FontType editor
With G2antt1
	.BeginUpdate 
	.DefaultItemHeight = 22
	.DrawGridLines = exRowLines
	With .Columns.Add("Fonts").Editor
		.EditType = FontType
		.ClearItems 
		.AddItem 0,"Calibri"
		.AddItem 1,"Arial"
		.AddItem 2,"Rockwell"
		.AddItem 3,"Tahoma"
		.SortItems True
		.DropDownRows = 4
	End With
	With .Items
		.AddItem "Tahoma"
	End With
	.EndUpdate 
End With
1619:
How can I show only the working-hours in chart and histogram panels

With G2antt1
	.BeginUpdate 
	.Columns.Add "Tasks"
	.DrawGridLines = exAllLines
	With .Chart
		.PaneWidth(0) = 40
		.FirstVisibleDate = #6/20/2005#
		.HistogramVisible = True
		.HistogramHeight = 64
		.HistogramView = exHistogramAllItems
		.LevelCount = 3
		.NonworkingHours = 16253183
		With .Bars.Item("Task")
			.HistogramType = exHistOverAllocation
			.HistogramPattern = .Pattern
		End With
		.ShowNonworkingDates = False
		.ShowNonworkingUnits = False
		.DrawGridLines = exAllLines
		.UnitScale = exHour
		.UnitWidth = 4
		.ResizeUnitScale = .UnitScale
	End With
	With .Items
		h = .AddItem("Task A")
		.AddBar h,"Task",#6/23/2005 11:00:00 AM#,#6/23/2005 0:00:00 PM#
		.ItemBar(h,"",exBarEffort) = "0.0416666"
		.ItemBar(h,"",exBarKeepWorkingCount) = True
		h = .AddItem("Task B")
		.AddBar h,"Task",#6/23/2005 0:00:00 PM#,#6/23/2005 4:00:00 PM#
		.ItemBar(h,"",exBarEffort) = "0.0416666"
		.ItemBar(h,"",exBarKeepWorkingCount) = True
	End With
	.EndUpdate 
End With
1618:
How do you embed HTML options into the anchor click string
' AnchorClick event - Occurs when an anchor element is clicked.
Private Sub G2antt1_AnchorClick(ByVal AnchorID As String,ByVal Options As String)
	With G2antt1
		Debug.Print( AnchorID )
		Debug.Print( Options )
	End With
End Sub

With G2antt1
	.BeginUpdate 
	With .Columns
		.Add("Car").Def(exCellValueFormat) = 1
	End With
	With .Items
		.AddItem "<a mazda_1;options for 1>Mazda <b>1</b></a>"
		.AddItem "<a mazda_2;options for 2>Mazda <b>2</b></a>"
		.AddItem "<a mazda_3;options for 3a>Mazda <b>3.a</b></a>"
		.AddItem "<a mazda_3;options for 3b>Mazda <b>3.b</b></a>"
	End With
	.EndUpdate 
End With
1617:
How do I add a checkbox column (method 2)

' CellStateChanged event - Fired after cell's state has been changed.
Private Sub G2antt1_CellStateChanged(ByVal Item As EXG2ANTTLibCtl.HITEM,ByVal ColIndex As Long)
	With G2antt1
		Debug.Print( "CheckBox Changed:" )
		Debug.Print( .Items.CellState(Item,ColIndex) )
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.Columns.Add("Check").Def(exCellHasCheckBox) = True
	With .Items
		.CellState(.AddItem("Check 1"),0) = 0
		.CellState(.AddItem("Check 2"),0) = 1
		.CellState(.AddItem("Check 3"),0) = 0
		.CellState(.AddItem("Check 4"),0) = 1
	End With
	.EndUpdate 
End With
1616:
How do I add a checkbox column (method 1)

' Change event - Occurs when the user changes the cell's content.
Private Sub G2antt1_Change(ByVal Item As EXG2ANTTLibCtl.HITEM,ByVal ColIndex As Long,NewValue As Variant)
	With G2antt1
		Debug.Print( "CheckBox Changed:" )
		Debug.Print( NewValue )
	End With
End Sub

With G2antt1
	.BeginUpdate 
	With .Columns.Add("Check")
		With .Editor
			.EditType = CheckValueType
			.Option(exCheckValue2) = 1
		End With
	End With
	With .Items
		.AddItem 0
		.AddItem 1
		.AddItem 0
		.AddItem 1
	End With
	.EndUpdate 
End With
1615:
How do I change the progress bar's appearance

With G2antt1
	With .VisualAppearance
		.Add 1,"c:\exontrol\images\normal.ebn"
		.Add 2,"c:\exontrol\images\pushed.ebn"
	End With
	Set var_Editor = .Columns.Add("Progress").Editor
	With var_Editor
		.EditType = ProgressBarType
		.Option(exProgressBarBackColor) = 16777216
		.Option(exProgressBarMarkTicker) = 33554432
	End With
	.Items.AddItem 33
End With
1614:
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 3)

With G2antt1
	.BeginUpdate 
	.VisualAppearance.Add 1,"gBFLBCJwBAEHhEJAEGg4BVEIQAAYAQGKIYBkAKBQAGaAoDDMOQwQwAAxjGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQCWIAzATGYBRfIUEgjBM6ExwG78e" & _
"gBHp/ZpkACIJJAaRjHQdJxGKKMQB9DIhCZpeKhWgkKIJBzOEyBRC4ERBGqNGrsIgLEqWZpnWhaNpWXYTLyBN64LhuK46g53O6wLxvK6hEr2dJ/YBcIAOfghf4NQ7EMRx" & _
"LC8Mw3BDvYDkOAABAIgI="
	.SelBackColor = &H1fffffe
	.SelForeColor = RGB(0,0,0)
	.SelBackColor = &H1000000
	.ShowFocusRect = False
	.Columns.Add "Items"
	.DefaultItemHeight = 22
	With .Items
		.ItemBackColor(.AddItem("red")) = RGB(255,0,0)
		.ItemBackColor(.AddItem("blue")) = RGB(0,0,255)
		.ItemBackColor(.AddItem("green")) = RGB(0,255,0)
	End With
	.EndUpdate 
End With
1613:
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 2)

With G2antt1
	.BeginUpdate 
	.SelBackMode = exTransparent
	.DefaultItemHeight = 22
	.ShowFocusRect = False
	.Columns.Add "Items"
	With .Items
		.ItemBackColor(.AddItem("red")) = RGB(255,0,0)
		.ItemBackColor(.AddItem("blue")) = RGB(0,0,255)
		.ItemBackColor(.AddItem("green")) = RGB(0,255,0)
	End With
	.EndUpdate 
End With
1612:
I have the rows with different background color, and when I select the item it takes the color of the SelBackColor, and therefore is no longer visible behind the color. Is there any option to make the item's color being visible (method 1)

With G2antt1
	.BeginUpdate 
	.SelBackColor = .BackColor
	.SelForeColor = .ForeColor
	.DefaultItemHeight = 22
	.ShowFocusRect = True
	.Columns.Add "Items"
	With .Items
		.ItemBackColor(.AddItem("red")) = RGB(255,0,0)
		.ItemBackColor(.AddItem("blue")) = RGB(0,0,255)
		.ItemBackColor(.AddItem("green")) = RGB(0,255,0)
	End With
	.EndUpdate 
End With
1611:
The BeforeExpandItem event is fired when clicking the drop down filter button. What we can do to prevent that

' BeforeExpandItem event - Fired before an item is about to be expanded (collapsed).
Private Sub G2antt1_BeforeExpandItem(ByVal Item As EXG2ANTTLibCtl.HITEM,Cancel As Variant)
	With G2antt1
		Debug.Print( "BeforeExpandItem" )
		Debug.Print( Item )
		.Items.InsertItem Item,,"new child"
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.LinesAtRoot = exLinesAtRoot
	With .Columns
		With .Add("Items")
			.DisplayFilterButton = True
			.FilterList = exRootItems
		End With
	End With
	With .Items
		.ItemHasChildren(.InsertItem(,,"Group 1")) = True
		.ItemHasChildren(.InsertItem(,,"Group 2")) = True
	End With
	.EndUpdate 
End With
1610:
How can identify when I clicked Hour, Month, or Year of the time-scale overview

' OverviewZoom event - Occurs once the user selects a new time scale unit in the overview zoom area.
Private Sub G2antt1_OverviewZoom()
	With G2antt1
		Debug.Print( "UnitScale: " )
		Debug.Print( .Chart.UnitScale )
	End With
End Sub

With G2antt1
	With .Chart
		.PaneWidth(False) = 128
		.LevelCount = 2
		.OverviewVisible = exOverviewShowAllVisible
		.AllowOverviewZoom = exAlwaysZoom
	End With
End With
1609:
How can define a minimum and maximum in a column SpinType
With G2antt1
	With .Columns
		With .Add("SpinType between 5 and 150").Editor
			.EditType = SliderType
			.Numeric = exInteger
			.Option(exSliderWidth) = 0
			.Option(exSliderMin) = 5
			.Option(exSliderMax) = 150
		End With
	End With
	.Items.AddItem 50
End With
1608:
How I can change the title of the time-scale overview. (Example: Month by 'Mes', Day by 'Dia')

With G2antt1
	With .Chart
		.PaneWidth(False) = 128
		.LevelCount = 2
		.OverviewVisible = exOverviewShowAllVisible
		.AllowOverviewZoom = exAlwaysZoom
		.OverviewZoomCaption = "AŮo|||Mes|||Dia|||"
		.Label(exHalfYear) = ""
		.Label(exQuarterYear) = ""
		.Label(exThirdMonth) = ""
		.Label(exWeek) = ""
		.Label(exHour) = ""
		.Label(exMinute) = ""
		.Label(exSecond) = ""
	End With
End With
1607:
Is it possible to set a fixed wide for the Items List Arrea, so that when changing the Form.width, the Items List Arrea be constant and therefor changing the Chart Area-wide
With G2antt1
	.OnResizeControl = exResizeChart
End With
1606:
How can I clear the colors for all bars at once
With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 64
	.Debug = True
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"A"
		.ItemBar(h,"A",exBarColor) = 65280
		.AddBar h,"Task",#1/5/2001#,#1/7/2001#,"B1"
		.AddBar h,"Task",#1/8/2001#,#1/17/2001#,"B2"
		.AddBar .AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K3"
		.AddBar .AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"K4"
		.ItemBar(0,"<*>",exBarColor) = 0
	End With
	.EndUpdate 
End With
1605:
How can I change the colors for all bars at once
With G2antt1
	.BeginUpdate 
	.Columns.Add "Task"
	.Chart.FirstVisibleDate = #1/1/2001#
	.Chart.PaneWidth(False) = 64
	.Debug = True
	With .Items
		h = .AddItem("Task 1")
		.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"A"
		.AddBar h,"Task",#1/5/2001#,#1/7/2001#,"B1"
		.AddBar h,"Task",#1/8/2001#,#1/17/2001#,"B2"
		.AddBar .AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"K3"
		.AddBar .AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"K4"
		.ItemBar(0,"<*>",exBarColor) = 255
	End With
	.EndUpdate 
End With
1604:
How can I show my custom bars in the histogram (method 3)

With G2antt1
	.BeginUpdate 
	With .Chart
		.LevelCount = 2
		.AllowLinkBars = False
		.DrawGridLines = exAllLines
		.FirstVisibleDate = #12/31/2000#
		.HistogramVisible = True
		.HistogramHeight = 64
		.PaneWidth(False) = 128
		With .Bars.Item("Task")
			.HistogramType = exHistCumulative
			.HistogramItems = 6
			.HistogramPattern = .Pattern
			.HistogramCumulativeOriginalColorBars = exKeepOriginalColor
			.OverlaidType = exOverlaidBarsOffset
		End With
	End With
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .AddItem("Item 2"),"Task",#1/3/2001#,#1/7/2001#
		h = .AddItem("Item 3")
		.AddBar h,"Task",#1/8/2001#,#1/12/2001#
		.ItemBar(h,"",exBarColor) = 255
	End With
	.EndUpdate 
End With
1603:
How can I show my custom bars in the histogram (method 2)

With G2antt1
	.BeginUpdate 
	With .Chart
		.PaneWidth(False) = 64
		.FirstVisibleDate = #1/1/2001#
		.HistogramVisible = True
		.HistogramHeight = 32
		.Bars.Item("Task").HistogramPattern = exPatternBDiagonal
	End With
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .AddItem("Item 2"),"Task",#1/3/2001#,#1/7/2001#
		h = .AddItem("Item 3")
		.AddBar h,"Task",#1/8/2001#,#1/12/2001#
		.ItemBar(h,"",exBarColor) = 255
	End With
	.EndUpdate 
End With
1602:
How can I show my custom bars in the histogram (method 1)
With G2antt1
	.BeginUpdate 
	With .Chart
		.PaneWidth(False) = 64
		.FirstVisibleDate = #1/1/2001#
		.HistogramVisible = True
		.HistogramHeight = 32
		.Bars.Item("Task").HistogramPattern = exPatternBDiagonal
		With .Bars.Copy("Task","MyBar")
			.HistogramPattern = exPatternFDiagonal
			.Color = RGB(255,0,0)
			.HistogramColor = .Color
		End With
	End With
	.Columns.Add "Column"
	With .Items
		.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/4/2001#
		.AddBar .AddItem("Item 2"),"Task",#1/3/2001#,#1/7/2001#
		.AddBar .AddItem("Item 3"),"MyBar",#1/8/2001#,#1/12/2001#
	End With
	.EndUpdate 
End With
1601:
Do you have any Fit-To-Page options when printing the control

' AddItem event - Occurs after a new Item has been inserted to Items collection.
Private Sub G2antt1_AddItem(ByVal Item As EXG2ANTTLibCtl.HITEM)
	With G2antt1
		With .Items
			.AddBar Item,"Task",.CellValue(Item,2),.CellValue(Item,4)
		End With
	End With
End Sub

With G2antt1
	.BeginUpdate 
	.ColumnAutoResize = False
	.ContinueColumnScroll = False
	Set rs = CreateObject("ADOR.Recordset")
	With rs
		.Open "Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access2007\sample.accdb",3,3
	End With
	.DataSource = rs
	.Chart.FirstVisibleDate = #8/4/1994#
	.EndUpdate 
	With CreateObject("Exontrol.Print")
		.Options = "FitToPage = On"
		.PrintExt = G2antt1.Object
		.Preview 
	End With
End With