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

with thisform.G2antt1
	.BeginUpdate
	var_s = "gBFLBCJwBAEHhEJAAEhABVADg6AADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSBcEgTDaMYzgMBYJhEMQyDSAUIjPEyMg0DjIIwgJIUaw0GSXIRkGQZCh"
	var_s = var_s + "GJooTJQMrTZIEbQxHSkIyRVTmZACS5NRZPYy0FAkQhlFSbJBCOKwVomR5KUxTVg1DJwahLCKULLhGI7KgObIRSJOcZ1XAdCQ0cB0XpAC6LaqSA4nSjKcqwJKEZRJIyjJ"
	var_s = var_s + "wgSrrWhePoJYBVAAQPQdDYaCivK5uWK6PqKUIlZBQGQVNS1MRrLSEcwgPKgAyzDadZzfQAWTZFTQjN61RgtXR6eyoAJ0aziFDVFo0WRlEwacorGhcbgPPrCRrxGBVNwg"
	var_s = var_s + "GOJo4kIeASB0Zw/iGDoym6dobh2XpiDWJo5HMd56h6dxjlICIEhQDQmDOIZUmQZZlAADpYHIEQ3nUGgNhCEIhAkawamAAAYEWRAGB2bA2EqYg2AyA4glgPgSgQYRIEIF"
	var_s = var_s + "oEmEeBWBiBphFAAgPDwDgDEycQ4A0Q5IwkDwjgyWA8k4SIsmUNoPEOFJbD0DhjHINA3E8Q4eDiDojhiYJmg+Ixokic4LmKQxiCkNk2CCX4DmGaA0nAN4NBiDJSDwTgTE"
	var_s = var_s + "ycg4E0WIYlcPJiiiMJZhCTYpgCcw5g2OYOGWGQmCkEJkheYopGoVw1GSGQuA2ExIlOQJcDOZJzEDSJNBiAgiU4Q5GCeChNHkHJygsaBzGaCYimiCY0mMNZoCMWhUDUJ5"
	var_s = var_s + "pkYTIDk6YxwkwO5NlMOoch6JQJm4U4JCIMxWFSKbCBoKIgmJDAuDgKhohKIoTk0GhaHOJgNiMKJuDaaYzHCTYnAyaZmjSKIiDiCghjEYg6AaR4yk0OpOiFSQLAKNgjGc"
	var_s = var_s + "Q40lkMhOmqZo7DKTpzG6Pw3CmYx2HiNAsCqBh8h6Z5bh6T4oC0G4Im+OAtlMNpTjUTYDCKVo2C3QBLi6a5bH6YY4EyehzAGO4wEwDoejwK5rnK95vDgPJsDWTBjjSWAx"
	var_s = var_s + "nEK5aleNhriuawKi8Lp7H8HpHHGXBskyQpxguXwNgMTpDFiRZDnEExfBSPRvHuXwYkycYslae5NjMQwrDGNZxFyHINDsDRTBMKZKnKLIwm2S4xF0Jw8lKTIcm9eA0hyQ"
	var_s = var_s + "wuksM5jiyVQwnQDQIlaVo0EyLwQlGcRNCME5EjKfYXGSWEhDMQ5QnOahHG6KwoFOCoFiOaBNlcdIjiQag7HOL0dwuxKC1aeNQI4BQihNDoEwXowxmh8CIL8Yg8ROBfAS"
	var_s = var_s + "McaIOR6CHBkMgLgrwUjLHkHMG4NQaBzE4MQaIyw5gxEsH0Dw9FBBNA6PUDoLwpjTHqF0N4WQShSHgGwcY2RkhdFCL8bYdwOivDqNse4fRnh5G+PYEgaR1B0E4B4D4ixx"
	var_s = var_s + "B4G8E8SI5R8D+DeJUc4eRPB/EaJ8DwpwojDHUPofwtxYjtH2F4d4sx3j7E+AcXo8B9geFCNYOIHhfg/GmPQPoXw3jZHuPoX4hxuj1H8J8T43RPhDEgM8eo/B/iQGuPwf"
	var_s = var_s + "xEh1guAIAwQAgCAg"
	.VisualAppearance.Add(1,var_s)
	.BackColorLevelHeader = .BackColor
	with .Chart
		.LevelCount = 2
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 48
		.OverviewVisible = 31746 && 0x400 Or OverviewVisibleEnum.exOverviewShowSelMargins Or OverviewVisibleEnum.exOverviewShowMargins Or OverviewVisibleEnum.exOverviewShowDateTimeScaleBottom Or OverviewVisibleEnum.exOverviewShowAllVisible
		.OverviewHeight = 64
		.OverviewSelBackColor = 0x1000000
		.OverviewBackColor = RGB(250,250,250)
	endwith
	.Columns.Add("Column")
	with .Items
		.AddBar(.AddItem("Item 1"),"Task",{^2001-1-2},{^2001-1-11})
		.AddBar(.AddItem("Item 2"),"Task",{^2001-2-2},{^2001-2-11})
		.AddBar(.AddItem("Item 3"),"Task",{^2001-3-2},{^2001-3-11})
	endwith
	.EndUpdate
endwith
1808:
Is it possible to display a time-scale for the overview part of the control (separated)

with thisform.G2antt1
	.BeginUpdate
	.BackColorLevelHeader = .BackColor
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 48
		.OverviewVisible = 5122 && OverviewVisibleEnum.exOverviewShowDateTimeScaleSplit Or OverviewVisibleEnum.exOverviewShowAllVisible
		.OverviewHeight = 48
		.LevelCount = 2
	endwith
	.Columns.Add("Column")
	with .Items
		.AddBar(.AddItem("Item 1"),"Task",{^2001-1-2},{^2001-1-11})
		.AddBar(.AddItem("Item 2"),"Task",{^2001-2-2},{^2001-2-11})
		.AddBar(.AddItem("Item 3"),"Task",{^2001-3-2},{^2001-3-11})
	endwith
	.EndUpdate
endwith
1807:
Is it possible to display a time-scale for the overview part of the control

with thisform.G2antt1
	.BeginUpdate
	.BackColorLevelHeader = .BackColor
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 48
		.OverviewVisible = 4098 && OverviewVisibleEnum.exOverviewShowDateTimeScale Or OverviewVisibleEnum.exOverviewShowAllVisible
		.LevelCount = 2
	endwith
	.Columns.Add("Column")
	with .Items
		.AddBar(.AddItem("Item 1"),"Task",{^2001-1-2},{^2001-1-11})
		.AddBar(.AddItem("Item 2"),"Task",{^2001-2-2},{^2001-2-11})
		.AddBar(.AddItem("Item 3"),"Task",{^2001-3-2},{^2001-3-11})
	endwith
	.EndUpdate
endwith
1806:
How can I display the time-scale only, in the overview part of the control

with thisform.G2antt1
	.BeginUpdate
	.BackColorLevelHeader = .BackColor
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 48
		.OverviewVisible = 4610 && OverviewVisibleEnum.exOverviewShowDateTimeScale Or OverviewVisibleEnum.exOverviewHideBars Or OverviewVisibleEnum.exOverviewShowAllVisible
		.LevelCount = 2
	endwith
	.Columns.Add("Column")
	with .Items
		.AddBar(.AddItem("Item 1"),"Task",{^2001-1-2},{^2001-1-11})
		.AddBar(.AddItem("Item 2"),"Task",{^2001-2-2},{^2001-2-11})
		.AddBar(.AddItem("Item 3"),"Task",{^2001-3-2},{^2001-3-11})
	endwith
	.EndUpdate
endwith
1805:
How can I detect that the mouse pointer is within an InsideZoom object
*** MouseMove event - Occurs when the user moves the mouse. ***
LPARAMETERS Button,Shift,X,Y
	with thisform.G2antt1
		with .Chart
			d = .DateFromPoint(-1,-1)
			iz = .InsideZooms.Contains(d)
			DEBUGOUT( d )
			DEBUGOUT( "If the iz object is nothing, the date is not zoomed, else it is." )
			DEBUGOUT( iz )
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 0
		.LevelCount = 2
		.FirstWeekDay = 1
		.AllowInsideZoom = .T.
		.InsideZooms.Add({^2001-1-10})
	endwith
	.EndUpdate
endwith
1804:
Is it possible to word-wrap text/caption on the bar, so it gets displayed on multiple lines

with thisform.G2antt1
	.BeginUpdate
	.ScrollBySingleLine = .T.
	.ItemsAllowSizing = -1
	.DrawGridLines = 1
	.HeaderHeight = 28
	.DefaultItemHeight = 24
	.BackColorLevelHeader = .BackColor
	.HeaderAppearance = 5
	.Columns.Add("Tasks")
	with .Chart
		.LevelCount = 2
		.PaneWidth(0) = 128
		.FirstVisibleDate = {^2001-1-1}
		.DrawGridLines = 1
		with .Bars.Copy("Task","TaskB")
			.Height = 15
			.Pattern = 32
			.StartColor = RGB(204,232,255)
			.EndColor = .StartColor
			.Color = RGB(0,0,255)
		endwith
		with .Bars.Item("Task")
			.Height = -1
			.Pattern = 32
			.StartColor = RGB(204,232,255)
			.EndColor = .StartColor
			.Color = RGB(0,0,255)
		endwith
	endwith
	with .Items
		h = .AddItem("Word-Wrap Inside")
		.AddBar(h,"Task",{^2001-1-9},{^2001-1-13},"A1")
		.ItemBar(h,"A1",53) = "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",{^2001-1-5},{^2001-1-19},"A2")
		.ItemBar(h,"A2",53) = "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",{^2001-1-9},{^2001-1-13},"A3")
		.ItemBar(h,"A3",53) = "client[align=0x11,text=`This is a bit of text that should break the line`,wordwrap]"
		.ItemBar(h,"A3",54) = 2
	endwith
	.EndUpdate
endwith
1803:
Can I set the search box / filterbarprompt to invisible, so I can use my own input and *string* via VBA
with thisform.G2antt1
	.BeginUpdate
	.ColumnAutoResize = .T.
	.ContinueColumnScroll = 0
	.MarkSearchColumn = .F.
	.SearchColumnIndex = 1
	.FilterBarHeight = 0
	.FilterBarPromptVisible = .T.
	.Chart.PaneWidth(1) = 0
	with .Columns
		.Add("Name").Width = 96
		.Add("Title").Width = 96
		.Add("City")
	endwith
	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) = .T.
		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"
	endwith
	.FilterBarPromptPattern = "London"
	.EndUpdate
endwith
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. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.SetParent(Item,.FindItem(.CellValue(Item,"ReportsTo"),"EmployeeID"))
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Chart.PaneWidth(1) = 0
	.LinesAtRoot = -1
	.ColumnAutoResize = .F.
	.ContinueColumnScroll = .F.
	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)
	endwith
	.DataSource = rs
	.Items.ExpandItem(0) = .T.
	.EndUpdate
endwith
1801:
How can I highlight the limits/margins of a summary bar, according with the child bars

with thisform.G2antt1
	.BeginUpdate
	with .VisualAppearance
		var_s = "gBFLBCJwBAEHhEJAAEhABRkIQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjhwkAIIQK/cZRPC0Ow8GSEZAgOKIch6FgCQjEIxDKIsVRZEiDYRmGLpIiOJoWSQBUIyJKoAQ"
		var_s = var_s + "0f6fIziaTpNiGL4yTBPMzyJRcEx1GyBZ5negaAo2AwIQiUBomGahajkMqZQAJaCSCI2Y4eDZCIoTXR1WAxDq3ZruKpLUpOc4DOrEMIwCEBA="
		.Add(1,var_s)
		.Add(2,"CP:1 -4 0 5 0")
		var_s1 = "gBFLBCJwBAEHhEJAAEhABOMGACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGUYBRgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQRHc5TNC"
		var_s1 = var_s1 + "MTRRECDY4kAYpAiKRYbSpAcyQHQ8bQtHwYKAoOg6JjWIAHRqCMI0XINHQ3FwaRJsCwoJhOZIDWZENDQTSsLSxJSkIRfe4wArNf4XVBVMqSdKEZRJLybJwADApAo2eIlQ"
		var_s1 = var_s1 + "jJdQ4TSdBSdQwDLYhECpbwCT6JT7jGLQJZsNyvBLIYDrKA8UozFqHQRYNhxDZNShhM6rMigPQQAq8AKlRbVNzXLamLwHRS9BpoORhUjHD4bVxVOyaPpAAaBFbhI44QZO"
		var_s1 = var_s1 + "HYNYfjgaI0BySp8HMVZdlgaxtBqexWkqOw1lGbZzlwfQ0AwYR/gka5FiMGpgkQYYviGV4kBUWpmlsaYGHMEgACECQUAaEYMHQHRHCGFRBECRJkGQQgTGCVBoDYQhCgQJ"
		var_s1 = var_s1 + "ZoG4EIAGEFwGB+dwxHaB5iAabReggYhGnUToJGIRgCCiCBdjiNguGmYo4gIKoMGIKIeDSCYTGiXg4EITo3hAiJAICA=="
		.Add(3,var_s1)
	endwith
	.Columns.Add("Task")
	with .Chart
		.PaneWidth(0) = 128
		.FirstVisibleDate = {^2001-1-1}
		.Bars.Item("Summary").Color = 0x3000000
	endwith
	with .Items
		hSummary = .AddItem("Summary")
		.AddBar(hSummary,"Summary",{^2001-1-2},{^2001-1-2},"")
		hTask = .InsertItem(hSummary,Null,"Task A")
		.AddBar(hTask,"Task",{^2001-1-2},{^2001-1-5},"K1")
		hTask = .InsertItem(hSummary,Null,"Task B")
		.AddBar(hTask,"Task",{^2001-1-4},{^2001-1-8},"K2")
		hTask = .InsertItem(hSummary,Null,"Task C")
		.AddBar(hTask,"Task",{^2001-1-6},{^2001-1-10},"K3")
		.ExpandItem(hSummary) = .T.
		.DefineSummaryBars(hSummary,"",-1,"<*>")
		.ItemBar(hSummary,"",34) = 33554432
	endwith
	.EndUpdate
endwith
1800:
How can I highlight somehow the child bars of a summary bar

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Task")
	with .Chart
		.PaneWidth(0) = 128
		.FirstVisibleDate = {^2001-1-1}
		.Bars.Item("Task").Color = RGB(240,240,240)
	endwith
	with .Items
		hSummary = .AddItem("Summary")
		.AddBar(hSummary,"Project Summary",{^2001-1-2},{^2001-1-2},"")
		hTask = .InsertItem(hSummary,Null,"Task A")
		.AddBar(hTask,"Task",{^2001-1-2},{^2001-1-5},"K1")
		hTask = .InsertItem(hSummary,Null,"Task B")
		.AddBar(hTask,"Task",{^2001-1-4},{^2001-1-8},"K2")
		hTask = .InsertItem(hSummary,Null,"Task C")
		.AddBar(hTask,"Task",{^2001-1-6},{^2001-1-10},"K3")
		.ExpandItem(hSummary) = .T.
		.DefineSummaryBars(hSummary,"",-1,"<*>")
		.ItemBar(hSummary,"",34) = 65536
		.ItemBar(hSummary,"",35) = 50
	endwith
	.EndUpdate
endwith
1799:
How do I change the color for the selected bars, without showing the frame arround

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.FirstVisibleDate = {^2002-1-1}
		.SelBarColor = 0x7f0000ff
		.PaneWidth(0) = 48
	endwith
	.Columns.Add("Task")
	with .Items
		.AddBar(.AddItem("Task 1"),"Task",{^2002-1-2},{^2002-1-4},"A")
		.AddBar(.AddItem("Task 2"),"Task",{^2002-1-6},{^2002-1-10},"B")
		.AddBar(.AddItem("Task 3"),"Task",{^2002-1-11},{^2002-1-14},"C")
		.ItemBar(0,"<A B>",257) = .T.
	endwith
	.EndUpdate
endwith
1798:
Is it possible to enumerate the activities/bars of critical path

*** BarResize event - Occurs when a bar is moved or resized. ***
LPARAMETERS Item,Key
	with thisform.G2antt1
		.Items.SchedulePDM(Item,Key)
	endwith

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

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Task")
	with .Chart
		.FirstVisibleDate = {^2000-12-25}
		.PaneWidth(0) = 48
		.LevelCount = 2
	endwith
	with .Items
		h1 = .AddItem("Task 1")
		.AddBar(h1,"Task",{^2001-1-2},{^2001-1-4},"K1")
		h2 = .AddItem("Task 2")
		.AddBar(h2,"Task",{^2001-1-2},{^2001-1-5},"K2")
		h3 = .AddItem("Task 3")
		.AddBar(h3,"Task",{^2001-1-2},{^2001-1-5},"K3")
		h4 = .AddItem("Task 4")
		.AddBar(h4,"Task",{^2001-1-2},{^2001-1-5},"K4")
		h5 = .AddItem("Task 5")
		.AddBar(h5,"Task",{^2001-1-2},{^2001-1-5},"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",6) = 0
		.Link("L4",7) = 2
		.Link("L4",8) = 65280
		.SchedulePDM(0,"K5")
	endwith
	.Chart.ShowLinks = 1
	.EndUpdate
endwith
1796:
How do I get the Start and End date of a bar

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Tasks")
	.Debug = .T.
	with .Chart
		.FirstVisibleDate = {^2006-9-20}
		.LevelCount = 2
		.PaneWidth(0) = 96
	endwith
	with .Items
		.AddBar(.AddItem("Task 1"),"Task",{^2006-9-21},{^2006-9-24},"K1")
		.AddBar(.AddItem("Task 2"),"Task",{^2006-9-22},{^2006-9-25},"K2")
		.AddBar(.AddItem("Task 3"),"Task",{^2006-9-23},{^2006-9-26},"K3")
		h = .ItemByIndex(1)
		.ItemBold(h) = .T.
		DEBUGOUT( "Start of " )
		DEBUGOUT( .FirstItemBar(h) )
		DEBUGOUT( .ItemBar(h,.FirstItemBar(h),1) )
		DEBUGOUT( "End of  " )
		DEBUGOUT( .FirstItemBar(h) )
		DEBUGOUT( .ItemBar(h,.FirstItemBar(h),2) )
	endwith
	.EndUpdate
endwith
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 thisform.G2antt1
	with .Chart
		.FirstWeekDay = .LocFirstWeekDay && .LocFirstWeekDay
		.MonthNames = .LocMonthNames
		.WeekDays = .LocWeekDays
		.AMPM = .LocAMPM
		.LevelCount = 2
		.PaneWidth(0) = 0
		.UnitScale = 4096
	endwith
endwith
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 thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Task")
	.Chart.FirstVisibleDate = {^2001-1-1}
	with .Items
		h1 = .AddItem("Task 1")
		.AddBar(h1,"Task",{^2001-1-2},{^2001-1-4},"K1")
		h2 = .AddItem("Task 2")
		.AddBar(h2,"Task",{^2001-1-5},{^2001-1-7},"K2")
		.AddLink("L1",h1,"K1",h2,"K2")
	endwith
	.EndUpdate
	with CreateObject("Exontrol.Print")
		.Caption = "This is your new caption for print and print preview"
		.AutoRelease = .F.
		.PrintExt = thisform.G2antt1.Object
		.Preview
	endwith
endwith
1793:
Is it possible to specify the A4 paper size for the print preview
with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Task")
	.Chart.FirstVisibleDate = {^2001-1-1}
	with .Items
		h1 = .AddItem("Task 1")
		.AddBar(h1,"Task",{^2001-1-2},{^2001-1-4},"K1")
		h2 = .AddItem("Task 2")
		.AddBar(h2,"Task",{^2001-1-5},{^2001-1-7},"K2")
		.AddLink("L1",h1,"K1",h2,"K2")
	endwith
	.EndUpdate
	with CreateObject("Exontrol.Print")
		.Settings(0) = 9
		.AutoRelease = .F.
		.PrintExt = thisform.G2antt1.Object
		.Preview
	endwith
endwith
1792:
Is it possible to tell the print preview to open up in "landscape mode" by default, not in "portrait mode"
with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Task")
	.Chart.FirstVisibleDate = {^2001-1-1}
	with .Items
		h1 = .AddItem("Task 1")
		.AddBar(h1,"Task",{^2001-1-2},{^2001-1-4},"K1")
		h2 = .AddItem("Task 2")
		.AddBar(h2,"Task",{^2001-1-5},{^2001-1-7},"K2")
		.AddLink("L1",h1,"K1",h2,"K2")
	endwith
	.EndUpdate
	with CreateObject("Exontrol.Print")
		.PageOrientation = 2
		.AutoRelease = .F.
		.PrintExt = thisform.G2antt1.Object
		.Preview
	endwith
endwith
1791:
How do I prevent a caption outside the bar from overlapping other bars

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

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

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

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

with thisform.G2antt1
	.BeginUpdate
	.AntiAliasing = .T.
	.Columns.Add("Task")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 128
		.NonworkingDays = 0
		.LinksWidth = 2
	endwith
	with .Items
		.AddItem("")
		h3 = .AddItem("Task 3")
		.AddItem("")
		.AddBar(h3,"Task",{^2001-1-13},{^2001-1-15},"K3")
		h1 = .AddItem("Task 1")
		.AddItem("")
		.AddBar(h1,"Task",{^2001-1-2},{^2001-1-4},"K1")
		h2 = .AddItem("Task 2")
		.AddBar(h2,"Task",{^2001-1-7},{^2001-1-9},"K2")
		.AddItem("")
		.AddLink("L1",h1,"K1",h2,"K2")
		.AddLink("L2",h2,"K2",h3,"K3")
		.Link("<*>",15) = 3
	endwith
	.EndUpdate
endwith
1786:
What options do I have to show the links between bars (straight)

with thisform.G2antt1
	.BeginUpdate
	.AntiAliasing = .T.
	.Columns.Add("Task")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 128
		.NonworkingDays = 0
		.LinksWidth = 2
	endwith
	with .Items
		.AddItem("")
		h3 = .AddItem("Task 3")
		.AddItem("")
		.AddBar(h3,"Task",{^2001-1-13},{^2001-1-15},"K3")
		h1 = .AddItem("Task 1")
		.AddItem("")
		.AddBar(h1,"Task",{^2001-1-2},{^2001-1-4},"K1")
		h2 = .AddItem("Task 2")
		.AddBar(h2,"Task",{^2001-1-7},{^2001-1-9},"K2")
		.AddItem("")
		.AddLink("L1",h1,"K1",h2,"K2")
		.AddLink("L2",h2,"K2",h3,"K3")
		.Link("<*>",15) = 2
	endwith
	.EndUpdate
endwith
1785:
What options do I have to show the links between bars (direct)

with thisform.G2antt1
	.BeginUpdate
	.AntiAliasing = .T.
	.Columns.Add("Task")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 128
		.NonworkingDays = 0
		.LinksWidth = 2
	endwith
	with .Items
		.AddItem("")
		h3 = .AddItem("Task 3")
		.AddItem("")
		.AddBar(h3,"Task",{^2001-1-13},{^2001-1-15},"K3")
		h1 = .AddItem("Task 1")
		.AddItem("")
		.AddBar(h1,"Task",{^2001-1-2},{^2001-1-4},"K1")
		h2 = .AddItem("Task 2")
		.AddBar(h2,"Task",{^2001-1-7},{^2001-1-9},"K2")
		.AddItem("")
		.AddLink("L1",h1,"K1",h2,"K2")
		.AddLink("L2",h2,"K2",h3,"K3")
		.Link("<*>",15) = 1
	endwith
	.EndUpdate
endwith
1784:
What options do I have to show the links between bars (round)

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

with thisform.G2antt1
	.BeginUpdate
	.AntiAliasing = .T.
	.Columns.Add("Task")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 128
		.NonworkingDays = 0
		.LinksWidth = 2
	endwith
	with .Items
		.AddItem("")
		h3 = .AddItem("Task 3")
		.AddItem("")
		.AddBar(h3,"Task",{^2001-1-13},{^2001-1-15},"K3")
		h1 = .AddItem("Task 1")
		.AddItem("")
		.AddBar(h1,"Task",{^2001-1-2},{^2001-1-4},"K1")
		h2 = .AddItem("Task 2")
		.AddBar(h2,"Task",{^2001-1-7},{^2001-1-9},"K2")
		.AddItem("")
		.AddLink("L1",h1,"K1",h2,"K2")
		.AddLink("L2",h2,"K2",h3,"K3")
		.Link("<*>",15) = 0
	endwith
	.EndUpdate
endwith
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 thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Tasks")
	.BackColorLevelHeader = .BackColor
	with .Chart
		.LevelCount = 2
		.FirstVisibleDate = {^2006-9-20}
		.PaneWidth(0) = 64
		with .Bars.Copy("Progress","TProgressD")
			.Def(4) = 18
			.Shape = 20
		endwith
		with .Bars.Copy("Progress","TProgressC")
			.Def(4) = 18
		endwith
		with .Bars.Copy("Progress","TProgressU")
			.Def(4) = 18
			.Shape = 18
		endwith
	endwith
	with .Items
		h = .AddItem("Task")
		.AddBar(h,"Task",{^2006-9-25},{^2006-9-30},"T1")
		.AddBar(h,"TProgressU",{^2006-9-25},{^2006-10-4},"TP1")
		.GroupBars(h,"T1",.T.,h,"TP1",.T.,3)
		.ItemBar(h,"TP1",3) = "<font ;6>progress up"
		h = .AddItem("Task")
		.AddBar(h,"Task",{^2006-9-26},{^2006-10-1},"T2")
		.AddBar(h,"TProgressC",{^2006-9-26},{^2006-10-5},"TP2")
		.GroupBars(h,"T2",.T.,h,"TP2",.T.,3)
		.ItemBar(h,"TP2",3) = "<font ;6>progress center"
		h = .AddItem("Task")
		.AddBar(h,"Task",{^2006-9-25},{^2006-9-30},"T3")
		.AddBar(h,"TProgressD",{^2006-9-25},{^2006-10-6},"TP3")
		.GroupBars(h,"T3",.T.,h,"TP3",.T.,3)
		.ItemBar(h,"TP3",3) = "<font ;6>progress down"
	endwith
	.EndUpdate
endwith
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 thisform.G2antt1
	.BeginUpdate
	.MarkSearchColumn = .F.
	.Indent = 11
	.HasLines = 1
	.Items.AllowCellValueToItemBar = .T.
	with .Columns
		.Add("Tasks")
		with .Add("Start")
			.Def(18) = 544
			.Editor.EditType = 7
			.LevelKey = 1
		endwith
		with .Add("End")
			.Def(18) = 546
			.Editor.EditType = 7
			.LevelKey = 1
		endwith
	endwith
	with .Chart
		.FirstVisibleDate = {^2006-9-20}
		.AllowLinkBars = .F.
		.AllowCreateBar = 0
		.LevelCount = 2
		.PaneWidth(0) = 224
		with .Bars
			with .Add("Underline")
				.Color = RGB(0,0,255)
				.Shape = 20
			endwith
			with .Add("Task:Underline")
				.Shortcut = "T"
				.Def(20) = .T.
			endwith
		endwith
	endwith
	with .Items
		h = .AddItem("Project")
		.AddBar(h,"Summary",{^2006-9-21},{^2006-10-3})
		h1 = .InsertItem(h,Null,"Task 1")
		.AddBar(h1,"T",{^2006-9-21},{^2006-9-24})
		h2 = .InsertItem(h,Null,"Task 2")
		.AddBar(h2,"T",{^2006-9-24},{^2006-9-28})
		h3 = .InsertItem(h,Null,"Task 3")
		.AddBar(h3,"T",{^2006-9-28},{^2006-10-3})
		.DefineSummaryBars(h,"",h1,"")
		.DefineSummaryBars(h,"",h2,"")
		.DefineSummaryBars(h,"",h3,"")
		.ExpandItem(h) = .T.
		.ItemBold(h) = .T.
		.ItemBar(h,"",544) = {^2006-9-22}
	endwith
	.EndUpdate
endwith
1780:
I have a column of date-type, the question is how can I move the associated bar, instead of resizing it (summary)

with thisform.G2antt1
	.BeginUpdate
	.MarkSearchColumn = .F.
	.Indent = 11
	.HasLines = 1
	.Items.AllowCellValueToItemBar = .T.
	with .Columns
		.Add("Tasks")
		with .Add("Start")
			.Def(18) = 544
			.Editor.EditType = 7
			.LevelKey = 1
		endwith
		with .Add("End")
			.Def(18) = 545
			.Editor.EditType = 7
			.LevelKey = 1
		endwith
	endwith
	with .Chart
		.FirstVisibleDate = {^2006-9-20}
		.AllowLinkBars = .F.
		.AllowCreateBar = 0
		.LevelCount = 2
		.PaneWidth(0) = 224
	endwith
	with .Items
		h = .AddItem("Project")
		.AddBar(h,"Summary",{^2006-9-21},{^2006-10-3})
		h1 = .InsertItem(h,Null,"Task 1")
		.AddBar(h1,"Task",{^2006-9-21},{^2006-9-24})
		h2 = .InsertItem(h,Null,"Task 2")
		.AddBar(h2,"Task",{^2006-9-24},{^2006-9-28})
		h3 = .InsertItem(h,Null,"Task 3")
		.AddBar(h3,"Task",{^2006-9-28},{^2006-10-3})
		.DefineSummaryBars(h,"",h1,"")
		.DefineSummaryBars(h,"",h2,"")
		.DefineSummaryBars(h,"",h3,"")
		.ExpandItem(h) = .T.
		.ItemBold(h) = .T.
		.ItemBar(h,"",544) = {^2006-9-22}
	endwith
	.EndUpdate
endwith
1779:
Is it possible to programmatically move all bars of specified key to end at specified date (inclusive)

with thisform.G2antt1
	.BeginUpdate
	.Debug = .T.
	.Columns.Add("Tasks")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.LevelCount = 2
		.PaneWidth(0) = 48
	endwith
	with .Items
		.AddBar(.AddItem("Task A.1"),"Task",{^2001-1-1},{^2001-1-6},"A")
		.AddBar(.AddItem("Task A.2"),"Task",{^2001-1-2},{^2001-1-7},"A")
		.AddBar(.AddItem("Task B.1"),"Task",{^2001-1-3},{^2001-1-8},"B")
		.AddBar(.AddItem("Task B.2"),"Task",{^2001-1-4},{^2001-1-9},"B")
		.ItemBar(0,"<A*>",546) = {^2001-1-2}
	endwith
	.EndUpdate
endwith
1778:
Is it possible to programmatically move all bars to end at specified date (inclusive)

with thisform.G2antt1
	.BeginUpdate
	.Debug = .T.
	.Columns.Add("Tasks")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.LevelCount = 2
		.PaneWidth(0) = 48
	endwith
	with .Items
		.AddBar(.AddItem("Task A.1"),"Task",{^2001-1-1},{^2001-1-6},"A")
		.AddBar(.AddItem("Task A.2"),"Task",{^2001-1-2},{^2001-1-7},"A")
		.AddBar(.AddItem("Task B.1"),"Task",{^2001-1-3},{^2001-1-8},"B")
		.AddBar(.AddItem("Task B.2"),"Task",{^2001-1-4},{^2001-1-9},"B")
		.ItemBar(0,"<*>",546) = {^2001-1-2}
	endwith
	.EndUpdate
endwith
1777:
Is it possible to programmatically move all bars of specified key to end at specified date

with thisform.G2antt1
	.BeginUpdate
	.Debug = .T.
	.Columns.Add("Tasks")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.LevelCount = 2
		.PaneWidth(0) = 48
	endwith
	with .Items
		.AddBar(.AddItem("Task A.1"),"Task",{^2001-1-1},{^2001-1-6},"A")
		.AddBar(.AddItem("Task A.2"),"Task",{^2001-1-2},{^2001-1-7},"A")
		.AddBar(.AddItem("Task B.1"),"Task",{^2001-1-3},{^2001-1-8},"B")
		.AddBar(.AddItem("Task B.2"),"Task",{^2001-1-4},{^2001-1-9},"B")
		.ItemBar(0,"<A*>",545) = {^2001-1-2}
	endwith
	.EndUpdate
endwith
1776:
Is it possible to programmatically move all bars to end at specified date

with thisform.G2antt1
	.BeginUpdate
	.Debug = .T.
	.Columns.Add("Tasks")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.LevelCount = 2
		.PaneWidth(0) = 48
	endwith
	with .Items
		.AddBar(.AddItem("Task A.1"),"Task",{^2001-1-1},{^2001-1-6},"A")
		.AddBar(.AddItem("Task A.2"),"Task",{^2001-1-2},{^2001-1-7},"A")
		.AddBar(.AddItem("Task B.1"),"Task",{^2001-1-3},{^2001-1-8},"B")
		.AddBar(.AddItem("Task B.2"),"Task",{^2001-1-4},{^2001-1-9},"B")
		.ItemBar(0,"<*>",545) = {^2001-1-2}
	endwith
	.EndUpdate
endwith
1775:
Is it possible to programmatically move all bars of specified key to start at specified date

with thisform.G2antt1
	.BeginUpdate
	.Debug = .T.
	.Columns.Add("Tasks")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.LevelCount = 2
		.PaneWidth(0) = 48
	endwith
	with .Items
		.AddBar(.AddItem("Task A.1"),"Task",{^2001-1-1},{^2001-1-6},"A")
		.AddBar(.AddItem("Task A.2"),"Task",{^2001-1-2},{^2001-1-7},"A")
		.AddBar(.AddItem("Task B.1"),"Task",{^2001-1-3},{^2001-1-8},"B")
		.AddBar(.AddItem("Task B.2"),"Task",{^2001-1-4},{^2001-1-9},"B")
		.ItemBar(0,"<A*>",544) = {^2001-1-2}
	endwith
	.EndUpdate
endwith
1774:
Is it possible to programmatically move all bars to start at specified date

with thisform.G2antt1
	.BeginUpdate
	.Debug = .T.
	.Columns.Add("Tasks")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.LevelCount = 2
		.PaneWidth(0) = 48
	endwith
	with .Items
		.AddBar(.AddItem("Task A.1"),"Task",{^2001-1-1},{^2001-1-6},"A")
		.AddBar(.AddItem("Task A.2"),"Task",{^2001-1-2},{^2001-1-7},"A")
		.AddBar(.AddItem("Task B.1"),"Task",{^2001-1-3},{^2001-1-8},"B")
		.AddBar(.AddItem("Task B.2"),"Task",{^2001-1-4},{^2001-1-9},"B")
		.ItemBar(0,"<*>",544) = {^2001-1-2}
	endwith
	.EndUpdate
endwith
1773:
Is it possible to programmatically move all bars of specified key

with thisform.G2antt1
	.BeginUpdate
	.Debug = .T.
	.Columns.Add("Tasks")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.LevelCount = 2
		.PaneWidth(0) = 48
	endwith
	with .Items
		.AddBar(.AddItem("Task A.1"),"Task",{^2001-1-1},{^2001-1-6},"A")
		.AddBar(.AddItem("Task A.2"),"Task",{^2001-1-2},{^2001-1-7},"A")
		.AddBar(.AddItem("Task B.1"),"Task",{^2001-1-3},{^2001-1-8},"B")
		.AddBar(.AddItem("Task B.2"),"Task",{^2001-1-4},{^2001-1-9},"B")
		.ItemBar(0,"<A*>",514) = 2
	endwith
	.EndUpdate
endwith
1772:
Is it possible to programmatically move all bars

with thisform.G2antt1
	.BeginUpdate
	.Debug = .T.
	.Columns.Add("Tasks")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.LevelCount = 2
		.PaneWidth(0) = 48
	endwith
	with .Items
		.AddBar(.AddItem("Task A.1"),"Task",{^2001-1-1},{^2001-1-6},"A")
		.AddBar(.AddItem("Task A.2"),"Task",{^2001-1-2},{^2001-1-7},"A")
		.AddBar(.AddItem("Task B.1"),"Task",{^2001-1-3},{^2001-1-8},"B")
		.AddBar(.AddItem("Task B.2"),"Task",{^2001-1-4},{^2001-1-9},"B")
		.ItemBar(0,"<*>",514) = 2
	endwith
	.EndUpdate
endwith
1771:
How can I programmatically move a bar, so it ends at specified date (inclusive)
with thisform.G2antt1
	.Columns.Add("Tasks")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.LevelCount = 2
		.PaneWidth(0) = 48
	endwith
	with .Items
		h = .AddItem("Task 1")
		.AddBar(h,"Task",{^2001-1-1},{^2001-1-6},"A")
		.ItemBar(h,"A",546) = {^2001-1-4}
	endwith
endwith
1770:
How can I programmatically move a bar, so it ends at specified date
with thisform.G2antt1
	.Columns.Add("Tasks")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.LevelCount = 2
		.PaneWidth(0) = 48
	endwith
	with .Items
		h = .AddItem("Task 1")
		.AddBar(h,"Task",{^2001-1-1},{^2001-1-6},"A")
		.ItemBar(h,"A",545) = {^2001-1-4}
	endwith
endwith
1769:
How can I programmatically move a bar, so it starts at specified date
with thisform.G2antt1
	.Columns.Add("Tasks")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.LevelCount = 2
		.PaneWidth(0) = 48
	endwith
	with .Items
		h = .AddItem("Task 1")
		.AddBar(h,"Task",{^2001-1-1},{^2001-1-6},"A")
		.ItemBar(h,"A",544) = {^2001-1-4}
	endwith
endwith
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 thisform.G2antt1
	.BeginUpdate
	.HeaderHeight = 22
	with .Chart
		.FirstVisibleDate = {^2016-1-1}
		.PaneWidth(0) = 0
		.LevelCount = 2
		.DrawLevelSeparator = 2
		.AllowResizeChart = 6 && ResizeChartEnum.exAllowResizeChartMiddle Or ResizeChartEnum.exAllowResizeChartHeader
		.MaxUnitWidth = 196
		with .Level(0)
			.Alignment = 17 && AlignmentEnum.exHOutside Or AlignmentEnum.CenterAlignment
			.DrawTickLines = 2
		endwith
		with .Level(1)
			.DrawTickLines = 65 && LevelLineEnum.exLevelMiddleLine Or LevelLineEnum.exLevelDotLine
			.DrawTickLinesFrom(0,2)
			.BackColor = RGB(240,240,240)
		endwith
		.OverviewVisible = 2
		.AllowOverviewZoom = 1
		.UnitWidth = 24
		.Label(16777216) = ""
		.Label(1048576) = ""
		.Label(65536) = ""
		.Label(256) = ""
		var_s = "<font ;6><%d%><|><%d%><|><%d%> <fgcolor=A0A0A0><off -4><%d1%><|><%d%> <fgcolor=A0A0A0><off -4><%d2%><|><%d%> <fgcolor=A0A0A0><of"
		var_s = var_s + "f -4><%d3%><|><%d%> <fgcolor=A0A0A0><off -4><%dddd%><||><||>4096"
		.Label(4096) = var_s
		.UnitScale = 4096
		.ScrollTo(.FirstVisibleDate,1)
	endwith
	.Columns.Add("Default")
	.EndUpdate
endwith
1767:
Can I use GroupBars with OverlaidType method

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Tasks")
	.Debug = .T.
	.LinesAtRoot = -1
	.ScrollBySingleLine = .T.
	.BackColorLevelHeader = .BackColor
	with .Chart
		.LevelCount = 2
		.FirstVisibleDate = {^2006-9-20}
		.PaneWidth(0) = 96
		.Bars.Item("Task").OverlaidType = 3
	endwith
	with .Items
		h = .AddItem("Project")
		.AddBar(h,"Summary",{^2006-9-21},{^2006-10-4})
		h1 = .InsertItem(h,Null,"Tasks")
		.AddBar(h1,"Task",{^2006-9-21},{^2006-9-26},"h1")
		h2 = h1
		.AddBar(h2,"Task",{^2006-9-25},{^2006-9-30},"h2")
		.AddLink("L1",h1,"h1",h2,"h2")
		h3 = h1
		.AddBar(h3,"Task",{^2006-9-29},{^2006-10-4},"h3")
		.AddLink("L2",h2,"h2",h3,"h3")
		.DefineSummaryBars(h,"",h1,"h1")
		.DefineSummaryBars(h,"",h2,"h2")
		.DefineSummaryBars(h,"",h3,"h3")
		.ExpandItem(h) = .T.
		.ItemBold(h) = .T.
		.GroupBars(h1,"h1",.F.,h2,"h2",.T.,31,"0;5;-1")
		.GroupBars(h2,"h2",.F.,h3,"h3",.T.,31,"0;5;-1")
	endwith
	.EndUpdate
endwith
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. ***
LPARAMETERS Item,Key
	with thisform.G2antt1
		.Items.SchedulePDM(Item,Key)
	endwith

with thisform.G2antt1
	.BeginUpdate
	.DefaultItemHeight = 22
	.HeaderHeight = .DefaultItemHeight
	.BackColorLevelHeader = .BackColor
	.AntiAliasing = .T.
	.Columns.Add("Task")
	with .Chart
		.LinksStyle = 0
		.LinksColor = RGB(128,128,128)
		.LevelCount = 2
		.FirstVisibleDate = {^2000-12-28}
		.PaneWidth(0) = 48
		with .Bars.Item("Task")
			.Def(20) = .T.
			.Def(4) = 18
			.Color = RGB(0,0,0)
			.StartColor = RGB(190,190,190)
			.EndColor = .StartColor
			.Pattern = 32
		endwith
	endwith
	with .Items
		h1 = .AddItem("Task 1")
		.AddBar(h1,"Task",{^2001-1-2},{^2001-1-5},"K1","FS lag=0 (default)")
		h2 = .AddItem("Task 2")
		.AddBar(h2,"Task",{^2001-1-2},{^2001-1-5},"K2","FS lag=4")
		.AddLink("L1",h1,"K1",h2,"K2")
		h3 = .AddItem("Task 3")
		.AddBar(h3,"Task",{^2001-1-2},{^2001-1-5},"K3","FS lag=-1")
		.AddLink("L2",h2,"K2",h3,"K3")
		.Link("L2",16) = 4
		h4 = .AddItem("Task 4")
		.AddBar(h4,"Task",{^2001-1-2},{^2001-1-5},"K4")
		.AddLink("L3",h3,"K3",h4,"K4")
		.Link("L3",16) = -1
		.SchedulePDM(0,"K1")
	endwith
	.EndUpdate
endwith
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. ***
LPARAMETERS Item,Key
	with thisform.G2antt1
		.Items.SchedulePDM(Item,Key)
	endwith

with thisform.G2antt1
	.BeginUpdate
	.DefaultItemHeight = 22
	.HeaderHeight = .DefaultItemHeight
	.BackColorLevelHeader = .BackColor
	.AntiAliasing = .T.
	.Columns.Add("Task")
	with .Chart
		.LinksStyle = 0
		.LinksColor = RGB(128,128,128)
		.LevelCount = 2
		.NonworkingDays = 0
		.FirstVisibleDate = {^2000-12-28}
		.PaneWidth(0) = 48
		with .Bars.Item("Task")
			.Def(4) = 18
			.Color = RGB(0,0,0)
			.StartColor = RGB(190,190,190)
			.EndColor = .StartColor
			.Pattern = 32
		endwith
	endwith
	with .Items
		h1 = .AddItem("Task 1")
		.AddBar(h1,"Task",{^2001-1-2},{^2001-1-5},"K1","FS lag=0 (default)")
		h2 = .AddItem("Task 2")
		.AddBar(h2,"Task",{^2001-1-2},{^2001-1-5},"K2","FS lag=4")
		.AddLink("L1",h1,"K1",h2,"K2")
		h3 = .AddItem("Task 3")
		.AddBar(h3,"Task",{^2001-1-2},{^2001-1-5},"K3","FS lag=-1")
		.AddLink("L2",h2,"K2",h3,"K3")
		.Link("L2",17) = 4
		h4 = .AddItem("Task 4")
		.AddBar(h4,"Task",{^2001-1-2},{^2001-1-5},"K4")
		.AddLink("L3",h3,"K3",h4,"K4")
		.Link("L3",17) = -1
		.SchedulePDM(0,"K1")
	endwith
	.EndUpdate
endwith
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. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Summary",.CellValue(Item,2),.CellValue(Item,4))
			.DefineSummaryBars(Item,"",-3,"")
		endwith
	endwith

*** AddItem event - Occurs after a new Item has been inserted to Items collection. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

*** MouseDown event - Occurs when the user presses a mouse button. ***
LPARAMETERS Button,Shift,X,Y
	with thisform.G2antt1
		i = .ItemFromPoint(-1,-1,c,hit)
		.FullRowSelect = .Columns.Item(c).Data && .Columns.Item(c).Data
	endwith

with thisform.G2antt1
	.BeginUpdate
	.HeaderHeight = 22
	.HeaderAppearance = 1
	.BackColorLock = RGB(240,240,240)
	.BackColorHeader = .BackColorLock
	.HasLines = 0
	.ColumnAutoResize = .F.
	.SortBarVisible = .F.
	.AllowGroupBy = .T.
	.ReadOnly = -1
	.ShowFocusRect = .F.
	.CountLockedColumns = 1
	.AutoDrag = 16
	.SingleSort = .F.
	.ColumnsAllowSizing = .T.
	.DrawGridLines = -1
	.GridLineStyle = 48
	.GridLineColor = RGB(220,220,220)
	.Chart.FirstVisibleDate = {^1994-9-1}
	.Chart.LevelCount = 2
	.Chart.PaneWidth(0) = 256
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = .F.
	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)
	endwith
	.DataSource = rs
	.Columns.Item(0).Data = -1
	.Layout = "singlesort="+chr(34)+"C5:1"+chr(34)+";multiplesort="+chr(34)+" C1:2"+chr(34)+""
	.EndUpdate
endwith
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). ***
LPARAMETERS Item,Cancel
	with thisform.G2antt1
		.Object.EventParam(1) = .T.
	endwith

*** Event event - Notifies the application once the control fires an event. ***
LPARAMETERS EventID
	with thisform.G2antt1
		DEBUGOUT( .EventParam(-2) )
	endwith

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

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

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

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

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

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

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Clip")
	.ScrollBySingleLine = .T.
	.DrawGridLines = -2
	with .Chart
		.AllowResizeChart = 6 && ResizeChartEnum.exAllowResizeChartMiddle Or ResizeChartEnum.exAllowResizeChartHeader
		.DrawGridLines = -2
		.FirstVisibleDate = {^2000-12-23}
		.LevelCount = 2
		.PaneWidth(0) = 216
		with .Bars.Item("Task")
			.Pattern = 32
			.Color = RGB(164,164,164)
			.StartColor = RGB(240,240,240)
			.EndColor = .StartColor
			.OverlaidType = 4611 && OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption Or OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or OverlaidBarsTypeEnum.exOverlaidBarsStack
			.Height = 15
		endwith
		.MinUnitWidth = .UnitWidth
	endwith
	with .Items
		h = .AddItem("no clip, (0-2)")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-4},"K1","no clip, right(<b>2</b>)")
		.ItemBar(h,"K1",4) = 2
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-4},"K2","no clip, center(<b>1</b>)")
		.ItemBar(h,"K2",4) = 1
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-4},"K3","no clip, left(<b>0</b>)")
		.ItemBar(h,"K3",4) = 0
		h = .AddItem("clip, inside (3-5)")
		.AddBar(h,"Task",{^2000-12-28},{^2001-1-8},"K1","clip, inside, right(<b>5</b>)")
		.ItemBar(h,"K1",4) = 5
		.AddBar(h,"Task",{^2000-12-28},{^2001-1-8},"K2","clip, inside, center(<b>4</b>)")
		.ItemBar(h,"K2",4) = 4
		.AddBar(h,"Task",{^2000-12-28},{^2001-1-8},"K3","clip, inside, left(<b>3</b>)")
		.ItemBar(h,"K3",4) = 3
		h = .AddItem("hide on min width, clip if not fit, inside (6-8)")
		.AddBar(h,"Task",{^2000-12-26},{^2001-1-10},"K1","hide on min width, clip if not fit, inside, right(<b>8</b>)")
		.ItemBar(h,"K1",4) = 8
		.AddBar(h,"Task",{^2000-12-26},{^2001-1-10},"K2","hide on min width, clip if not fit, inside, center(<b>7</b>)")
		.ItemBar(h,"K2",4) = 7
		.AddBar(h,"Task",{^2000-12-26},{^2001-1-10},"K3","hide on min width, clip if not fit, inside, left(<b>6</b>)")
		.ItemBar(h,"K3",4) = 6
		h = .AddItem("hide if not fit, no clip, inside (9-11)")
		.AddBar(h,"Task",{^2000-12-28},{^2001-1-8},"K1","hide if not fit, no clip, inside, right(<b>11</b>)")
		.ItemBar(h,"K1",4) = 11
		.AddBar(h,"Task",{^2000-12-28},{^2001-1-8},"K2","hide if not fit, no clip, center(<b>10</b>)")
		.ItemBar(h,"K2",4) = 10
		.AddBar(h,"Task",{^2000-12-28},{^2001-1-8},"K3","hide if not fit, no clip, inside, left(<b>9</b>)")
		.ItemBar(h,"K3",4) = 9
		h = .AddItem("no clip, inside, outside (12-14)")
		.AddBar(h,"Task",{^2000-12-28},{^2001-1-8},"K1","no clip, inside, outside, right(<b>14</b>)")
		.ItemBar(h,"K1",4) = 14
		.AddBar(h,"Task",{^2000-12-28},{^2001-1-8},"K2","no clip, inside, outside, center(<b>13</b>)")
		.ItemBar(h,"K2",4) = 13
		.AddBar(h,"Task",{^2000-12-28},{^2001-1-8},"K3","no clip, inside, outside, left(<b>12</b>)")
		.ItemBar(h,"K3",4) = 12
		h = .AddItem("no clip, outside (16-18)")
		.AddBar(h,"Task",{^2000-12-30},{^2001-1-6},"K1","no clip, outside, right(<b>18</b>)")
		.ItemBar(h,"K1",4) = 18
		.AddBar(h,"Task",{^2000-12-30},{^2001-1-6},"K2","no clip, outside, center(<b>17</b>)")
		.ItemBar(h,"K2",4) = 17
		.AddBar(h,"Task",{^2000-12-30},{^2001-1-6},"K3","no clip, outside, left(<b>16</b>)")
		.ItemBar(h,"K3",4) = 16
	endwith
	.EndUpdate
endwith
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. ***
LPARAMETERS nop
	with thisform.G2antt1
		.Chart.FirstVisibleDate = {^2001-1-2}
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Tasks")
	with .Columns.Add("Start")
		.Def(18) = 1
		.Visible = .F.
		.Alignment = 0
	endwith
	with .Columns.Add("End")
		.Def(18) = 2
		.Visible = .F.
		.Alignment = 2
	endwith
	with .Chart
		.FirstVisibleDate = {^2001-1-2}
		.LevelCount = 2
		.PaneWidth(0) = 48
		.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52"
		.ColumnsTransparent = 50
		.ScrollBar = .F.
	endwith
	with .Items
		.AllowCellValueToItemBar = .T.
		.AddBar(.AddItem("Task 1"),"Task",{^2001-1-3},{^2001-1-7})
		.AddBar(.AddItem("Task 2"),"Task",{^2001-1-4},{^2001-1-8})
	endwith
	.EndUpdate
endwith
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. ***
LPARAMETERS Item,Key
	with thisform.G2antt1
		with .Items
			.ItemBar(Item,Key,22) = {^2001-1-1}
			.ItemBar(Item,Key,25) = {^2001-2-1}
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Tasks")
	with .Columns.Add("Start")
		.Def(18) = 1
		.Visible = .F.
		.Alignment = 0
	endwith
	with .Columns.Add("End")
		.Def(18) = 2
		.Visible = .F.
		.Alignment = 2
	endwith
	with .Chart
		.FirstVisibleDate = {^2001-1-2}
		.LevelCount = 2
		.PaneWidth(0) = 48
		.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52"
		.ColumnsTransparent = 50
		.ScrollRange(0) = {^2001-1-1}
		.ScrollRange(1) = {^2001-1-31}
	endwith
	with .Items
		.AllowCellValueToItemBar = .T.
		.AddBar(.AddItem("Task 1"),"Task",{^2001-1-3},{^2001-1-7})
		.AddBar(.AddItem("Task 2"),"Task",{^2001-1-4},{^2001-1-8})
	endwith
	.EndUpdate
endwith
1753:
Is there a way to prevent the automatic horizontal scrolling of the chart when moving or resizing a bar (method 1)
with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Tasks")
	with .Columns.Add("Start")
		.Def(18) = 1
		.Visible = .F.
		.Alignment = 0
	endwith
	with .Columns.Add("End")
		.Def(18) = 2
		.Visible = .F.
		.Alignment = 2
	endwith
	with .Chart
		.FirstVisibleDate = {^2001-1-2}
		.LevelCount = 2
		.PaneWidth(0) = 48
		.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52"
		.ColumnsTransparent = 50
		.ScrollRange(0) = {^2001-1-1}
		.ScrollRange(1) = {^2001-1-31}
	endwith
	with .Items
		.AllowCellValueToItemBar = .T.
		.AddBar(.AddItem("Task 1"),"Task",{^2001-1-3},{^2001-1-7})
		.AddBar(.AddItem("Task 2"),"Task",{^2001-1-4},{^2001-1-8})
	endwith
	.EndUpdate
endwith
1752:
Is it possible to have "Preview Window" as a "Modal Window or 'always-on-top window'"
with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Task")
	.Chart.FirstVisibleDate = {^2001-1-1}
	with .Items
		h1 = .AddItem("Task 1")
		.AddBar(h1,"Task",{^2001-1-2},{^2001-1-4},"K1")
		h2 = .AddItem("Task 2")
		.AddBar(h2,"Task",{^2001-1-5},{^2001-1-7},"K2")
		.AddLink("L1",h1,"K1",h2,"K2")
		.Link("L1",6) = 0
	endwith
	.EndUpdate
	with CreateObject("Exontrol.Print")
		DEBUGOUT( .Version )
		.Foreground = -1
		.PrintExt = thisform.G2antt1.Object
		.Preview
	endwith
endwith
1751:
The week number is not correct. What can I do

with thisform.G2antt1
	with .Chart
		.FirstWeekDay = .LocFirstWeekDay && .LocFirstWeekDay
		.MonthNames = .LocMonthNames
		.WeekDays = .LocWeekDays
		.AMPM = .LocAMPM
		.LevelCount = 2
		.PaneWidth(0) = 0
		.UnitScale = 256
		.UnitWidth = 32
		.FirstVisibleDate = {^2016-1-1}
		.AdjustLevelsToBase = .T.
		.WeekNumberAs = 0
		.ShowNonworkingDates = .F.
		.ScrollTo(.FirstVisibleDate,1)
	endwith
endwith
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. ***
LPARAMETERS Operation
	with thisform.G2antt1
		with .Chart
			DEBUGOUT( "FirstVisibleDate" )
			DEBUGOUT( .FirstVisibleDate )
			DEBUGOUT( "UnitScale" )
			DEBUGOUT( .UnitScale )
			DEBUGOUT( "UnitWidth" )
			DEBUGOUT( .UnitWidth )
		endwith
	endwith

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

with thisform.G2antt1
	with .Chart
		.PaneWidth(0) = 0
		.FirstVisibleDate = {^2016-1-1}
		.LevelCount = 2
		.FirstWeekDay = 1
		.UnitScale = 256
		.ScrollTo(.FirstVisibleDate,1)
		.DrawGridLines = -1
		.AdjustLevelsToBase = .T.
		.Level(0).Label = "<c><%mmmm%>"
	endwith
endwith
1748:
How can I display the +/- expand - collapse buttons, a bit larger

with thisform.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")
	endwith
	.LinesAtRoot = 1
	.HasButtons = 4
	.Object.HasButtonsCustom(0) = 16777216
	.Object.HasButtonsCustom(1) = 33554432
	.Columns.Add("Column")
	with .Items
		h = .AddItem("Root 1")
		.InsertItem(h,Null,"Child 1")
		.InsertItem(h,Null,"Child 2")
		.ExpandItem(h) = .T.
		h = .AddItem("Root 2")
		.InsertItem(h,Null,"Child")
	endwith
	.EndUpdate
endwith
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. ***
LPARAMETERS Item,NewParent,InsertA,InsertB,Cancel
	with thisform.G2antt1
		with .Items
			DEBUGOUT( "NewParent" )
			DEBUGOUT( .CellCaption(NewParent,0) )
			DEBUGOUT( "After" )
			DEBUGOUT( .CellCaption(InsertA,0) )
			DEBUGOUT( "Before" )
			DEBUGOUT( .CellCaption(InsertB,0) )
		endwith
		Cancel = .T.
	endwith

with thisform.G2antt1
	.BeginUpdate
	.AutoDrag = 3
	.LinesAtRoot = 0
	.HasLines = 2
	.ShowFocusRect = .F.
	.Columns.Add("Task")
	with .Chart
		.ShowNonworkingDates = .F.
		.FirstVisibleDate = {^2000-12-29}
		.PaneWidth(0) = 96
		.LevelCount = 2
	endwith
	with .Items
		h = .AddItem("Group 1")
		.ItemDivider(h) = 0
		.ItemBold(h) = .T.
		h1 = .InsertItem(h,Null,"Task 1")
		.AddBar(h1,"Task",{^2001-1-2},{^2001-1-4},"K1")
		h2 = .InsertItem(h,Null,"Task 2")
		.AddBar(h2,"Task",{^2001-1-5},{^2001-1-7},"K2")
		.AddLink("L1",h1,"K1",h2,"K2")
		.Link("L1",12) = "L1"
		h3 = .InsertItem(h,Null,"Task 3")
		.AddBar(h3,"Task",{^2001-1-8},{^2001-1-10},"K3")
		.AddLink("L2",h2,"K2",h3,"K3")
		.Link("L2",12) = "L2"
		.ExpandItem(h) = .T.
		h = .AddItem("Group 2")
		.ItemBold(h) = .T.
		.ItemDivider(h) = 0
	endwith
	.EndUpdate
endwith
1746:
The column (chart section ) overlaps the bars, when using the ColumnsFormatLevel property. How can I prevent that

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Tasks")
	with .Columns.Add("Start")
		.Def(18) = 1
		.Visible = .F.
		.Alignment = 0
	endwith
	with .Columns.Add("End")
		.Def(18) = 2
		.Visible = .F.
		.Alignment = 2
	endwith
	with .Chart
		.FirstVisibleDate = {^2001-1-2}
		.LevelCount = 2
		.PaneWidth(0) = 48
		.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52"
		.ColumnsTransparent = 50
	endwith
	with .Items
		.AllowCellValueToItemBar = .T.
		.AddBar(.AddItem("Task 1"),"Task",{^2001-1-3},{^2001-1-7})
		.AddBar(.AddItem("Task 2"),"Task",{^2001-1-4},{^2001-1-8})
	endwith
	.EndUpdate
endwith
1745:
How do I show the column ( chart section ) with a different background color, when using the ColumnsFormatLevel property (method 2)

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Tasks")
	with .Columns.Add("Start")
		.Def(18) = 1
		.Visible = .F.
		.Alignment = 0
	endwith
	with .Columns.Add("End")
		.Def(18) = 2
		.Visible = .F.
		.Alignment = 2
	endwith
	with .Chart
		.FirstVisibleDate = {^2001-1-2}
		.LevelCount = 2
		.PaneWidth(0) = 48
		.ColumnsFormatLevel = "1[bg=12500670]:52,|,2[bg=12500670]:52"
	endwith
	with .Items
		.AllowCellValueToItemBar = .T.
		.AddBar(.AddItem("Task 1"),"Task",{^2001-1-3},{^2001-1-7})
		.AddBar(.AddItem("Task 2"),"Task",{^2001-1-4},{^2001-1-8})
	endwith
	.EndUpdate
endwith
1744:
How do I show the column ( chart section ) with a different background color, when using the ColumnsFormatLevel property (method 1)

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Tasks")
	with .Columns.Add("Start")
		.Def(18) = 1
		.Visible = .F.
		.Alignment = 0
		.Def(4) = 12500670
	endwith
	with .Columns.Add("End")
		.Def(18) = 2
		.Visible = .F.
		.Alignment = 2
		.Def(4) = 12500670
	endwith
	with .Chart
		.FirstVisibleDate = {^2000-12-31}
		.LevelCount = 2
		.PaneWidth(0) = 48
		.ColumnsFormatLevel = "1:52,|,2:52"
	endwith
	with .Items
		.AllowCellValueToItemBar = .T.
		.AddBar(.AddItem("Task 1"),"Task",{^2001-1-3},{^2001-1-7})
		.AddBar(.AddItem("Task 2"),"Task",{^2001-1-4},{^2001-1-8})
	endwith
	.EndUpdate
endwith
1743:
How can I display the control's content on an single A3 paper size, when using PDF format

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

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Task")
	.AntiAliasing = .T.
	with .Chart
		.FirstVisibleDate = {^2000-12-24}
		.PaneWidth(0) = 96
		.LevelCount = 2
		.UnitScale = 4096
		with .Bars.Item("Task")
			.Pattern = 1
			.Color = RGB(0,0,0)
			.Height = 16
		endwith
	endwith
	with .Items
		h = .AddItem("Task 1")
		.AddBar(h,"Task",{^2000-12-25},{^2001-1-5},"1","<fgcolor=FFFFFF>Center")
		.ItemBar(h,"1",44) = "left"
		.ItemBar(h,"1",45) = 16
		h = .AddItem("Task 2")
		.AddBar(h,"Task",{^2001-1-5},{^2001-1-16},"1","<fgcolor=FFFFFF>Center")
		h = .AddItem("Task 3")
		.AddBar(h,"Task",{^2001-1-16},{^2001-1-26},"2","Center")
		.ItemBar(h,"2",44) = "right"
		.ItemBar(h,"2",45) = 18
	endwith
	with .Chart.Notes
		with .Add("1S",thisform.G2antt1.Items.ItemByIndex(1),"1","<%m3%>-<%d%>")
			.PartShadow(1) = .F.
			.PartHOffset(1) = -16
			.PartVOffset(1) = 4
		endwith
		with .Add("1F",thisform.G2antt1.Items.ItemByIndex(1),"1","<%m3%>-<%d%>")
			.RelativePosition = 1
			.PartShadow(1) = .F.
			.PartHOffset(1) = 16
			.PartVOffset(1) = -4
		endwith
	endwith
	var_CopyTo = .CopyTo("C:\Temp\Preview.pdf|11.69 in x 16.53 in")
	DEBUGOUT( "Look for C:\Temp\Preview.pd file." )
	.EndUpdate
endwith
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. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.ItemBold(Item) = .T.
			.AddBar(Item,"Summary",.CellValue(Item,1),.CellValue(Item,2))
			.DefineSummaryBars(Item,"",-3,"")
		endwith
	endwith

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

*** RClick event - Fired when right mouse button is clicked ***
LPARAMETERS nop
	with thisform.G2antt1
		.Columns.Item("Start").ShowFilter("-1,-1,128,128")
	endwith

with thisform.G2antt1
	.BeginUpdate
	.SortBarVisible = .T.
	.MarkSearchColumn = .F.
	with .Columns
		.Add("Tasks")
		with .Add("Start")
			.Def(18) = 1
			.DisplayFilterDate = .T.
			.DisplayFilterPattern = .F.
			.FilterList = 8448 && FilterListEnum.exShowExclude Or FilterListEnum.exShowCheckBox
			.Visible = .F.
		endwith
		with .Add("End")
			.Def(18) = 2
			.DisplayFilterDate = .T.
			.DisplayFilterPattern = .F.
			.Visible = .F.
			.FilterList = 8448 && FilterListEnum.exShowExclude Or FilterListEnum.exShowCheckBox
			.Visible = .F.
		endwith
	endwith
	with .Chart
		.FirstVisibleDate = {^2006-9-20}
		.LevelCount = 2
		.PaneWidth(0) = 128
	endwith
	with .Items
		.AllowCellValueToItemBar = .T.
		.AddBar(.AddItem("Task 1"),"Task",{^2006-9-21},{^2006-9-27})
		.AddBar(.AddItem("Task 2"),"Task",{^2006-9-22},{^2006-9-28})
		.AddBar(.AddItem("Task 3"),"Task",{^2006-9-22},{^2006-9-28})
		.AddBar(.AddItem("Task 4"),"Task",{^2006-9-23},{^2006-9-29})
		.AddBar(.AddItem("Task 5"),"Task",{^2006-9-25},{^2006-9-29})
		.AddBar(.AddItem("Task 6"),"Task",{^2006-9-26},{^2006-9-30})
	endwith
	.EndUpdate
endwith
1739:
How do I enable the Group-By feature

*** AddGroupItem event - Occurs after a new Group Item has been inserted to Items collection. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.ItemBackColor(Item) = RGB(240,240,240)
			thisform.G2antt1.Chart.ItemBackColor(Item) = RGB(240,240,240)
			.ItemDividerLine(Item) = 0
			.AddBar(Item,"Summary",.CellValue(Item,1),.CellValue(Item,2))
			.DefineSummaryBars(Item,"",-3,"")
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	.AllowGroupBy = .T.
	.SortBarVisible = .T.
	.MarkSearchColumn = .F.
	with .Columns
		.Add("Tasks")
		with .Add("Start")
			.Def(18) = 1
			.AllowGroupBy = .F.
		endwith
		with .Add("End")
			.Def(18) = 2
			.AllowGroupBy = .F.
		endwith
	endwith
	with .Chart
		.FirstVisibleDate = {^2006-9-20}
		.LevelCount = 2
		.PaneWidth(0) = 256
	endwith
	with .Items
		.AllowCellValueToItemBar = .T.
		.AddBar(.AddItem("Task 1"),"Task",{^2006-9-21},{^2006-9-27})
		.AddBar(.AddItem("Task 1"),"Task",{^2006-9-22},{^2006-9-28})
		.AddBar(.AddItem("Task 2"),"Task",{^2006-9-22},{^2006-9-28})
		.AddBar(.AddItem("Task 2"),"Task",{^2006-9-23},{^2006-9-29})
		.AddBar(.AddItem("Task 3"),"Task",{^2006-9-25},{^2006-9-29})
		.AddBar(.AddItem("Task 3"),"Task",{^2006-9-26},{^2006-9-30})
	endwith
	.Columns.Item(0).SortOrder = 1
	.EndUpdate
endwith
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. ***
LPARAMETERS nop
	with thisform.G2antt1
		with .Items
			DEBUGOUT( .CellCaption(.FocusItem,0) )
			DEBUGOUT( .ItemBar(.FocusItem,"",258) )
		endwith
	endwith

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

*** MouseMove event - Occurs when the user moves the mouse. ***
LPARAMETERS Button,Shift,X,Y
	with thisform.G2antt1
		h = .ItemFromPoint(-1,-1,c,hit)
		d = .Chart.DateFromPoint(-1,-1)
		DEBUGOUT( d )
		DEBUGOUT( .Chart.IsNonworkingDate(d,h) )
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("NonWorking")
	with .Chart
		.FirstWeekDay = 1
		.FirstVisibleDate = {^2008-1-24}
		.PaneWidth(0) = 64
		.LevelCount = 2
	endwith
	with .Items
		h = .AddItem("Default")
		h = .AddItem("January")
		.ItemNonworkingUnits(h,.F.) = "month(value) = 1"
		h = .AddItem("February, Saturday, Sunday")
		.ItemNonworkingUnits(h,.F.) = "month(value) = 2 or (weekday(value) = 0 or weekday(value) = 6)"
		h = .AddItem("Sunday")
		.ItemNonworkingUnits(h,.F.) = "weekday(value) = 0"
	endwith
	.EndUpdate
endwith
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. ***
LPARAMETERS Item,ColIndex,NewValue
	with thisform.G2antt1
		.Refresh
	endwith

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 64
		with .Bars.Item("Task")
			.Def(3) = "<fgcolor=808080><%=%C0%>"
			.Def(4) = 18
		endwith
	endwith
	with .Columns.Add("Task").Editor
		.EditType = 3
		.AddItem(1,"Aka")
		.AddItem(2,"Baka")
		.AddItem(3,"Taka")
	endwith
	with .Items
		.AddBar(.AddItem(1),"Task",{^2001-1-2},{^2001-1-5})
		.AddBar(.AddItem(2),"Task",{^2001-1-3},{^2001-1-6})
		.AddBar(.AddItem(3),"Task",{^2001-1-4},{^2001-1-7})
	endwith
	.EndUpdate
endwith
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 thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Tasks")
	with .Columns.Add("Effort")
		.Def(18) = 21
		.Editor.EditType = 4
	endwith
	with .Chart
		.LevelCount = 2
		.NonworkingDays = 0
		.PaneWidth(0) = 96
		.FirstVisibleDate = {^2005-6-20}
		.HistogramVisible = .T.
		.HistogramHeight = 128
		.HistogramView = 112
		with .Bars.Item("Task")
			.HistogramPattern = .Pattern && .Pattern
			.HistogramType = 0
			.HistogramCriticalValue = 3
			.ShowHistogramValues = "value>3?255:1"
			.HistogramItems = -11
			.HistogramGridLinesColor = RGB(192,192,192)
			.HistogramRulerLinesColor = RGB(0,0,1)
			.FormatHistogramValues = "(value format `0`) + ` units`"
		endwith
	endwith
	with .Items
		.AllowCellValueToItemBar = .T.
		h1 = .AddItem("Task 1")
		.AddBar(h1,"Task",{^2005-6-21},{^2005-6-23})
		.CellValue(h1,1) = 6.79
		h1 = .AddItem("Task 2")
		.AddBar(h1,"Task",{^2005-6-24},{^2005-6-26})
		.CellValue(h1,1) = 3.19
		h1 = .AddItem("Task 3")
		.AddBar(h1,"Task",{^2005-6-27},{^2005-6-29})
		.CellValue(h1,1) = 2
		h1 = .AddItem("Task 4")
		.AddBar(h1,"Task",{^2005-6-30},{^2005-7-2})
		.CellValue(h1,1) = 1
	endwith
	.EndUpdate
endwith
1734:
How can I create a relative time-scale

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

with thisform.G2antt1
	.BeginUpdate
	.DefaultItemHeight = 32
	with .VisualAppearance
		var_s = "gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYED"
		var_s = var_s + "GHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XzAcj3dbmAYJQzBJ"
		var_s = var_s + "LxKSIDwCd6NXrCOJ5HhWDzjQjJMozLC8YiPG6fZRbeT4ToGNdXYhJWiyLiFeYtVzSMj1fD9Ir/EakbLtey4Lq2A53RzdHThSQpCwPA4BgIA="
		.Add(1,var_s)
		var_s1 = "gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYED"
		var_s1 = var_s1 + "GHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NrXHZ9YwTOC5IDke67cr2J53XZAd4QTb2Cz7QC8Q"
		var_s1 = var_s1 + "AvDA7awafM1MSuHIcOw/AqTYDkTq4XjODYhTDEc4zPLcFx/I6haBoWCSLi+T5VVrRMo1TKtRxnNaubZqO5aRrGe5NW6EXThSQpCr+f4BgIA="
		.Add(2,var_s1)
		var_s2 = "gBFLBCJwBAEHhEJAADhABcMIQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYED"
		var_s2 = var_s2 + "GHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XxfV6YBa8B4JPaEZ"
		var_s2 = var_s2 + "LwLB7dwaf6IQLiWLYHiAAYZRKTcxlDI8AwvFaaZjnWA5ZaOMZBU7RNRyHR9IyTDaWaTqeqbHIuJ4FUzaNY2fZrOz2F6FAA6cKSFIWFYVAMBA"
		.Add(3,var_s2)
		var_s3 = "gBFLBCJwBAEHhEJAADhABb8IQAAYAQGKIYBkAKBQAGaAoDDUMQyQwAAyDAK8EwsACEIrAAJoaAAPoJRDGMTvfIgARIf6MIRAeCYFDAJQtDCMICwSKsXBaGwBJYGGaYED"
		var_s3 = var_s3 + "GHQATxKM7wGBcEyLDSgXZDQRAAoqTI/SICEIlAZJRjoOo5DJGGQmChkQhNVzGQzQSJFDTNAaEAwidDJCoOGgkBw7NwXFaNZznBK7LpvK5HNrie55XxfV6YBa8B4JPaEZ"
		var_s3 = var_s3 + "LwLB7dwaf6IQLiWLYHiAAYBIbJI5yeb5Hx3HqfZjbeSxVoML43SzHcByGRcTwzC6pYjrGoZJpWZ4ZQrbNR3DZ8VzzNTrQxIUhYVhUAkB"
		.Add(4,var_s3)
		.RenderType = -16777216
	endwith
	with .Chart
		.PaneWidth(0) = 164
		.FirstVisibleDate = {^2001-1-1}
		.NonworkingDaysColor = RGB(240,240,240)
		.NonworkingDaysPattern = 6
		with .Bars.Item("Task")
			.Height = 17
			.Color = RGB(255,255,255)
			.Pattern = 1
			.Def(51) = 1
		endwith
	endwith
	.Columns.Add("Column")
	with .Items
		.AddBar(.AddItem("Task"),"Task",{^2001-1-2},{^2001-1-6},"")
		h = .AddItem("Task+Rhombus(red)")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-7},"")
		.ItemBar(h,"",53) = "none[(100%-11,50%-6,11,11),back=0x10000FF]"
		.ItemBar(h,"",55) = ",,5"
		h = .AddItem("Rhombus(red)+Task")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-8},"")
		.ItemBar(h,"",53) = "none[(0,50%-6,11,11),back=0x10000FF]"
		.ItemBar(h,"",55) = "-5"
		h = .AddItem("Task(yellow)+Rhombus(blue)")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-9},"")
		.ItemBar(h,"",53) = "none[(100%-11,50%-6,11,11),back=0x1FF0000]"
		.ItemBar(h,"",55) = ",,5"
		.ItemBar(h,"",33) = 65535
		h = .AddItem("Rhombus(blue)+Task(yellow)")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-8},"")
		.ItemBar(h,"",53) = "none[(0,50%-6,11,11),back=0x1FF0000]"
		.ItemBar(h,"",55) = "-5"
		.ItemBar(h,"",33) = 65535
		h = .AddItem("TriangleUp(white)+Task")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-7},"")
		.ItemBar(h,"",53) = "none[(0,50%-6,11,11),back=0x2FFFFFF]"
		.ItemBar(h,"",55) = "-5"
		h = .AddItem("TriangleUp(blue)+Task(magenta)+TriangleDown(red)")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-6},"")
		.ItemBar(h,"",53) = "none[(0,50%-6,11,11),back=0x02FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]"
		.ItemBar(h,"",55) = "-5,0,5,0"
		.ItemBar(h,"",33) = 16744703
		h = .AddItem("Rhombus+Task+TriangleDown")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-7},"")
		.ItemBar(h,"",53) = "none[(0,50%-6,11,11),back=0x01FF0000],none[(100%-11,50%-6,11,11),back=0x030000FF]"
		.ItemBar(h,"",55) = "-5, 0,5,0"
		.ItemBar(h,"",33) = 16744448
		h = .AddItem("Rhombus+Task+TriangleDown")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-8},"")
		.ItemBar(h,"",53) = "none[(50%-6,0,11,11),back=0x01FF0000],none[(50%-6,100%-11,11,11),back=0x010000FF]"
		.ItemBar(h,"",55) = "0,-5,0,5"
		h = .AddItem("Task+Star")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-9},"")
		.ItemBar(h,"",53) = "none[(100%-11,0,11,11),back=0x4FFFFFF]"
		.ItemBar(h,"",55) = 5
		h = .AddItem("Star+Task")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-8},"")
		.ItemBar(h,"",53) = "none[(0,100%-11,11,11),back=0x04FFFFFF]"
		.ItemBar(h,"",55) = 5
		h = .AddItem("Task+Star")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-7},"")
		.ItemBar(h,"",53) = "none[(100%-11,0,11,11),back=0x4FFFFFF]"
		.ItemBar(h,"",55) = "0,-6,14"
	endwith
	.EndUpdate
endwith
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 thisform.G2antt1
	.BeginUpdate
	with .VisualAppearance
		var_s = "gBFLBCJwBAEHhEJAADhABXMIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EQLhGBRQCULQxDCBMIjLJoWhsASVRhnCBBRh"
		var_s = var_s + "wAI7ShPUBgXBNCQzICTJJkSJZBiECIJFAaJhnIapZDKGKQWCjAgiNpqGQ2QiKFC2HAcEAxCxGJBoKKZGq2bpJQLbdxUXRVZzpNi7Louay5CrOCZvXxaeAXDa+Az5ODDM"
		var_s = var_s + "RwLBcKhzCKDYzfdrZFaWFT3Qi8aCvG6sbw/HZ0OrEEIwCEBA"
		.Add(1,var_s)
		.Add(2,"CP:1 0 0 5 0")
		var_s1 = "gBFLBCJwBAEHhEJAADhABUEIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLIxhEYobgmGIaRiBMIxAKIZhzEgYRoiAYhXDiHwxARHUgRfIEOwHDiBZomWKZEi"
		var_s1 = var_s1 + "aKIqRrLMryFLMZx3CqcAApGaqHiOCYlSbTcoyfJYZBzD6mKJpWipWheW48U7PVRDJSkNysASZIyrGKqJouX4WR7BcZgNR4YBgEoWRouSBLWrgNIVR6/eBABZFPzbNK3Z"
		var_s1 = var_s1 + "zdOIIJgEgIA="
		.Add(3,var_s1)
		.RenderType = -16777216
	endwith
	with .Chart
		.PaneWidth(0) = 164
		.FirstVisibleDate = {^2001-1-1}
		.Bars.Item("Task").Color = 0x3ff0000
		.Bars.Copy("Task","NewTask").Height = 15
	endwith
	.Columns.Add("Column")
	with .Items
		h = .AddItem("Task")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-6})
		.AddBar(h,"NewTask",{^2001-1-8},{^2001-1-12},"new")
		h = .AddItem("Task+Rhombus")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-6})
		.ItemBar(h,"",51) = 33554432
		.AddBar(h,"NewTask",{^2001-1-8},{^2001-1-12},"new")
		.ItemBar(h,"new",51) = 33554432
		h = .AddItem("Task/Color+Rhombus")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-6})
		.ItemBar(h,"",51) = 33554687
		.ItemBar(h,"",33) = 65280
		.AddBar(h,"NewTask",{^2001-1-8},{^2001-1-12},"new")
		.ItemBar(h,"new",51) = 33554687
		.ItemBar(h,"new",33) = 65280
		h = .AddItem("Task/Color+Rhombus/Color")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-6})
		.ItemBar(h,"",51) = 33619712
		.ItemBar(h,"",33) = 16711935
		.AddBar(h,"NewTask",{^2001-1-8},{^2001-1-12},"new")
		.ItemBar(h,"new",51) = 33619712
		.ItemBar(h,"new",33) = 16711935
	endwith
	.EndUpdate
endwith
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 thisform.G2antt1
	.BeginUpdate
	with .VisualAppearance
		var_s = "gBFLBCJwBAEHhEJAADhABWkIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EZBGABYJDUMAlCyNQBQSKIYxnAgYY4ACZ5Ij"
		var_s = var_s + "qAwLQjQEYzZI0SxJCqQZBBCCSQKkYx0HScRijDILBQwIQmaqjEZoJCiQZfQLCAYRMhkQx9DKTLRtKhYDqubpHUZbdwWRaVYTlM6RLbhGy7YqefJtXLfN4WZgWCz9QLDI"
		var_s = var_s + "4wS78JruaqOW5hVz4BasfTrOzLcTzG4HLhCCYBgI"
		.Add(1,var_s)
		.Add(2,"CP:1 -6 0 0 0")
		.RenderType = -16777216
	endwith
	with .Chart
		.PaneWidth(0) = 164
		.FirstVisibleDate = {^2001-1-1}
	endwith
	.Columns.Add("Column")
	with .Items
		h = .AddItem("Task")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-6})
		h = .AddItem("Task+Rhombus")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-6})
		.ItemBar(h,"",51) = 33554432
		h = .AddItem("Task/Color+Rhombus")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-6})
		.ItemBar(h,"",51) = 33554687
		.ItemBar(h,"",33) = 65280
		h = .AddItem("Task/Color+Rhombus/Color")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-6})
		.ItemBar(h,"",51) = 33619712
		.ItemBar(h,"",33) = 16711935
	endwith
	.EndUpdate
endwith
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 thisform.G2antt1
	.BeginUpdate
	with .VisualAppearance
		var_s = "gBFLBCJwBAEHhEJAADhABWkIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EZBGABYJDUMAlCyNQBQSKIYxnAgYY4ACZ5Ij"
		var_s = var_s + "qAwLQjQEYzZI0SxJCqQZBBCCSQKkYx0HScRijDILBQwIQmaqjEZoJCiQZfQLCAYRMhkQx9DKTLRtKhYDqubpHUZbdwWRaVYTlM6RLbhGy7YqefJtXLfN4WZgWCz9QLDI"
		var_s = var_s + "4wS78JruaqOW5hVz4BasfTrOzLcTzG4HLhCCYBgI"
		.Add(1,var_s)
		.Add(2,"CP:1 -6 0 0 0")
	endwith
	with .Chart
		.PaneWidth(0) = 164
		.FirstVisibleDate = {^2001-1-1}
	endwith
	.Columns.Add("Column")
	with .Items
		h = .AddItem("Task")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-6})
		h = .AddItem("Task+Rhombus")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-6})
		.ItemBar(h,"",51) = 33554432
		h = .AddItem("Task/Color+Rhombus")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-6})
		.ItemBar(h,"",51) = 33554432
		.ItemBar(h,"",33) = 65280
		h = .AddItem("Task/Color+Rhombus/Color")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-6})
		.ItemBar(h,"",51) = 33619712
		.ItemBar(h,"",33) = 16711935
	endwith
	.EndUpdate
endwith
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 thisform.G2antt1
	.BeginUpdate
	with .VisualAppearance
		var_s = "gBFLBCJwBAEHhEJAADhABXMIQAAYAQGKIYBkAKBQAGaAoDDWDoMAANAyjPBMKgBBCLAACaKQAD6CYQRhFT7yGAERr/C6EQLhGBRQCULQxDCBMIjLJoWhsASVRhnCBBRh"
		var_s = var_s + "wAI7ShPUBgXBNCQzICTJJkSJZBiECIJFAaJhnIapZDKGKQWCjAgiNpqGQ2QiKFC2HAcEAxCxGJBoKKZGq2bpJQLbdxUXRVZzpNi7Louay5CrOCZvXxaeAXDa+Az5ODDM"
		var_s = var_s + "RwLBcKhzCKDYzfdrZFaWFT3Qi8aCvG6sbw/HZ0OrEEIwCEBA"
		.Add(1,var_s)
		.Add(2,"CP:1 0 0 6 0")
	endwith
	with .Chart
		.PaneWidth(0) = 164
		.FirstVisibleDate = {^2001-1-1}
	endwith
	.Columns.Add("Column")
	with .Items
		h = .AddItem("Task")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-6})
		h = .AddItem("Task+Rhombus")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-6})
		.ItemBar(h,"",51) = 33554432
		h = .AddItem("Task/Color+Rhombus")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-6})
		.ItemBar(h,"",51) = 33554432
		.ItemBar(h,"",33) = 65280
		h = .AddItem("Task/Color+Rhombus/Color")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-6})
		.ItemBar(h,"",51) = 33619712
		.ItemBar(h,"",33) = 16711935
	endwith
	.EndUpdate
endwith
1728:
Is it possible to resize a column with the mouse without changing the width of the next column

with thisform.G2antt1
	.BeginUpdate
	.ColumnAutoResize = .F.
	.Columns.Add("Column 1").Width = 256
	.Columns.Add("Column 2").Width = 512
	.DrawGridLines = -1
	.EndUpdate
endwith
1727:
How can I align captions of items with checkbox, with items with no checkbox

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Default")
	with .Items
		.CellImages(.AddItem(0),0) = "1"
		.CellHasCheckBox(.AddItem(1),0) = .T.
		.CellImages(.AddItem(2),0) = "1"
	endwith
	.EndUpdate
endwith
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. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Summary",.CellValue(Item,2),.CellValue(Item,4))
			.DefineSummaryBars(Item,"",-3,"")
		endwith
	endwith

*** AddItem event - Occurs after a new Item has been inserted to Items collection. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

*** LayoutChanged event - Occurs when column's position or column's size is changed. ***
LPARAMETERS nop
	with thisform.G2antt1
		.Refresh
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Chart.FirstVisibleDate = {^1994-9-1}
	.Chart.PaneWidth(0) = 312
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = .F.
	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)
	endwith
	.DataSource = rs
	.Items.AllowCellValueToItemBar = .T.
	.Columns.Item(2).Def(18) = 1
	.Columns.Item(4).Def(18) = 2
	.SortBarVisible = .T.
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = .T.
	.Columns.Item(1).SortOrder = 1
	with .Columns.Add("Position")
		.FormatColumn = "(0:= (1 rpos '')) right ( ( 1:= ( =:0 rfind `.` ) ) != -1 ? =:1 : len(=:0))"
		.Visible = .F.
	endwith
	with .Columns.Add("Position")
		.FormatColumn = "(1 rpos '') contains '.'"
		.Visible = .F.
	endwith
	.ConditionalFormats.Add("(%C13 mod 2) != 0").BackColor = RGB(240,240,240)
	.ConditionalFormats.Add("%C14 = 0").BackColor = RGB(190,190,190)
	.EndUpdate
endwith
1725:
What is the difference between %0 and %C0, when using in expressions ( format, conditional format, computed fields, and so on )

with thisform.G2antt1
	.BeginUpdate
	.Chart.PaneWidth(1) = 0
	.HeaderAppearance = 4
	.HeaderHeight = 24
	.ScrollBySingleLine = .T.
	.DrawGridLines = -2
	.Columns.Add("Value").Def(17) = 1
	with .Columns.Add("FormatColumn = `%0` ~ CellValue")
		.FormatColumn = "%0"
		.Def(16) = .F.
	endwith
	with .Columns.Add("FormatColumn = `%C0`~ CellCaption")
		.FormatColumn = "%C0"
		.Def(16) = .F.
	endwith
	with .Items
		.AddItem(1.1234)
		.CellValueFormat(.AddItem("<sha ;;0>This <fgcolor=FF0000>is a <s><b>HTM</fgcolor>L</b> text</s>."),0) = 1
		with .CellEditor(.AddItem(3))
			.EditType = 6
			.AddItem(1,"Border")
			.AddItem(2,"Thick")
			.AddItem(4,"Shadow")
		endwith
		.FormatCell(.AddItem(10000),0) = "`<b>` + currency(value)"
	endwith
	.EndUpdate
endwith
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. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Summary",.CellValue(Item,2),.CellValue(Item,4))
			.DefineSummaryBars(Item,"",-3,"")
		endwith
	endwith

*** AddItem event - Occurs after a new Item has been inserted to Items collection. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

*** LayoutChanged event - Occurs when column's position or column's size is changed. ***
LPARAMETERS nop
	with thisform.G2antt1
		.Refresh
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Chart.FirstVisibleDate = {^1994-9-1}
	.Chart.PaneWidth(0) = 312
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = .F.
	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)
	endwith
	.DataSource = rs
	.Items.AllowCellValueToItemBar = .T.
	.Columns.Item(2).Def(18) = 1
	.Columns.Item(4).Def(18) = 2
	.SortBarVisible = .T.
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = .T.
	.Columns.Item(1).SortOrder = 1
	with .Columns.Add("Position")
		.FormatColumn = "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
		.Visible = .F.
	endwith
	with .Columns.Add("Position")
		.FormatColumn = "(1 rpos '') contains '.'"
		.Visible = .F.
	endwith
	.ConditionalFormats.Add("(%C13 mod 2) != 0").BackColor = RGB(240,240,240)
	.ConditionalFormats.Add("%C14 = 0").BackColor = RGB(190,190,190)
	.EndUpdate
endwith
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. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.ItemBackColor(Item) = RGB(190,190,190)
			.AddBar(Item,"Summary",.CellValue(Item,2),.CellValue(Item,4))
			.DefineSummaryBars(Item,"",-3,"")
		endwith
	endwith

*** AddItem event - Occurs after a new Item has been inserted to Items collection. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

*** LayoutChanged event - Occurs when column's position or column's size is changed. ***
LPARAMETERS nop
	with thisform.G2antt1
		.Refresh
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Chart.FirstVisibleDate = {^1994-9-1}
	.Chart.PaneWidth(0) = 312
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = .F.
	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)
	endwith
	.DataSource = rs
	.Items.AllowCellValueToItemBar = .T.
	.Columns.Item(2).Def(18) = 1
	.Columns.Item(4).Def(18) = 2
	.SortBarVisible = .T.
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = .T.
	.Columns.Item(1).SortOrder = 1
	.EndUpdate
endwith
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. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Summary",.CellValue(Item,2),.CellValue(Item,4))
			.DefineSummaryBars(Item,"",-3,"")
		endwith
	endwith

*** AddItem event - Occurs after a new Item has been inserted to Items collection. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

*** LayoutChanged event - Occurs when column's position or column's size is changed. ***
LPARAMETERS nop
	with thisform.G2antt1
		.Refresh
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Chart.FirstVisibleDate = {^1994-9-1}
	.Chart.PaneWidth(0) = 312
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = .F.
	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)
	endwith
	.DataSource = rs
	.Items.AllowCellValueToItemBar = .T.
	.Columns.Item(2).Def(18) = 1
	.Columns.Item(4).Def(18) = 2
	.SortBarVisible = .T.
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = .T.
	.Columns.Item(1).SortOrder = 1
	with .Columns.Add("Position")
		.FormatColumn = "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
		.Visible = .F.
	endwith
	with .Columns.Add("Position")
		.FormatColumn = "(1 rpos '') contains '.'"
		.Visible = .F.
	endwith
	.ConditionalFormats.Add("%C14 = 0").BackColor = RGB(190,190,190)
	.EndUpdate
endwith
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. ***
LPARAMETERS nop
	with thisform.G2antt1
		.Refresh
	endwith

*** Sort event - Fired when the control sorts a column. ***
LPARAMETERS nop
	with thisform.G2antt1
		.Refresh
	endwith

with thisform.G2antt1
	.BeginUpdate
	.LinesAtRoot = -1
	with .Columns.Add("P1")
		.Def(0) = .T.
		.PartialCheck = .T.
	endwith
	.Chart.PaneWidth(1) = 0
	with .Columns.Add("P2")
		.Def(0) = .T.
		.PartialCheck = .T.
	endwith
	with .Items
		h = .AddItem("Root 1")
		.InsertItem(h,Null,"Child 1")
		.InsertItem(h,Null,"Child 2")
		.ExpandItem(h) = .T.
		h = .AddItem("Root 2")
		.InsertItem(h,Null,"Child 1")
		.InsertItem(h,Null,"Child 2")
		.ExpandItem(h) = .T.
		h = .AddItem("Root 2")
		.InsertItem(h,Null,"Child 1")
		.InsertItem(h,Null,"Child 2")
		.ExpandItem(h) = .T.
	endwith
	with .Columns.Add("Position")
		.FormatColumn = "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
		.Visible = .F.
	endwith
	.ConditionalFormats.Add("(%C2 mod 2) != 0").BackColor = RGB(240,240,240)
	.EndUpdate
endwith
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. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

*** LayoutChanged event - Occurs when column's position or column's size is changed. ***
LPARAMETERS nop
	with thisform.G2antt1
		.Refresh
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Chart.FirstVisibleDate = {^1994-9-1}
	.Chart.PaneWidth(0) = 312
	.ColumnAutoResize = .F.
	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)
	endwith
	.DataSource = rs
	.Items.AllowCellValueToItemBar = .T.
	.Columns.Item(2).Def(18) = 1
	.Columns.Item(4).Def(18) = 2
	.Columns.Item(1).SortOrder = 1
	with .Columns.Add("Position")
		.FormatColumn = "1 apos ''"
		.Visible = .F.
	endwith
	.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
endwith
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. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

*** LayoutChanged event - Occurs when column's position or column's size is changed. ***
LPARAMETERS nop
	with thisform.G2antt1
		.Refresh
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Chart.FirstVisibleDate = {^1994-9-1}
	.Chart.PaneWidth(0) = 312
	.ColumnAutoResize = .F.
	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)
	endwith
	.DataSource = rs
	.Items.AllowCellValueToItemBar = .T.
	.Columns.Item(2).Def(18) = 1
	.Columns.Item(4).Def(18) = 2
	.Columns.Item(1).SortOrder = 1
	with .Columns.Add("Position")
		.FormatColumn = "1 apos ''"
		.Visible = .F.
	endwith
	.ConditionalFormats.Add("(%C13 mod 4) = 0").BackColor = RGB(240,240,240)
	.EndUpdate
endwith
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. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Summary",.CellValue(Item,2),.CellValue(Item,4))
			.DefineSummaryBars(Item,"",-3,"")
		endwith
	endwith

*** AddItem event - Occurs after a new Item has been inserted to Items collection. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

*** LayoutChanged event - Occurs when column's position or column's size is changed. ***
LPARAMETERS nop
	with thisform.G2antt1
		.Refresh
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Chart.FirstVisibleDate = {^1994-9-1}
	.Chart.PaneWidth(0) = 312
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = .F.
	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)
	endwith
	.DataSource = rs
	.Items.AllowCellValueToItemBar = .T.
	.Columns.Item(2).Def(18) = 1
	.Columns.Item(4).Def(18) = 2
	.SortBarVisible = .T.
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = .T.
	.Columns.Item(1).SortOrder = 1
	with .Columns.Add("Position")
		.FormatColumn = "(0:= (1 rpos '')) left ( ( 1:= ( =:0 lfind `.` ) ) != -1 ? =:1 : len(=:0))"
		.Visible = .F.
	endwith
	.ConditionalFormats.Add("(%C13 mod 2) != 0").BackColor = RGB(240,240,240)
	.EndUpdate
endwith
1717:
How do I show the chart's labels in 24-hour clock format

with thisform.G2antt1
	with .Chart
		.PaneWidth(0) = 0
		.FirstVisibleDate = {^2001-1-1}
		.LevelCount = 3
		with .Level(0)
			.Label = "<%mmm%> <%d%>, <%yyyy%>"
			.Alignment = 17 && AlignmentEnum.exHOutside Or AlignmentEnum.CenterAlignment
			.Unit = 4096
		endwith
		with .Level(1)
			.Label = "<b><%h%>:00</b>"
			.Alignment = 1
			.Unit = 65536
			.DrawTickLines = .T.
			.DrawGridLines = .T.
		endwith
		with .Level(2)
			.Label = "<%nn%>"
			.Unit = 1048576
			.Count = 15
		endwith
		.ScrollTo({^2001-1-1 8:30:00},0)
	endwith
endwith
1716:
How do I show the chart's labels in 12-hour clock format

with thisform.G2antt1
	with .Chart
		.PaneWidth(0) = 0
		.FirstVisibleDate = {^2001-1-1}
		.LevelCount = 3
		with .Level(0)
			.Label = "<%mmm%> <%d%>, <%yyyy%>"
			.Alignment = 17 && AlignmentEnum.exHOutside Or AlignmentEnum.CenterAlignment
			.Unit = 4096
		endwith
		with .Level(1)
			.Label = "<b><%h%>:00</b> <%AM/PM%>"
			.Alignment = 1
			.Unit = 65536
			.DrawTickLines = .T.
			.DrawGridLines = .T.
		endwith
		with .Level(2)
			.Label = "<%nn%>"
			.Unit = 1048576
			.Count = 15
		endwith
		.ScrollTo({^2001-1-1 8:30:00},0)
	endwith
endwith
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. ***
LPARAMETERS KeyAscii
	with thisform.G2antt1
		DEBUGOUT( "if .Editying != 0 then" )
		DEBUGOUT( .Editing )
		KeyAscii = 0
	endwith

with thisform.G2antt1
	.BeginUpdate
	with .Columns
		.Add("Tasks")
		with .Add("Start")
			.Def(18) = 1
			.Editor.EditType = 7
		endwith
		with .Add("End")
			.Def(18) = 2
			.Editor.EditType = 7
		endwith
	endwith
	with .Chart
		.FirstVisibleDate = {^2006-9-20}
		.AllowLinkBars = .T.
		.AllowCreateBar = 0
		.LevelCount = 2
		.PaneWidth(0) = 196
	endwith
	with .Items
		.AllowCellValueToItemBar = .T.
		.AddBar(.AddItem("Task 1"),"Task",{^2006-9-21},{^2006-9-24})
		.AddBar(.AddItem("Task 2"),"Task",{^2006-9-22},{^2006-9-25})
		.AddBar(.AddItem("Task 3"),"Task",{^2006-9-23},{^2006-9-26})
	endwith
	.EndUpdate
endwith
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. ***
LPARAMETERS nop
	with thisform.G2antt1
		with .Chart
			.ScrollTo({^2001-1-1},1)
			DEBUGOUT( "Start" )
			DEBUGOUT( .StartPrintDate )
			DEBUGOUT( "End" )
			DEBUGOUT( .EndPrintDate )
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.PaneWidth(0) = 128
		.LevelCount = 2
		.OverviewVisible = 2
		.AllowOverviewZoom = 1
		.Label(16777216) = ""
		.Label(1048576) = ""
		.Label(65536) = ""
		.UnitScale = 4096
		.ScrollTo({^2001-1-1},1)
		.MarkTimeZone("zone",{^2001-1-1},{^2001-1-2},10516548)
	endwith
	.Columns.Add("Default")
	with .Items
		.AddBar(.AddItem("Item 1"),"Task",{^2000-12-15},{^2001-1-10})
		.AddBar(.AddItem("Item 2"),"Task",{^2001-1-1},{^2001-1-5})
	endwith
	.EndUpdate
endwith
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 thisform.G2antt1
	with .Chart
		.PaneWidth(0) = 128
		.LevelCount = 2
		.OverviewVisible = 2
		.AllowOverviewZoom = 1
		.Label(16777216) = ""
		.Label(1048576) = ""
		.Label(65536) = ""
		.UnitScale = 4096
	endwith
endwith
1712:
How to sort numerically by columns

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Numeric").SortType = 1
	with .Items
		.AddItem(1)
		.AddItem(2)
		.AddItem(12)
		.AddItem(22)
	endwith
	.Columns.Item(0).SortOrder = 1
	.EndUpdate
endwith
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. ***
LPARAMETERS Button,Shift,X,Y
	*** Items.EnsureVisibleItem(ItemFromPoint(-1,-1,c,hit))

with thisform.G2antt1
	.BeginUpdate
	.TreeColumnIndex = -1
	.SelForeColor = .ForeColor
	with .Columns.Add("Buttons")
		.Alignment = 1
		.Def(2) = .T.
	endwith
	with .Items
		.AddItem("Button A")
		.AddItem("Button B")
		.AddItem("Button C")
	endwith
	.EndUpdate
endwith
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. ***
LPARAMETERS nop
	with thisform.G2antt1
		DEBUGOUT( .Chart.UnitScale )
		.EnsureVisibleColumn(0)
		with .Chart
			.Level(0).DrawTickLines = 0
			.ScrollTo({^2015-11-18},1)
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.FirstVisibleDate = {^2015-11-18}
		.PaneWidth(0) = 0
		.LevelCount = 2
		.DrawLevelSeparator = 2
		with .Level(0)
			.Alignment = 17 && AlignmentEnum.exHOutside Or AlignmentEnum.CenterAlignment
			.DrawTickLines = 2
			.BackColor = thisform.G2antt1.BackColor
		endwith
		with .Level(1)
			.DrawTickLines = 65 && LevelLineEnum.exLevelMiddleLine Or LevelLineEnum.exLevelDotLine
			.DrawTickLinesFrom(0,2)
		endwith
		.OverviewVisible = 2
		.AllowOverviewZoom = 1
		.UnitWidth = 24
		.Label(16777216) = ""
		.Label(1048576) = ""
		.Label(65536) = ""
		.Label(256) = ""
		.Label(4096) = "<|><%d%><|><%d3%>, <%m3%> <%d%>, '<%yy%><|><%dddd%>, <%mmmm%> <%d%>, <%yyyy%><||><||>4096"
		.UnitScale = 4096
		.ScrollTo(.FirstVisibleDate,1)
	endwith
	.Columns.Add("Default")
	.EndUpdate
endwith
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. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Summary",.CellValue(Item,2),.CellValue(Item,4))
			.DefineSummaryBars(Item,"",-3,"")
		endwith
	endwith

*** AddItem event - Occurs after a new Item has been inserted to Items collection. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Chart.FirstVisibleDate = {^1994-9-1}
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = .F.
	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)
	endwith
	.DataSource = rs
	.SortBarVisible = .T.
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = .T.
	.Columns.Item(1).SortOrder = 1
	.EndUpdate
endwith
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. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Chart.FirstVisibleDate = {^1994-9-1}
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = .F.
	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)
	endwith
	.DataSource = rs
	.SortBarVisible = .T.
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = .T.
	.Chart.ShowCollapsedBars = .T.
	.EndUpdate
	.Layout = "multiplesort="+chr(34)+"C1:1"+chr(34)+";collapse="+chr(34)+"0-9999"+chr(34)+""
endwith
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. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Chart.FirstVisibleDate = {^1994-9-1}
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = .F.
	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)
	endwith
	.DataSource = rs
	.SortBarVisible = .T.
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = .T.
	.Columns.Item(1).SortOrder = 1
	.EndUpdate
	.BeginUpdate
	.EnsureVisibleColumn(0)
	.Items.ExpandItem(0) = .F.
	.EndUpdate
endwith
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. ***
LPARAMETERS Item
	with thisform.G2antt1
		.Items.ExpandItem(Item) = .F.
	endwith

*** AddItem event - Occurs after a new Item has been inserted to Items collection. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Chart.FirstVisibleDate = {^1994-9-1}
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = .F.
	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)
	endwith
	.DataSource = rs
	.SortBarVisible = .T.
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = .T.
	.Columns.Item(1).SortOrder = 1
	.EndUpdate
endwith
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. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Chart.FirstVisibleDate = {^1994-9-1}
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = .F.
	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)
	endwith
	.DataSource = rs
	.SortBarVisible = .T.
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = .T.
	.Columns.Item(1).SortOrder = 1
	.EndUpdate
	.EnsureVisibleColumn(0)
	.BeginUpdate
	with .Items
		.ExpandItem(.RootItem(0)) = .F.
		.ExpandItem(.RootItem(1)) = .F.
		.ExpandItem(.RootItem(2)) = .F.
	endwith
	.EndUpdate
endwith
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. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Chart.FirstVisibleDate = {^1994-9-1}
	.BackColorSortBar = .BackColor
	.ColumnAutoResize = .F.
	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)
	endwith
	.DataSource = rs
	.SortBarVisible = .T.
	.SortBarCaption = "Drag a <b>column</b> header here to group by that column."
	.AllowGroupBy = .T.
	.Columns.Item(1).SortOrder = 1
	.EndUpdate
	.BeginUpdate
	.EnsureVisibleColumn(0)
	with .Items
		.ExpandItem(.FirstVisibleItem) = .F.
	endwith
	.EndUpdate
endwith
1703:
How can I move automatically a bar once another is moved ( non-working bars )

with thisform.G2antt1
	.BeginUpdate
	.MarkSearchColumn = .F.
	.OnResizeControl = 1
	.Columns.Add("Tasks")
	.Columns.Add("Start").Visible = .F.
	.Columns.Add("End").Visible = .F.
	with .Chart
		.FirstVisibleDate = {^2006-9-20}
		.PaneWidth(0) = 64
		with .Bars.Add("Task:Split")
			.Shortcut = "TSplit"
			.Def(20) = .T.
		endwith
	endwith
	with .Items
		h = .AddItem("Project")
		.CellValue(h,1) = {^2006-9-22}
		.CellValue(h,2) = {^2006-10-3}
		.AddBar(h,"Summary",.CellValue(h,1),.CellValue(h,2))
		h1 = .InsertItem(h,Null,"Task 1")
		.CellValue(h1,1) = .CellValue(h,1)
		.CellValue(h1,2) = {^2006-9-26}
		.AddBar(h1,"TSplit",.CellValue(h1,1),.CellValue(h1,2))
		h2 = .InsertItem(h,Null,"Task 2")
		.CellValue(h2,1) = .CellValue(h1,2)
		.CellValue(h2,2) = {^2006-9-28}
		.AddBar(h2,"TSplit",.CellValue(h2,1),.CellValue(h2,2))
		.AddLink("L1",h1,"",h2,"")
		h3 = .InsertItem(h,Null,"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,"",.F.,h2,"",.T.,7)
		.GroupBars(h2,"",.F.,h3,"",.T.,7)
		.DefineSummaryBars(h,"",h1,"")
		.DefineSummaryBars(h,"",h2,"")
		.DefineSummaryBars(h,"",h3,"")
		.ExpandItem(h) = .T.
		.ItemBold(h) = .T.
	endwith
	.EndUpdate
endwith
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. ***
LPARAMETERS nop
	with thisform.G2antt1
		DEBUGOUT( "Column-Expanded" )
		DEBUGOUT( .Columns.Item("C0").Expanded )
	endwith

with thisform.G2antt1
	.BeginUpdate
	.ShowFocusRect = .F.
	.ColumnAutoResize = .F.
	.DrawGridLines = -1
	.BackColorLevelHeader = .BackColor
	with .Columns
		with .Add("C0")
			.ExpandColumns = "0,1,2"
			.DisplayExpandButton = .T.
		endwith
		.Add("C1")
		.Add("C2")
	endwith
	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"
	endwith
	.EndUpdate
endwith
1701:
I am using expandable headers, the question is how I can display the column itself, not just the child columns

with thisform.G2antt1
	.BeginUpdate
	.ColumnAutoResize = .F.
	.DrawGridLines = -1
	.BackColorLevelHeader = .BackColor
	with .Columns
		with .Add("C0")
			.ExpandColumns = "0,1,2"
			.DisplayExpandButton = .T.
		endwith
		.Add("C1")
		.Add("C2")
	endwith
	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"
	endwith
	.EndUpdate
endwith
1700:
How do I layout expandable columns

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

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 64
		with .Bars.Item("Task")
			.Def(3) = "<%=%1%>"
			.Def(4) = 16
			.Def(44) = "<%=%2%>"
			.Def(45) = 18
		endwith
		.ScrollTo(.FirstVisibleDate,1)
	endwith
	.Columns.Add("Task")
	.Columns.Add("ToolTip").Visible = .F.
	with .Items
		h = .AddItem("Item 1")
		.CellValue(h,1) = "bar <b>a"
		.AddBar(h,"Task",{^2000-12-29},{^2001-1-5})
		h = .AddItem("Item 2")
		.CellValue(h,1) = "bar <b>b"
		.AddBar(h,"Task",{^2000-12-30},{^2001-1-6})
	endwith
	.EndUpdate
endwith
1698:
Is it possible to assign the bar's caption from a hidden column

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 64
		with .Bars.Item("Task")
			.Def(3) = "<%=%C1%>"
			.Def(4) = 18
		endwith
	endwith
	.Columns.Add("Task")
	.Columns.Add("ToolTip").Visible = .F.
	with .Items
		h = .AddItem("Item 1")
		.CellValue(h,1) = "bar <b>a"
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-5})
		h = .AddItem("Item 2")
		.CellValue(h,1) = "bar <b>b"
		.AddBar(h,"Task",{^2001-1-3},{^2001-1-6})
	endwith
	.EndUpdate
endwith
1697:
Is it possible to assign the bar's tooltip from a hidden column

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 64
		.Bars.Item("Task").Def(6) = "<%=%C1%>"
	endwith
	.Columns.Add("Task")
	.Columns.Add("ToolTip").Visible = .F.
	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",{^2001-1-2},{^2001-1-5})
		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",{^2001-1-3},{^2001-1-6})
	endwith
	.EndUpdate
endwith
1696:
I am using exBarFrameColor, but no black frame is shown. What could be wrong (method 2)

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 128
	endwith
	.Columns.Add("Task")
	with .Items
		h = .AddItem("Default")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-5})
		.ItemBar(h,"",51) = 65536
	endwith
	.EndUpdate
endwith
1695:
I am using exBarFrameColor, but no black frame is shown. What could be wrong (method 1)

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 128
		.Bars.Item("Task").Def(51) = 65536
	endwith
	.Columns.Add("Task")
	with .Items
		.AddBar(.AddItem("Default"),"Task",{^2001-1-2},{^2001-1-5})
	endwith
	.EndUpdate
endwith
1694:
What I need is bars that have a solid color, but with a black frame. How can we do that

with thisform.G2antt1
	.BeginUpdate
	.DefaultItemHeight = 22
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.LevelCount = 2
		.PaneWidth(0) = 0
	endwith
	with .Chart.Bars.Add("Frame")
		.Pattern = 1
		.Color = RGB(0,255,0)
		.Def(51) = 65536
		.Def(3) = "<font ;6><%=%C0%>"
		.Def(4) = 18
		.Height = 15
	endwith
	.Columns.Add("Frames")
	with .Items
		.AddBar(.AddItem("Default"),"Frame",{^2001-1-2},{^2001-1-7})
		h = .AddItem("Inside Color")
		.AddBar(h,"Frame",{^2001-1-2},{^2001-1-7})
		.ItemBar(h,"",33) = 255
		h = .AddItem("Border Color")
		.AddBar(h,"Frame",{^2001-1-2},{^2001-1-7})
		.ItemBar(h,"",51) = 33023
		h = .AddItem("Inside/Border Color")
		.AddBar(h,"Frame",{^2001-1-2},{^2001-1-7})
		.ItemBar(h,"",33) = 16711680
		.ItemBar(h,"",51) = 33023
		h = .AddItem("Thick-Border")
		.AddBar(h,"Frame",{^2001-1-2},{^2001-1-7})
		.ItemBar(h,"",42) = 4097
		h = .AddItem("Thick-Border + Pattern")
		.AddBar(h,"Frame",{^2001-1-2},{^2001-1-7})
		.ItemBar(h,"",42) = 4098
	endwith
	.EndUpdate
endwith
1693:
How can we drag bars from one item to the other

with thisform.G2antt1
	.BeginUpdate
	.DefaultItemHeight = 22
	.DrawGridLines = -1
	.Columns.Add("Members").Def(17) = 1
	with .Chart
		.FirstVisibleDate = {^2006-9-20}
		.AllowLinkBars = .F.
		.AllowCreateBar = 0
		.AllowSelectObjects = 0
		.LevelCount = 2
		.PaneWidth(0) = 96
		.DrawGridLines = -1
		with .Bars.Item("Task")
			.OverlaidType = 4611 && OverlaidBarsTypeEnum.exOverlaidBarsIncludeCaption Or OverlaidBarsTypeEnum.exOverlaidBarsStackAutoArrange Or OverlaidBarsTypeEnum.exOverlaidBarsStack
			.Height = 18
			.Pattern = 1
			.Color = RGB(0,128,255)
		endwith
	endwith
	with .Items
		h = .AddItem("Member <b>1</b>")
		.AddBar(h,"Task",{^2006-9-21},{^2006-9-23},"T102","<font ;6><fgcolor FFFFFF>Task <b>102</b>")
		.ItemBar(h,"T102",28) = .T.
		h = .AddItem("Member <b>2</b>")
		h = .AddItem("Member <b>3</b>")
		h = .AddItem("Member <b>4</b>")
		.AddBar(h,"Task",{^2006-9-21},{^2006-9-23},"T103","<font ;6><fgcolor FFFFFF>Task <b>103</b>")
		.ItemBar(h,"T103",28) = .T.
	endwith
	.EndUpdate
endwith
1692:
How can I use the exBarBackgroundExt option of the Items.ItemBar property

with thisform.G2antt1
	.BeginUpdate
	.DefaultItemHeight = 26
	with .Chart
		.NonworkingDays = 0
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 128
		.Bars.Item("Task").Height = 22
	endwith
	.Columns.Add("Column")
	with .Items
		h = .AddItem("Border-Top")
		.AddBar(h,"Task",{^2001-1-3},{^2001-1-7})
		.ItemBar(h,"",53) = "top[3,back=RGB(0,0,0)]"
		h = .AddItem("Border-Bottom")
		.AddBar(h,"Task",{^2001-1-3},{^2001-1-7})
		.ItemBar(h,"",53) = "bottom[3,back=RGB(255,0,0)]"
		h = .AddItem("Border-Left")
		.AddBar(h,"Task",{^2001-1-3},{^2001-1-7})
		.ItemBar(h,"",53) = "left[6,back=RGB(0,255,0)]"
		h = .AddItem("Border-Right")
		.AddBar(h,"Task",{^2001-1-3},{^2001-1-7})
		.ItemBar(h,"",53) = "right[6,back=RGB(0,0,255)]"
		h = .AddItem("Border-All")
		.AddBar(h,"Task",{^2001-1-3},{^2001-1-7})
		.ItemBar(h,"",53) = "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",{^2001-1-3},{^2001-1-7})
		.ItemBar(h,"",53) = "none[(25%,25%,50%,50%),back=RGB(255,0,0)]"
		h = .AddItem("Horizontal")
		.AddBar(h,"Task",{^2001-1-3},{^2001-1-7})
		.ItemBar(h,"",53) = "none[(0,50%-2,100%,4),back=RGB(255,0,0)]"
		h = .AddItem("Vertical")
		.AddBar(h,"Task",{^2001-1-3},{^2001-1-7})
		.ItemBar(h,"",53) = "none[(50%-2,0,4,100%),back=RGB(255,0,0)]"
		h = .AddItem("Mixt")
		.AddBar(h,"Task",{^2001-1-3},{^2001-1-7})
		.ItemBar(h,"",53) = "[[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",{^2001-1-3},{^2001-1-7})
		.ItemBar(h,"",53) = "bottom[50%,pattern=10,frame]"
		h = .AddItem("Complex")
		.AddBar(h,"Task",{^2001-1-3},{^2001-1-7})
		.ItemBar(h,"",53) = "left[10%](top[90%,back=RGB(0,0,0)]),top[30%,back=RGB(254,217,102)],client[back=RGB(91,156,212)]"
	endwith
	.EndUpdate
endwith
1691:
Does the title of the cell's tooltip supports HTML format

with thisform.G2antt1
	.BeginUpdate
	.Chart.PaneWidth(1) = 0
	with .Columns.Add("")
		.Caption = ""
		.HTMLCaption = "Column"
	endwith
	with .Items
		var_s = "<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 titl"
		var_s = var_s + "e centered with a different color."
		.CellToolTip(.AddItem("tooltip w/h different title"),0) = var_s
	endwith
	.EndUpdate
endwith
1690:
How do I specify a different title for the cell's tooltip

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

with thisform.G2antt1
	.BeginUpdate
	.Chart.PaneWidth(1) = 0
	with .Columns
		.Add("C1")
		.Add("C2")
	endwith
	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."
	endwith
	with .Columns.Item("C2")
		.HTMLCaption = .Caption
		.Caption = ""
	endwith
	.EndUpdate
endwith
1688:
How can I programmatically show the column's filter

*** RClick event - Fired when right mouse button is clicked ***
LPARAMETERS nop
	with thisform.G2antt1
		i = .ItemFromPoint(-1,-1,c,hit)
		.Columns.Item(c).ShowFilter("-1,-1,128,128")
	endwith

with thisform.G2antt1
	.BeginUpdate
	.ShowFocusRect = .F.
	with .Columns.Add("Items ")
		.DisplayFilterPattern = .F.
		.FilterList = 9472 && FilterListEnum.exShowExclude Or FilterListEnum.exShowFocusItem Or FilterListEnum.exShowCheckBox
	endwith
	with .Items
		.AddItem("Item 1")
		.AddItem("Item 2")
		.AddItem("Item 3")
	endwith
	.EndUpdate
endwith
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. ***
LPARAMETERS Column
	*** Column.SortOrder = 1
	with thisform.G2antt1
		.SortOnClick = -1
		.Columns.Item("Sort").SortOrder = 1
		.SortOnClick = 1
	endwith

with thisform.G2antt1
	.BeginUpdate
	.SortOnClick = 1
	.Columns.Add("Items")
	.Columns.Add("Sort").Visible = .F.
	with .Items
		.CellValue(.AddItem("Item 1 (3)"),1) = 3
		.CellValue(.AddItem("Item 2 (1)"),1) = 1
		.CellValue(.AddItem("Item 3 (2)"),1) = 2
	endwith
	.EndUpdate
endwith
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. ***
LPARAMETERS Column
	*** Column.SortOrder = 1
	with thisform.G2antt1
		.Items.SortChildren(0,"Sort",.T.)
	endwith

with thisform.G2antt1
	.BeginUpdate
	.SortOnClick = 1
	.Columns.Add("Items")
	.Columns.Add("Sort").Visible = .F.
	with .Items
		.CellValue(.AddItem("Item 1 (3)"),1) = 3
		.CellValue(.AddItem("Item 2 (1)"),1) = 1
		.CellValue(.AddItem("Item 3 (2)"),1) = 2
	endwith
	.EndUpdate
endwith
1685:
How do I get information about control's events
*** Event event - Notifies the application once the control fires an event. ***
LPARAMETERS EventID
	with thisform.G2antt1
		DEBUGOUT( .ExecuteTemplate("EventParam(-2)") )
	endwith

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 48
		.AllowLinkBars = .F.
		.Bars.Item("Task").OverlaidType = 257 && OverlaidBarsTypeEnum.exOverlaidBarsTransparent Or OverlaidBarsTypeEnum.exOverlaidBarsOffset
	endwith
	.Columns.Add("Column")
	with .Items
		h = .AddItem("Item 1")
		.EnableItem(h) = .F.
		.ItemData(h) = -1
		h = .AddItem("Item 2")
		.ItemData(h) = 0
		.AddBar(h,"Task",{^2001-1-5},{^2001-1-7},"B")
		.ItemBar(h,"B",28) = .T.
		.ItemData(.AddItem("Item 3")) = 0
		h = .AddItem("Item 4")
		.EnableItem(h) = .F.
		.ItemData(h) = -1
	endwith
	.EndUpdate
endwith
1684:
How can I sort by two-columns, one by date and one by time

with thisform.G2antt1
	.BeginUpdate
	.SingleSort = .F.
	with .Columns
		.Add("Index").FormatColumn = "1 index ``"
		.Add("Date").SortType = 2
		with .Add("Time")
			.SortType = 4
			.FormatColumn = "time(value)"
		endwith
	endwith
	with .Items
		h = .AddItem(0)
		.CellValue(h,1) = {^2001-1-1}
		.CellValue(h,2) = {^2001-1-1 10:00:00}
		h = .AddItem(0)
		.CellValue(h,1) = {^2000-12-31}
		.CellValue(h,2) = {^2001-1-1 10:00:00}
		h = .AddItem(0)
		.CellValue(h,1) = {^2001-1-1}
		.CellValue(h,2) = {^2001-1-1 6:00:00}
		h = .AddItem(0)
		.CellValue(h,1) = {^2000-12-31}
		.CellValue(h,2) = {^2001-1-1 8:00:00}
		h = .AddItem(0)
		.CellValue(h,1) = {^2001-1-1}
		.CellValue(h,2) = {^2001-1-1 8:00:00}
		h = .AddItem(0)
		.CellValue(h,1) = {^2000-12-31}
		.CellValue(h,2) = {^2001-1-1 6:00:00}
	endwith
	.Layout = "multiplesort="+chr(34)+"C1:1 C2:1"+chr(34)+""
	.EndUpdate
endwith
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 thisform.G2antt1
	.BeginUpdate
	with .Chart
		.FirstVisibleDate = {^2008-1-1}
		.PaneWidth(0) = 0
		.LevelCount = 2
		.ShowNonworkingUnits = .F.
		.ShowNonworkingDates = .F.
		.NonworkingDays = 128
		.AddNonworkingDate({^2008-1-7})
		.AddNonworkingDate({^2008-1-8})
		.AddNonworkingDate({^2008-1-9})
		.AddNonworkingDate({^2008-1-10})
	endwith
	.EndUpdate
endwith
1682:
How can I display the task's duration, in days, hours and minutes

with thisform.G2antt1
	.BeginUpdate
	with .Columns.Add("Tasks")
		.AllowSizing = .F.
		.Width = 36
	endwith
	with .Columns.Add("Duration")
		.Def(18) = 513
		var_s = "((1:=int(0:= (value))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ?"
		var_s = var_s + " =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')"
		.FormatColumn = var_s
	endwith
	with .Chart
		.PaneWidth(0) = 148
		.FirstVisibleDate = {^2009-4-6}
		.LevelCount = 2
		.UnitScale = 65536
		.ResizeUnitScale = 1048576
	endwith
	.Items.AllowCellValueToItemBar = .T.
	with .Items
		.AddBar(.AddItem("T1"),"Task",{^2009-4-6 2:30:00},{^2009-4-6 12:35:00})
		.AddBar(.AddItem("T2"),"Task",{^2009-4-6 9:00:00},{^2009-4-6 10:10:00})
	endwith
	.EndUpdate
endwith
1681:
Does your control support working half-hour/minutes/seconds

with thisform.G2antt1
	.BeginUpdate
	with .Columns.Add("Tasks")
		.AllowSizing = .F.
		.Width = 36
	endwith
	with .Columns.Add("Working")
		.Def(18) = 258
		var_s = "((1:=int(0:= (value))) != 0 ? (=:1 + ' day(s)') : '') + (=:1 ? ' ' : '' ) + ((1:=int(0:=((=:0 - =:1 + 1/24/60/60/2)*24))) != 0 ?"
		var_s = var_s + " =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')"
		.FormatColumn = var_s
	endwith
	with .Chart
		.FirstVisibleDate = {^2009-4-6}
		.PaneWidth(0) = 148
		.LevelCount = 2
		.UnitScale = 65536
		.ResizeUnitScale = 1048576
		.ResizeUnitCount = 15
		.NonworkingHours = 15728767
		.ShowNonworkingDates = .F.
		.ShowNonworkingUnits = .F.
		with .Bars
			.Item("Task").Def(20) = .T.
			.Add("Task:Split").Shortcut = "Task"
		endwith
		.AllowLinkBars = .F.
		.UnitWidth = 26
	endwith
	.Items.AllowCellValueToItemBar = .T.
	with .Items
		h = .AddItem("T1")
		.ItemNonworkingUnits(h,.F.) = "(weekday(value) in (1,2,3,4,5) and (timeF(value)<"+chr(34)+"09:30"+chr(34)+"  or timeF(value)>="+chr(34)+"17:30"+chr(34)+")) or (weekday(value) in (0,6))"
		.AddBar(h,"Task",{^2009-4-6 10:00:00},{^2009-4-6 12:30:00})
		h = .AddItem("T2")
		.ItemNonworkingUnits(h,.F.) = "(weekday(value) in (1,2,3,4,5) and (timeF(value)<"+chr(34)+"08:00"+chr(34)+"  or timeF(value)>="+chr(34)+"16:00"+chr(34)+")) or (weekday(value) in (0,6))"
		.AddBar(h,"Task",{^2009-4-6 9:30:00},{^2009-4-6 10:45:00})
	endwith
	.EndUpdate
endwith
1680:
How can I programmatically move a bar to a specified date-time
with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 64
	endwith
	.Columns.Add("Column")
	with .Items
		h = .AddItem("Original")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-5},"key")
		h = .AddItem("Moved")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-5},"key")
		duration = .ItemBar(h,"key",513)
		.AddBar(h,"Task",{^2001-1-5},{^2001-1-5},"key")
		.ItemBar(h,"key",513) = duration
	endwith
	.EndUpdate
endwith
1679:
How can I programmatically move a bar, with a specified ammount
with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 64
	endwith
	.Columns.Add("Column")
	with .Items
		h = .AddItem("Original")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-5},"key")
		h = .AddItem("Moved")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-5},"key")
		.ItemBar(h,"key",514) = 3
	endwith
	.EndUpdate
endwith
1678:
How can I programmatically move a bar to a specified date-time (auto-adjust spans over a non-working period)

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 64
		with .Bars
			.Item("Task").Def(20) = .T.
			.Add("Task:Split").Shortcut = "Task"
		endwith
	endwith
	.Columns.Add("Column")
	with .Items
		h = .AddItem("Original")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-5},"key")
		h = .AddItem("Moved")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-5},"key")
		workingCount = .ItemBar(h,"key",258)
		.AddBar(h,"Task",{^2001-1-5},{^2001-1-5},"key")
		.ItemBar(h,"key",258) = workingCount
	endwith
	.EndUpdate
endwith
1677:
How can I programmatically move a bar, with a specified ammount (auto-adjust spans over a non-working period)

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 64
		with .Bars
			.Item("Task").Def(20) = .T.
			.Add("Task:Split").Shortcut = "Task"
		endwith
	endwith
	.Columns.Add("Column")
	with .Items
		h = .AddItem("Original")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-5},"key")
		h = .AddItem("Moved")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-5},"key")
		.ItemBar(h,"key",514) = 3
	endwith
	.EndUpdate
endwith
1676:
How can I show a secondary curve, line in the control's histogram

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Tasks")
	.AntiAliasing = .T.
	with .Chart
		.FirstWeekDay = 1
		.LevelCount = 2
		.PaneWidth(0) = 40
		.FirstVisibleDate = {^2005-6-9}
		.HistogramVisible = .T.
		.HistogramView = 1136 && HistogramViewEnum.exHistogramNoGrouping Or HistogramViewEnum.exHistogramAllItems
		.HistogramHeight = 128
		with .Bars.Item("Task")
			.HistogramPattern = .Pattern && .Pattern
			.HistogramType = 0
			.HistogramItems = 8
			.HistogramRulerLinesColor = RGB(0,0,1)
		endwith
		.Level(1).Label = "<font ;3><%d%>"
		.UnitWidth = 9
		with .Bars.Item("Summary")
			.HistogramPattern = 1024
			.HistogramColor = RGB(255,0,0)
			.HistogramType = 0
			.HistogramItems = 8
			.HistogramBorderSize = 1
		endwith
	endwith
	with .Items
		.LockedItemCount(0) = 1
		h = .LockedItem(0,0)
		.ItemHeight(h) = 0
		.AddBar(h,"Summary",{^2005-1-1},{^2005-12-31},"1")
		.ItemBar(h,"1",21) = "(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",{^2005-6-10},{^2005-7-16},"")
		.ItemBar(h,"",21) = "weekday(value) in (0,6) ? 0.25 : 2"
		h = .AddItem("Task")
		.AddBar(h,"Task",{^2005-6-18},{^2005-7-21},"")
		.ItemBar(h,"",21) = "weekday(value) = 1 ? 2.5 : .5"
	endwith
	.EndUpdate
endwith
1675:
How can I add an owner-draw bar
*** AfterDrawPart event - Occurs right after drawing the part of the control. ***
LPARAMETERS Part,hDC,X,Y,Width,Height
	with thisform.G2antt1
		DEBUGOUT( "AfterDrawPart" )
		DEBUGOUT( Part )
		DEBUGOUT( .Items.CellCaption(thisform.G2antt1.DrawPartItem,0) )
		DEBUGOUT( thisform.G2antt1.DrawPartKey )
	endwith

*** BeforeDrawPart event - Occurs just before drawing a part of the control. ***
LPARAMETERS Part,hDC,X,Y,Width,Height,Cancel
	with thisform.G2antt1
		Cancel = .T.
		DEBUGOUT( "BeforeDrawPart" )
		DEBUGOUT( Part )
		DEBUGOUT( .Items.CellCaption(thisform.G2antt1.DrawPartItem,0) )
		DEBUGOUT( thisform.G2antt1.DrawPartKey )
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Task")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 128
		.LevelCount = 2
		.Bars.Add("OwnerDraw")
	endwith
	with .Items
		.AddBar(.AddItem("Draw-Item-Bar-1"),"OwnerDraw",{^2001-1-2},{^2001-1-5},"K1")
		.AddBar(.AddItem("Draw-Item-Bar-2"),"OwnerDraw",{^2001-1-6},{^2001-1-9},"K1")
		.ItemBar(0,"<*>",257) = .T.
	endwith
	.EndUpdate
endwith
1674:
Is it possible to show a status left or right to the bar (method 2, exBarFrameColor, EBN)

with thisform.G2antt1
	.BeginUpdate
	with .VisualAppearance
		var_s = "gBFLBCJwBAEHhEJAAChABP0IQAAYAQGKIaBoAKBQAGaAoDDYMQyQwAAxDOKsEwsACEIrjKCRShyCYZRrGUQyAKESRAGyTJBlKKodgOLYYSrFcgSIAsEhqGASRZGUBIJD"
		var_s = var_s + "EMI4AJPIwxNIDfyNGKWI6gOQKIoSCYlU7IED0fQNGxVF6XaYqYAIRDINQlVzXcQzPYEbRxCKLKppWqIfpuSIBgI="
		.Add(2,var_s)
		.Add(1,"CP:2 -8 -1 0 0")
		.Add(3,"CP:2 0 -1 0 0")
	endwith
	.Columns.Add("Task")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 128
	endwith
	with .Items
		h = .AddItem("Red-Status-Outside")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-5},"K1")
		.ItemBar(h,"K1",51) = 16777471
		h = .AddItem("Blue-Status-Outside")
		.AddBar(h,"Task",{^2001-1-3},{^2001-1-6},"K1")
		.ItemBar(h,"K1",51) = 33488896
		h = .AddItem("Red-Status-Inside")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-5},"K1")
		.ItemBar(h,"K1",51) = 50331903
		h = .AddItem("Blue-Status-Inside")
		.AddBar(h,"Task",{^2001-1-3},{^2001-1-6},"K1")
		.ItemBar(h,"K1",51) = 67043328
	endwith
	.EndUpdate
endwith
1673:
Is it possible to show a status left or right to the bar (method 1, exBarBackgroundExt)

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

with thisform.G2antt1
	.BeginUpdate
	.DefaultItemHeight = 31
	.DrawGridLines = -1
	.GridLineColor = RGB(224,224,224)
	.BackColorLevelHeader = .BackColor
	.Columns.Add("Task")
	with .Chart
		.LevelCount = 2
		.Level(0).GridLineColor = thisform.G2antt1.GridLineColor
		.Level(1).GridLineColor = thisform.G2antt1.GridLineColor
		.ShowNonworkingDates = .F.
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 128
		.Bars.Item("Task").Height = 21
		.DrawGridLines = -1
	endwith
	with .Items
		h = .AddItem("Normal")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-4},"K1")
		h = .AddItem("Red-Frame-Inside")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-5},"K1")
		.ItemBar(h,"K1",53) = "[frame=RGB(255,0,0),framethick]"
		h = .AddItem("LR-Margins")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-6},"K1")
		.ItemBar(h,"K1",53) = "left[4,back=RGB(0,255,0)],right[4,back=RGB(0,0,255)]"
		h = .AddItem("LR-Margins (front)")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-7},"K1")
		.ItemBar(h,"K1",53) = "left[4,back=RGB(0,255,0)],right[4,back=RGB(0,0,255)]"
		.ItemBar(h,"K1",54) = 2
		h = .AddItem("LR-Margins (back)")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-8},"K1")
		.ItemBar(h,"K1",53) = "left[4,back=RGB(0,255,0)],right[4,back=RGB(0,0,255)]"
		.ItemBar(h,"K1",54) = 3
		h = .AddItem("TB-Margins")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-9},"K1")
		.ItemBar(h,"K1",53) = "top[4,back=RGB(255,0,0)],bottom[4,back=RGB(0,255,0)]"
		h = .AddItem("TB-Margins")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-10},"K1")
		.ItemBar(h,"K1",53) = "top[2,back=RGB(255,0,0)],bottom[2,back=RGB(0,255,0)]"
		.ItemBar(h,"K1",54) = 2
		h = .AddItem("Caption(back)")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-11},"K1")
		.ItemBar(h,"K1",53) = "client(bottom[14,text=`<sha ;;0><font ;8>background`,align=0x11])"
		.ItemBar(h,"K1",54) = 2
		h = .AddItem("Pattern-Outside")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-12},"K1")
		.ItemBar(h,"K1",53) = "bottom[10%,pattern=7,frame]"
		.ItemBar(h,"K1",54) = 2
		h = .AddItem("Pattern-Inside")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-13},"K1")
		.ItemBar(h,"K1",53) = "bottom[7,pattern=3,frame]"
		h = .AddItem("Pattern-Inside-Caption")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-12},"K1")
		var_s = "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%`,a"
		var_s = var_s + "lign=0x11,pattern=0x001,frame=RGB(255,0,0)])"
		.ItemBar(h,"K1",53) = var_s
		h = .AddItem("Complex(back)")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-11},"K1")
		.ItemBar(h,"K1",53) = "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",54) = 3
		h = .AddItem("Complex(inside)")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-12},"K1")
		.ItemBar(h,"K1",53) = "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)])"
	endwith
	.EndUpdate
endwith
1671:
How can display seconds

with thisform.G2antt1
	with .Chart
		.PaneWidth(0) = 96
		.FirstVisibleDate = {^2008-1-17}
		.LevelCount = 2
		.UnitScale = 16777216
		.Level(0).Alignment = 17 && AlignmentEnum.exHOutside Or AlignmentEnum.CenterAlignment
		.Level(1).FormatLabel = "(0:=sec(dvalue)) mod 10 ? 0=: : '<c><font ;6>sec<br><b>' + 0=:"
	endwith
	.Columns.Add("Tasks")
	with .Items
		.AddBar(.AddItem("Task 1"),"Task",{^2008-1-17 0:00:02},{^2008-1-17 0:00:08})
		.AddBar(.AddItem("Task 2"),"Task",{^2008-1-17 0:00:05},{^2008-1-17 0:00:15})
	endwith
endwith
1670:
How can I check if an item contains a bar
*** SelectionChanged event - Fired after a new item has been selected. ***
LPARAMETERS nop
	with thisform.G2antt1
		with .Items
			DEBUGOUT( "Count of A: " )
			DEBUGOUT( .ItemBar(.FocusItem,"A",256) )
			DEBUGOUT( "Count of B: " )
			DEBUGOUT( .ItemBar(.FocusItem,"B",256) )
			DEBUGOUT( "Count of C: " )
			DEBUGOUT( .ItemBar(.FocusItem,"C",256) )
		endwith
	endwith

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

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

with thisform.G2antt1
	.BeginUpdate
	with .Columns
		.Add("Tasks")
		with .Add("Duration")
			.Def(18) = 513
			.Editor.EditType = 4
		endwith
	endwith
	.Items.AllowCellValueToItemBar = .T.
	with .Chart
		.FirstWeekDay = 1
		.LevelCount = 2
		.FirstVisibleDate = {^2005-6-6}
		.PaneWidth(0) = 128
	endwith
	with .ConditionalFormats.Add("%1 >= 4")
		.ApplyTo = 1 && 0x1
		.Bold = .T.
		.ApplyToBars = "Task"
		.BarColor = RGB(255,0,0)
		.ForeColor = .BarColor
	endwith
	with .Items
		.AddBar(.AddItem("Task"),"Task",{^2005-6-10},{^2005-6-13},"")
		.AddBar(.AddItem("Task"),"Task",{^2005-6-11},{^2005-6-16},"")
		.AddBar(.AddItem("Task"),"Task",{^2005-6-12},{^2005-6-15},"")
	endwith
	.EndUpdate
endwith
1666:
Is it possible to colorize the bars based on its starting/ending date

with thisform.G2antt1
	.BeginUpdate
	.OnResizeControl = 129 && OnResizeControlEnum.exDisableSplitter Or OnResizeControlEnum.exResizeChart
	with .Columns
		.Add("Tasks")
		with .Add("Start")
			.Def(18) = 1
			.Visible = .F.
		endwith
	endwith
	.Items.AllowCellValueToItemBar = .T.
	with .Chart
		.FirstWeekDay = 1
		.LevelCount = 2
		.FirstVisibleDate = {^2005-5-31}
		.PaneWidth(0) = 0
		.AllowInsideZoom = .T.
		.AllowResizeInsideZoom = .F.
		.InsideZoomOnDblClick = .F.
		with .DefaultInsideZoomFormat
			.PatternChart = 6
			.PatternColorChart = RGB(255,0,0)
			.ForeColor = .PatternColorChart
		endwith
		with .InsideZooms
			.SplitBaseLevel = .F.
			.DefaultWidth = 18
			.Add({^2005-6-10}).AllowInsideFormat = .F.
		endwith
	endwith
	with .ConditionalFormats.Add("%1 <= #6/10/2005#")
		.ApplyToBars = "Task"
		.BarColor = RGB(255,0,0)
	endwith
	with .Items
		.AddBar(.AddItem("Task"),"Task",{^2005-6-10},{^2005-6-14},"")
		.AddBar(.AddItem("Task"),"Task",{^2005-6-11},{^2005-6-15},"")
		.AddBar(.AddItem("Task"),"Task",{^2005-6-12},{^2005-6-16},"")
	endwith
	.EndUpdate
endwith
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. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.FirstVisibleDate = {^1994-8-3}
		.PaneWidth(0) = 256
		.LevelCount = 2
		.UnitScale = 4096
		.FirstWeekDay = 1
		.OverviewVisible = 2
	endwith
	.ColumnAutoResize = .F.
	.ContinueColumnScroll = .F.
	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)
	endwith
	.DataSource = rs
	.Items.AllowCellValueToItemBar = .T.
	.Columns.Item(2).Def(18) = 1
	.Columns.Item(4).Def(18) = 2
	with .ConditionalFormats
		with .Add("1")
			.ApplyTo = 1 && 0x1
			.Bold = .T.
			.BackColor = RGB(250,250,250)
		endwith
		with .Add("%1 = 5")
			.ApplyToBars = "Task"
			.BarColor = RGB(255,0,0)
			.ForeColor = RGB(255,0,0)
			.BarOverviewColor = RGB(255,0,0)
		endwith
		with .Add("%1 = 3")
			.ApplyToBars = "Task"
			.BarColor = RGB(0,255,0)
			.ForeColor = RGB(0,255,0)
			.BarOverviewColor = RGB(0,255,0)
		endwith
	endwith
	.EndUpdate
endwith
1664:
How can I display / specify a fixed percent for the task in the histogram, no matter how long the task is

with thisform.G2antt1
	.BeginUpdate
	.DefaultItemHeight = 32
	.Columns.Add("Tasks")
	with .Chart
		.UnitWidth = 32
		.LevelCount = 2
		.NonworkingDays = 0
		.PaneWidth(0) = 64
		.FirstVisibleDate = {^2005-6-20}
		.HistogramVisible = .T.
		.HistogramView = 112
		.HistogramHeight = 64
		with .Bars.Item("Task")
			.HistogramPattern = .Pattern && .Pattern
			.HistogramType = 1
			.ShowHistogramValues = 1
		endwith
		with .Bars.Copy("Task","TaskFixed")
			.HistogramType = 513 && HistogramTypeEnum.exHistOverAllocationFixed Or HistogramTypeEnum.exHistOverAllocation
			.ShowHistogramValues = 1
		endwith
		with .Bars.Copy("Task","TaskMultiply")
			.HistogramType = 1025 && HistogramTypeEnum.exHistOverAllocationMultiply Or HistogramTypeEnum.exHistOverAllocation
			.ShowHistogramValues = 1
		endwith
	endwith
	with .Items
		h = .AddItem("Allocation")
		.AddBar(h,"Task",{^2005-6-21},{^2005-6-23},"A","Effort/Length")
		.ItemBar(h,"A",21) = 0.25
		.ItemBar(h,"A",5) = 18
		.AddBar(h,"TaskFixed",{^2005-6-24},{^2005-6-26},"B","Effort")
		.ItemBar(h,"B",21) = 0.25
		.ItemBar(h,"B",5) = 18
		.AddBar(h,"TaskMultiply",{^2005-6-27},{^2005-6-29},"C","Effort*Length")
		.ItemBar(h,"C",21) = 0.25
		.ItemBar(h,"C",5) = 18
	endwith
	.EndUpdate
endwith
1663:
Does your control supports scrolling by touching the screen

*** AddItem event - Occurs after a new Item has been inserted to Items collection. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.FirstVisibleDate = {^1994-8-3}
		.PaneWidth(0) = 256
		.LevelCount = 2
		.UnitScale = 4096
		.FirstWeekDay = 1
		.OverviewVisible = 2
	endwith
	.ColumnAutoResize = .F.
	.ContinueColumnScroll = .F.
	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)
	endwith
	.DataSource = rs
	.Items.AllowCellValueToItemBar = .T.
	.Columns.Item(2).Def(18) = 1
	.Columns.Item(4).Def(18) = 2
	.ContinueColumnScroll = .T.
	.ScrollBySingleLine = .T.
	.Chart.AllowCreateBar = 0
	.AutoDrag = 4112 && AutoDragEnum.exAutoDragScrollOnShortTouch Or AutoDragEnum.exAutoDragScroll
	.EndUpdate
endwith
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 thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Task")
	with .Chart
		.UnitScale = 4096
		.PaneWidth(0) = 0
		.LevelCount = 2
		.FirstVisibleDate = {^2001-1-1}
		.DrawGridLines = -1
		.AllowZoomOnFly = 24
		.ResizeUnitScale = 65536
		.ResizeUnitCount = 4
		.Label(65536) = "<font ;5><b><%h%><br><%AM/PM%></b></font><||>4<||>65536"
		.ZoomOnFlyCaption = "<br><c><b><font ;12><%=%C0%>"
	endwith
	with .Items
		h = .AddItem("Task 1")
		.AddBar(h,"Task",{^2001-1-7},{^2001-1-10},"T1","T1")
		.AddBar(h,"Task",{^2001-1-11},{^2001-1-14},"T3","T3")
		h = .AddItem()
		.AddBar(h,"",{^2001-1-15},{^2001-1-15},"","Focus the chart ( click here ), and press the <b>CTRL + SHIFT</b>, so the Zoom-OnFly is shown.")
		.SelectableItem(h) = .F.
	endwith
	.EndUpdate
endwith
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 thisform.G2antt1
	.BeginUpdate
	with .Chart
		.UnitScale = 4096
		.PaneWidth(0) = 0
		.LevelCount = 2
		.FirstVisibleDate = {^2008-1-1}
		with .DefaultInsideZoomFormat
			.InsideLabel = "<%hh%>"
			.InsideUnit = 65536
			.InsideCount = 8
		endwith
		.AllowInsideZoom = .T.
		with .InsideZooms
			.Add({^2008-1-4})
		endwith
		.DrawGridLines = -1
	endwith
	.EndUpdate
endwith
1660:
How can I export the control's content to a PDF document (method 1)
with thisform.G2antt1
	.BeginUpdate
	.MarkSearchColumn = .F.
	with .Columns
		.Add("Tasks")
		with .Add("Start")
			.Def(18) = 1
			.Editor.EditType = 4
		endwith
		with .Add("End")
			.Def(18) = 2
			.Editor.EditType = 4
		endwith
	endwith
	with .Chart
		.PaneWidth(0) = 196
		.LevelCount = 2
		.ShowEmptyBars = 1
		.FirstVisibleDate = {^2009-1-1}
	endwith
	with .Items
		.AllowCellValueToItemBar = .T.
		.AddBar(.AddItem("Task 1"),"Task",{^2009-1-2},{^2009-1-7})
		.AddBar(.AddItem("Task 2"),"Task",{^2009-1-4},{^2009-1-9})
	endwith
	with CreateObject("Exontrol.Print")
		.PrintExt = thisform.G2antt1.Object
		.CopyTo("c:/temp/xtest.pdf")
	endwith
	DEBUGOUT( "Look for C:\Temp\xtest.pdf file." )
	.EndUpdate
endwith
1659:
How can I export the control's content to a PDF document (method 2)
with thisform.G2antt1
	.BeginUpdate
	.MarkSearchColumn = .F.
	with .Columns
		.Add("Tasks")
		with .Add("Start")
			.Def(18) = 1
			.Editor.EditType = 4
		endwith
		with .Add("End")
			.Def(18) = 2
			.Editor.EditType = 4
		endwith
	endwith
	with .Chart
		.PaneWidth(0) = 196
		.LevelCount = 2
		.ShowEmptyBars = 1
		.FirstVisibleDate = {^2009-1-1}
	endwith
	with .Items
		.AllowCellValueToItemBar = .T.
		.AddBar(.AddItem("Task 1"),"Task",{^2009-1-2},{^2009-1-7})
		.AddBar(.AddItem("Task 2"),"Task",{^2009-1-4},{^2009-1-9})
	endwith
	var_CopyTo = .CopyTo("c:/temp/xtest.pdf")
	DEBUGOUT( "Look for C:\Temp\xtest.pdf file." )
	.EndUpdate
endwith
1658:
Today date is shown, if we use the Column.FormatColumn and Editor.Option(exDateAllowNullDate) properties. What can be done

with thisform.G2antt1
	.BeginUpdate
	with .Columns.Add("Date")
		var_s = "len(value) ? ( (longdate(date(value)) left 3) + ' ' + day(date(value)) + '/' + month(date(value)) + '/' + (year(date(value)) rig"
		var_s = var_s + "ht 2) ) : '' )"
		.FormatColumn = var_s
		with .Editor
			.EditType = 7
			.Option(14) = .T.
		endwith
	endwith
	with .Items
		.AddItem({^2012-5-12})
		.AddItem()
		.AddItem({^2012-5-14})
	endwith
	.EndUpdate
endwith
1657:
Is there a syntax for conditional formatting of items, based on CellState/CellStateChange

*** CellStateChanged event - Fired after cell's state has been changed. ***
LPARAMETERS Item,ColIndex
	with thisform.G2antt1
		with .Items
			.CellValue(Item,2) = .CellState(Item,0)
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	.ShowFocusRect = .F.
	.SelBackMode = 1
	var_ConditionalFormat = .ConditionalFormats.Add("%2 != 0")
	with var_ConditionalFormat
		.Bold = .T.
		.ForeColor = RGB(255,0,0)
		.ApplyTo = -1
	endwith
	with .Columns.Add("")
		.Def(0) = .T.
		.Width = 16
		.AllowSizing = .F.
	endwith
	.Columns.Add("Information")
	.Columns.Add("Hidden").Visible = .F.
	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"
	endwith
	.EndUpdate
endwith
1656:
How can I hide the items/grid section of the control

with thisform.G2antt1
	.BeginUpdate
	.OnResizeControl = 129 && OnResizeControlEnum.exDisableSplitter Or OnResizeControlEnum.exResizeChart
	.Columns.Add("Tasks")
	with .Chart
		.FirstWeekDay = 1
		.LevelCount = 2
		.FirstVisibleDate = {^2005-6-9}
		.HistogramVisible = .T.
		.HistogramView = 112
		.HistogramHeight = 128
		with .Bars.Item("Task")
			.HistogramPattern = .Pattern && .Pattern
		endwith
		.PaneWidth(0) = 0
	endwith
	with .Items
		.AddBar(.AddItem("Task"),"Task",{^2005-6-10},{^2005-6-14},"")
		.AddBar(.AddItem("Task"),"Task",{^2005-6-11},{^2005-6-15},"")
		.AddBar(.AddItem("Task"),"Task",{^2005-6-12},{^2005-6-16},"")
	endwith
	.EndUpdate
endwith
1655:
How can I draw an extra line which could indicate deadline for my tasks

with thisform.G2antt1
	.BeginUpdate
	.DefaultItemHeight = 24
	with .VisualAppearance
		var_s = "gBFLBCJwBAEHhEJAAChABLMIQAAYAQGKIaBoAKBQAGaAoDDQOQ4QwAAxjAKUEwsACEIrjKCYVgOHYYRrIIEvZAAMIlSbCMoxcAsSQSf6YJBmKL4fiWMobRCMQyiLLMdw"
		var_s = var_s + "iGoYJ4hGgKChqI43RZNErURRkEwCgIA="
		.Add(2,var_s)
		.Add(1,"CP:2 0 -4 0 4")
	endwith
	.Columns.Add("Task")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 128
	endwith
	with .Items
		h = .AddItem("Default")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-5},"K1")
		.ItemBar(h,"K1",51) = 16777471
		.AddBar(h,"Task",{^2001-1-9},{^2001-1-14},"K2")
		.ItemBar(h,"K2",51) = 33488896
	endwith
	.EndUpdate
endwith
1654:
How can I mark/highlight a zone in the control's histogram

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Tasks")
	with .Chart
		.FirstWeekDay = 1
		.LevelCount = 2
		.PaneWidth(0) = 40
		.FirstVisibleDate = {^2005-6-9}
		.HistogramVisible = .T.
		.HistogramView = 112
		.HistogramHeight = 128
		with .Bars.Item("Task")
			.HistogramPattern = .Pattern && .Pattern
			.HistogramType = 0
			.HistogramItems = 12
			.HistogramRulerLinesColor = RGB(0,0,1)
		endwith
	endwith
	with .Items
		.AddBar(.AddItem("Task"),"Task",{^2005-6-10},{^2005-6-14},"")
		.AddBar(.AddItem("Task"),"Task",{^2005-6-11},{^2005-6-15},"")
		.AddBar(.AddItem("Task"),"Task",{^2005-6-12},{^2005-6-16},"")
	endwith
	.Chart.MarkTimeZone("zone",{^2005-6-13},{^2005-6-14},15790320,";;;;histogram;1")
	.EndUpdate
endwith
1653:
How can I get the min/max values from the histogram
*** MouseMove event - Occurs when the user moves the mouse. ***
LPARAMETERS Button,Shift,X,Y
	with thisform.G2antt1
		with .Chart
			DEBUGOUT( "Value" )
			DEBUGOUT( .HistogramValue(.DateFromPoint(-1,-1)) )
			DEBUGOUT( "MIN" )
			DEBUGOUT( .HistogramValue("min") )
			DEBUGOUT( "MAX" )
			DEBUGOUT( .HistogramValue("max") )
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Tasks")
	with .Chart
		.FirstWeekDay = 1
		.LevelCount = 2
		.PaneWidth(0) = 40
		.FirstVisibleDate = {^2005-6-9}
		.HistogramVisible = .T.
		.HistogramView = 112
		.HistogramHeight = 128
		with .Bars.Item("Task")
			.HistogramPattern = .Pattern && .Pattern
			.HistogramType = 0
			.HistogramItems = 12
			.HistogramRulerLinesColor = RGB(0,0,1)
		endwith
	endwith
	with .Items
		.AddBar(.AddItem("Task"),"Task",{^2005-6-10},{^2005-6-14},"")
		.AddBar(.AddItem("Task"),"Task",{^2005-6-11},{^2005-6-15},"")
		.AddBar(.AddItem("Task"),"Task",{^2005-6-12},{^2005-6-16},"")
	endwith
	.EndUpdate
endwith
1652:
How can I assign different efforts to the same bar

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

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Tasks")
	with .Chart
		.LevelCount = 2
		.PaneWidth(0) = 40
		.FirstVisibleDate = {^2005-6-9}
		.HistogramVisible = .T.
		.HistogramView = 112
		.HistogramHeight = 128
		with .Bars.Item("Task")
			.HistogramPattern = .Pattern && .Pattern
			.HistogramType = 0
			.HistogramItems = 12
			.HistogramRulerLinesColor = RGB(0,0,1)
		endwith
	endwith
	with .Items
		h = .AddItem("Task")
		.AddBar(h,"Task",{^2005-6-10},{^2005-6-21},"")
		.ItemBar(h,"",21) = "weekday(value) in (0,6) ? 0 : 2"
	endwith
	.EndUpdate
endwith
1650:
How do I programatically focus a cell
*** FocusChanged event - Occurs when a cell gets the focus. ***
LPARAMETERS nop
	with thisform.G2antt1
		with .Items
			.CellBackColor(.FocusItem,thisform.G2antt1.FocusColumnIndex) = RGB(255,0,0)
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	.SelForeColor = .ForeColor
	.SelBackColor = .BackColor
	.DrawGridLines = -2
	with .Columns
		.Add("Column1")
		.Add("Column2")
	endwith
	with .Items
		.CellValue(.AddItem("Cell 1.1"),1) = "Cell 1.2"
		.CellValue(.AddItem("Cell 2.1"),1) = "Cell 2.2"
	endwith
	with .Items
		.SelectItem(.ItemByIndex(1)) = .T.
	endwith
	.FocusColumnIndex = 1
	.EndUpdate
endwith
1649:
How do I programatically focus a cell (excrd)
*** FocusChanged event - Occurs when a cell gets the focus. ***
LPARAMETERS nop
	with thisform.G2antt1
		with .Items
			.CellBackColor(.FocusItem,thisform.G2antt1.FocusColumnIndex) = RGB(255,0,0)
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	.SelForeColor = .ForeColor
	.SelBackColor = .BackColor
	.DrawGridLines = -2
	.DefaultItemHeight = 36
	with .Columns
		.Add("Column1").Visible = .F.
		.Add("Column2").Visible = .F.
		.Add("Column3").Visible = .F.
		with .Add("FormatLevel")
			.FormatLevel = "(0/1),2"
			.Def(32) = .FormatLevel
		endwith
	endwith
	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"
	endwith
	with .Items
		.SelectItem(.ItemByIndex(1)) = .T.
	endwith
	.FocusColumnIndex = 2
	.EndUpdate
endwith
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. ***
LPARAMETERS Shift,X,Y
	with thisform.G2antt1
		item = .ItemFromPoint(-1,-1,c,hit)
		key = .Chart.BarFromPoint(-1,-1)
		DEBUGOUT( .Items.ItemBar(item,key,17) )
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Task")
	.Chart.FirstVisibleDate = {^2001-1-1}
	.Chart.PaneWidth(0) = 48
	with .Items
		h = .AddItem("Task 1")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-5},"")
		.ItemBar(h,"",17) = "this is a bit of extra data associated with task 1"
		h = .AddItem("Task 2")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-5},"")
		.ItemBar(h,"",17) = "this is a bit of extra data associated with task 2"
	endwith
	.EndUpdate
endwith
1647:
How do I get arranged the levels to display, weeks, days and so on

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.UnitWidth = 24
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 0
		.LevelCount = 2
		.FirstWeekDay = 1
		with .Level(0)
			.Alignment = 1
			.Label = "<b><Font Tahoma;7><%m3%>, <%yyyy%></b><b>, <Font Tahoma;7>Wk <%ww%>"
			.Unit = 256
			.DrawGridLines = .T.
		endwith
		with .Level(1)
			.Alignment = 1
			.Label = "<Font Tahoma;7><%d%>"
			.Unit = 4096
		endwith
		.DrawGridLines = -1
	endwith
	.EndUpdate
endwith
1646:
How can I add a task and a milestone to the same item
with thisform.G2antt1
	.Columns.Add("Task")
	.Chart.FirstVisibleDate = {^2001-1-1}
	with .Items
		h = .AddItem("Task 1")
		.AddBar(h,"Milestone",{^2001-1-2},{^2001-1-2},"MKey")
		.AddBar(h,"Task",{^2001-1-3},{^2001-1-7})
	endwith
endwith
1645:
How can I change the visual appearance of the buttons on the control's overview part

with thisform.G2antt1
	var_s = "gBFLBCJwBAEHhEJAADhABdQFg6AADACAxRDAMgBQKAAzQFAYawdBgABoGUZ4JhUAIIRZGMIjFDcEwxC6NIpAWCYQDENQwSSMMJwSKYYBiASEYJASQZUhmHIDTbIEBxfI"
	var_s = var_s + "MIRLE6PZbmEYYfgeNY6TQCcIgVD0ExhAZ2Q4EQAKRpOFY/DBQNLgAKNCQ3LaQY7BaKgZouTYDVrVNSVFC0IBkGoSbauCIJHrGCZ1RBYMI0VDNRwHJiMbRtSyqXjGJ4pS"
	var_s = var_s + "rAcq0FAgYRHI6jZxnGL5chqPqGVjMNZ1bQuKwzT0Ld5wTYsdydBK1MIkTKKaoORZgRpYUI6FAeSgBWyPcCqPSoDrKdo4XLdYwbeAFcSPD6+NBhG7tXm/NarNTgTB6DBt"
	var_s = var_s + "hsGJbgYYw9AQVxBoOch2hEbh+nAARYkQdZ7CMPYGH+FxmlqbJ5lqDAdjMC5AmIW54hwaBvA4IQ8D+T8IFscgenAAZMHiEgWiWdRZlSAAhAkFAGq6dAdEcIYVF4QJKCAH"
	var_s = var_s + "QDBCBJYGUGQNhCEIhiSCJaGAYQWBsIYmEEFgJAGQ42CyC4iliPgygsT4olSXg3g2Qwwk0MpMiMLJIg8Y54niTYOmPPJMDMDIonSSU7jMJJbDaTYjlYUoMmMCRWFQAAlE"
	var_s = var_s + "kZgtDgTgjgCJQpEoIgkgkIQHnIAB7CACARnIaIaiaGYuG6GxmhmFB7CGSICAyHwoAmQxQlQNIlikWgthYIwaAYVQvAuQpsg0IxIhKTIzCwToTiiaYACkChGhKJJpEOQo"
	var_s = var_s + "WC+C5imyCgiggYpUzMZ5Yj6AIfg6UpcjgLYInIPILhOTYaEIUg9EoItfCGCByAiCV2lIKILCGK4qnKO4YggWpQgIJxJmIaJhDgDgKECaIykkUhUhILQLEKRh9iiYpzCS"
	var_s = var_s + "SQxmgcgkm2NppAKbI8C4RoBiQYgSgSMQQEEEIDjECBDA8LorjKa47EQMQSm4DpEhEKBDBeRgBGqMQnmkA5in4JAJAINoEC6JR4jyaQ6E6AhEhIIxNBMRJPiQCYyHCGAU"
	var_s = var_s + "gUMQwEgEhhkEOBHBOBJxCMHJHjGXB/CKSBxlENwaj1qgsEwERICIDB/iQDgjgiYYvE2cx8l2KIinoEI5CYSYiFqEAz0mMBZBbwIkEsEN+gMSpSHSTITEqSoEFyGBHCoS"
	var_s = var_s + "oihqEAsgsIo8ikKhKGiVJ6AADwTkicQlAkUhElA+Z4VUHpHGuRA8lMdI9DscJc8r5QQAaIYsGUOpOjoOwHCEJAUgBh8B1EAAcHIzg5gPCGNgdQfRPhnGiLINhhQEDCBc"
	var_s = var_s + "GUDYphxjLHkNgfwTARhiHEBYWAVxpI1HQDcDjthiAADoKcCgJgbs7FyG4LQagBBgE0CMOYOxLhtGY/AcAegNgTHIPkHISAHADEQNYOA2BwAHEQHABwQxMDbCQEscoEBA"
	var_s = var_s + "AgEOD0V4cR0jyGCPAPwHAvh0EAOIHIDRfA/EaGMfYfguAACiBQIg/xWAbH0F8J4bxSD6G8MUMo7Q9ieHuI8eA0gLjfG2PUPQnwvhvHsPsGABxhD8E+AMbgfhVDJH2L8U"
	var_s = var_s + "48wAjbEGPwPo7x8j4F4FccwHAhhiEgBQEQhAnCDGgHwBonxiAZD+G8Lo/hHj3H8PELIiBwgOFCNQHAqQAhYBWAUIARAECgHyKkIIqAIgGGCLgUIFAhB5CQAcFAGgcEHH"
	var_s = var_s + "KBwUYkAdiHDgOaAIKBigYCCFAFQhBzChAWKEOYzwDhCEwFMBQNxwD3C8CsPgHQhANEuA4Uw+gdhHDAOwBogRYAzFuGAQIEgQAzCSGUAIbAXAFCiKIGghhBCQAeAFIgDg"
	var_s = var_s + "wjMByEAAYXg1hiEwFgBYAQugAGIPsTodgnDSBgMca4LhqChCgD4CIYgYBDmcI4GIxgUCYAm1oPIjwgjmFQMYWA1gNCiBUqcII6gegUEAHwB4oRwhzEGLge4GAOC6HUAc"
	var_s = var_s + "MIsAbCGDqLYHYVBACTAkIIIAYigCIGcBQCArQKiiFQFERQUQhDMAOBgcIWAggUBGIMfAVAHhCBwEgBAMg+jbFqCcHYLxvg4D2A8QI3AziMHiJoUgFhACyCwIINofwHiJ"
	var_s = var_s + "DAJUKw2B2ARGEEAIwCxIh2BaNQQA/ROBRGoFYQ48B/AeEGEt99lQOgDFgGcAtFgdgHEANIMAhAIDKAygkQAEAAjxBeIoCI7QfjUEEEwDIIgWBFEQHUSANxsAqEEEUdwl"
	var_s = var_s + "A4iJCSFYEwhBsCXE0KoIAexnj4DoDkEwaBmgYCGAwMADAkCFCMMYAQOgMhQEIHsaIVQQDXFOOgRtwAUguAcAUU1iw1CWA6OwdIOQFBxCgCkDgeBribBmIgP4KQiAAB+K"
	var_s = var_s + "oAg2QNiDDoG0BQyQzg+EGOAWAFgRC4DsEURQYAdhWFKAoKAVQAB/AcHEaAORiioFqBYMWFATCZEsBsIYcA0gMGCJwGAhg4DQAwKsDAYQGzZBkAcSA8gODEBEGQVIQhaj"
	var_s = var_s + "UEeeYKY1QIDrBCIAEg0xIAwEgBNkAAADUTA6B4MQEwv0UEGLAUgzhf04AKGEg4BhYD2B0MUAABApAAvqI8WAqAdDGGwJsEIXwWDtE0AAA4fhmDZCmJMMwbBkgBIC"
	.VisualAppearance.Add(1,var_s)
	with .Chart
		.PaneWidth(0) = 0
		.LevelCount = 2
		.OverviewVisible = 2
		.AllowOverviewZoom = 1
		.Label(16777216) = ""
		.Label(0) = ""
	endwith
	.Chart.OverviewSelBackColor = 0x1ffff00
endwith
1644:
Is there a way to show the Start and End dates in mm-dd-yyyy format

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

with thisform.G2antt1
	.BeginUpdate
	.MarkSearchColumn = .F.
	.Items.AllowCellValueToItemBar = .T.
	with .Chart
		.LevelCount = 2
		.FirstVisibleDate = {^2000-12-25}
		.PaneWidth(0) = 196
	endwith
	with .Columns.Add("Start")
		.Def(18) = 1
		.Def(19) = "K1"
		.FormatColumn = "(1 array (0:=(shortdateF(value) split `/`))) + `-` + (0 array (=:0) ) + `-` + (2 array (=:0) )"
	endwith
	with .Columns.Add("End")
		.Def(18) = 2
		.Def(19) = "K1"
		.FormatColumn = "(1 array (0:=(shortdateF(value) split `/`))) + `-` + (0 array (=:0) ) + `-` + (2 array (=:0) )"
	endwith
	with .Items
		.AddBar(.AddItem(),"Task",{^2001-1-1},{^2001-1-5},"K1")
		.AddBar(.AddItem(),"Task",{^2001-1-2},{^2001-1-6},"K1")
	endwith
	.EndUpdate
endwith
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 thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Task")
	.Chart.FirstVisibleDate = {^2000-12-29}
	.Chart.PaneWidth(0) = 48
	with .Chart.Bars.Item("Task")
		.Pattern = 1
		.Height = 17
	endwith
	with .Chart.Bars.Item("Progress")
		.Pattern = 1
		.Height = 17
		.Shape = 1
		.Color = RGB(0,0,255)
	endwith
	with .Chart.Bars.Add("Task%Progress")
		.Pattern = 1
		.Height = 17
		.Shortcut = "Percent"
	endwith
	.DefaultItemHeight = 21
	with .Items
		h = .AddItem("Task 1")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-5},"")
		.ItemBar(h,"",33) = 4112616
		.ItemBar(h,"",3) = "<fgcolor=FFFFFF><sha 0;;0>Pause"
		.AddBar(h,"Task",{^2001-1-9},{^2001-1-12},"white")
		.ItemBar(h,"white",33) = 4112616
		.ItemBar(h,"white",3) = "<fgcolor=FFFFFF>Pause"
		h = .AddItem("Task 2")
		.AddBar(h,"Task",{^2001-1-3},{^2001-1-4},"")
		.ItemBar(h,"",33) = 2017557
		.ItemBar(h,"",3) = "<fgcolor=FFFFFF><sha 0;;0>Production"
		.AddBar(h,"Task",{^2001-1-10},{^2001-1-11},"white")
		.ItemBar(h,"white",33) = 2017557
		.ItemBar(h,"white",3) = "<fgcolor=FFFFFF>Production"
		h = .AddItem("Task 3")
		.AddBar(h,"Percent",{^2001-1-3},{^2001-1-4},"")
		.ItemBar(h,"",12) = 0.5
		.ItemBar(h,"",33) = 2017557
		.ItemBar(h,"",3) = "<fgcolor=FFFFFF><sha 0;;0>Pausing"
		.AddBar(h,"Percent",{^2001-1-10},{^2001-1-11},"white")
		.ItemBar(h,"white",12) = 0.5
		.ItemBar(h,"white",33) = 2017557
		.ItemBar(h,"white",3) = "<fgcolor=FFFFFF>Pausing"
		h = .AddItem("Task 4")
		.AddBar(h,"Task",{^2001-1-3},{^2001-1-4},"")
		.ItemBar(h,"",33) = 8421504
		.ItemBar(h,"",3) = "<fgcolor=FFFFFF><sha 0;;0>Planned downtime"
		.AddBar(h,"Task",{^2001-1-10},{^2001-1-11},"white")
		.ItemBar(h,"white",33) = 8421504
		.ItemBar(h,"white",3) = "<fgcolor=FFFFFF>Planned downtime"
	endwith
	.EndUpdate
endwith
1641:
How do I programmatically exclude items from the filter

with thisform.G2antt1
	.BeginUpdate
	.LinesAtRoot = -1
	with .Columns.Add("Items")
		.DisplayFilterButton = .T.
		.DisplayFilterPattern = .F.
		.FilterList = 9472 && FilterListEnum.exShowExclude Or FilterListEnum.exShowFocusItem Or FilterListEnum.exShowCheckBox
	endwith
	with .Items
		.AddItem("Item 1")
		.AddItem("Item 2")
		.AddItem("Item 3")
		.AddItem("Item 4")
	endwith
	with .Columns.Item(0)
		.FilterType = 752 && FilterTypeEnum.exFilterExclude Or FilterTypeEnum.exFilter
		.Filter = "Item 1|Item 4"
	endwith
	.ApplyFilter
	.EndUpdate
endwith
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). ***
LPARAMETERS Item,Cancel
	with thisform.G2antt1
		Cancel = .T.
	endwith

with thisform.G2antt1
	.BeginUpdate
	.SingleSel = .T.
	.ExpandOnDblClick = .F.
	with .Chart
		.LevelCount = 2
		.AllowLinkBars = .F.
		.DrawGridLines = -1
		.FirstVisibleDate = {^2000-12-29}
		.HistogramVisible = .T.
		.HistogramHeight = 167
		.PaneWidth(0) = 128
		.HistogramView = 1040 && HistogramViewEnum.exHistogramNoGrouping Or HistogramViewEnum.exHistogramUnlockedItems
		with .Bars.Item("Task")
			.HistogramType = 256
			.HistogramItems = 6
			.HistogramPattern = 1
			.HistogramItems = -40000
			.HistogramCriticalValue = 100000
			.HistogramRulerLinesColor = RGB(128,128,128)
			.HistogramCumulativeColors = 3
		endwith
		.ShowNonworkingDates = .F.
	endwith
	.Columns.Add("Costs").Visible = .F.
	.Columns.Add("Tasks").Visible = .T.
	with .Items
		h = .AddItem("Estimated")
		.CellValue(h,1) = "Task 1"
		.AddBar(h,"Task",{^2001-1-1},{^2001-1-10})
		.ItemBar(h,"",21) = 8000
		hR = .InsertItem(h,Null,"Actual")
		.AddBar(hR,"Task",{^2001-1-1},{^2001-1-10})
		.ItemBar(hR,"",21) = 9000
		.GroupBars(h,"",.T.,hR,"",.T.)
		.GroupBars(h,"",.F.,hR,"",.F.)
		hR = .InsertItem(h,Null,"Cost")
		.AddBar(hR,"Task",{^2001-1-1},{^2001-1-10})
		.ItemBar(hR,"",21) = 200
		.GroupBars(h,"",.T.,hR,"",.T.)
		.GroupBars(h,"",.F.,hR,"",.F.)
		h = .AddItem("Estimated")
		.CellValue(h,1) = "Task 2"
		.AddBar(h,"Task",{^2001-1-9},{^2001-1-15})
		.ItemBar(h,"",21) = 7000
		hR = .InsertItem(h,Null,"Actual")
		.AddBar(hR,"Task",{^2001-1-9},{^2001-1-15})
		.ItemBar(hR,"",21) = 8000
		.GroupBars(h,"",.T.,hR,"",.T.)
		.GroupBars(h,"",.F.,hR,"",.F.)
		hR = .InsertItem(h,Null,"Cost")
		.AddBar(hR,"Task",{^2001-1-9},{^2001-1-15})
		.ItemBar(hR,"",21) = 150
		.GroupBars(h,"",.T.,hR,"",.T.)
		.GroupBars(h,"",.F.,hR,"",.F.)
	endwith
	.EndUpdate
endwith
1639:
How can I align the caption of the bar

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

with thisform.G2antt1
	.BeginUpdate
	.LinesAtRoot = -1
	.Object.Background(26) = RGB(255,255,255)
	with .Columns.Add("Items")
		.DisplayFilterButton = .T.
		.DisplayFilterPattern = .F.
		.FilterList = 1315 && FilterListEnum.exShowFocusItem Or FilterListEnum.exShowCheckBox Or FilterListEnum.exSortItemsAsc Or FilterListEnum.exLeafItems
	endwith
	with .Items
		h = .AddItem("Root 1")
		.InsertItem(h,Null,"Child 1")
		.InsertItem(h,Null,"Child 2")
		.ExpandItem(h) = .T.
		h = .AddItem("Root 2")
		.InsertItem(h,Null,"Child 1")
		.InsertItem(h,Null,"Child 2")
		.InsertItem(h,Null,"Child 3")
		.ExpandItem(h) = .T.
	endwith
	.EndUpdate
endwith
1637:
How can I arrange the columns using CRD (eXCRD ) strings (Sample 2)

with thisform.G2antt1
	.BeginUpdate
	.DrawGridLines = -1
	.DefaultItemHeight = 36
	with .Columns
		with .Add("C1")
			.Def(0) = .T.
			.Width = 18
			.AllowSizing = .F.
		endwith
		with .Add("C2")
			.Def(0) = .T.
			.Width = 18
		endwith
		.Add("Column1").Visible = .F.
		.Add("Column2").Visible = .F.
		.Add("Column3").Visible = .F.
		with .Add("FormatLevel")
			.FormatLevel = "18;"+chr(34)+"Info"+chr(34)+"[a=17]/(2/3,4)"
			.Def(32) = "2/3,4"
		endwith
	endwith
	with .Chart
		.DrawGridLines = -1
		.FirstVisibleDate = {^2014-6-22}
	endwith
	with .Items
		h = .AddItem("Cell 1.1")
		.CellValue(h,1) = "Cell 1.2"
		.CellValue(h,2) = "Cell 1.3"
		.AddBar(h,"Task",{^2014-6-23},{^2014-6-25})
		h = .AddItem("Cell 2.1")
		.CellValue(h,1) = "Cell 2.2"
		.CellValue(h,2) = "Cell 2.3"
		.AddBar(h,"Task",{^2014-6-26},{^2014-6-28})
	endwith
	.EndUpdate
endwith
1636:
How can I arrange the columns using CRD (eXCRD ) strings (Sample 1)

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

*** AddItem event - Occurs after a new Item has been inserted to Items collection. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

*** MouseMove event - Occurs when the user moves the mouse. ***
LPARAMETERS Button,Shift,X,Y
	with thisform.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.")
	endwith

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.AllowCreateBar = 0
		.FirstVisibleDate = {^1994-8-3}
		.PaneWidth(0) = 256
		.LevelCount = 2
		.UnitScale = 4096
		.FirstWeekDay = 1
		.OverviewVisible = 2
	endwith
	.ColumnAutoResize = .F.
	.ContinueColumnScroll = .F.
	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)
	endwith
	.DataSource = rs
	.AutoDrag = 16
	.ScrollWidth = 4
	.ScrollHeight = 4
	.Object.Background(384) = RGB(192,192,192)
	.Object.Background(392) = RGB(192,192,192)
	.Object.Background(404) = RGB(224,224,224)
	.Object.Background(388) = RGB(128,128,128)
	.Object.Background(276) = RGB(224,224,224)
	.Object.Background(264) = RGB(192,192,192)
	.Object.Background(260) = RGB(128,128,128)
	.Object.Background(256) = RGB(192,192,192)
	.ScrollButtonWidth = 0
	.ScrollButtonHeight = 0
	.EndUpdate
endwith
1633:
How can I display values in the histogram legend

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Tasks")
	with .Columns.Add("Effort")
		.Def(18) = 21
		.Editor.EditType = 4
	endwith
	with .Chart
		.LevelCount = 2
		.NonworkingDays = 0
		.PaneWidth(0) = 96
		.FirstVisibleDate = {^2005-6-20}
		.HistogramVisible = .T.
		.HistogramHeight = 128
		.HistogramView = 112
		with .Bars.Item("Task")
			.HistogramPattern = .Pattern && .Pattern
			.HistogramType = 0
			.HistogramCriticalValue = 3
			.HistogramItems = -7
			.HistogramGridLinesColor = RGB(192,192,192)
			.HistogramRulerLinesColor = RGB(0,0,1)
		endwith
	endwith
	with .Items
		.AllowCellValueToItemBar = .T.
		h1 = .AddItem("Task 1")
		.AddBar(h1,"Task",{^2005-6-21},{^2005-6-23})
		.CellValue(h1,1) = 4
		h1 = .AddItem("Task 2")
		.AddBar(h1,"Task",{^2005-6-24},{^2005-6-26})
		.CellValue(h1,1) = 3
		h1 = .AddItem("Task 3")
		.AddBar(h1,"Task",{^2005-6-27},{^2005-6-29})
		.CellValue(h1,1) = 2
		h1 = .AddItem("Task 4")
		.AddBar(h1,"Task",{^2005-6-30},{^2005-7-2})
		.CellValue(h1,1) = 1
	endwith
	.EndUpdate
endwith
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 thisform.G2antt1
	with .Columns
		.Add("First")
		.Add("Second")
		.Add("Third")
	endwith
	.SortBarVisible = .T.
	.SingleSort = .F.
	.AllowGroupBy = .T.
	.Layout = "SingleSort = "+chr(34)+"C0:1"+chr(34)+";MultipleSort = "+chr(34)+"C1:2 C2:1"+chr(34)+""
endwith
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 thisform.G2antt1
	with .Columns
		.Add("First")
		.Add("Second")
		.Add("Third")
	endwith
	.SortBarVisible = .T.
	.SingleSort = .F.
	.Layout = "SingleSort = "+chr(34)+"C0:1"+chr(34)+""
endwith
1630:
How can I specify different working parts for different items

with thisform.G2antt1
	.BeginUpdate
	with .Columns
		.Add("Tasks")
		with .Add("Working")
			.Def(18) = 258
			.Def(19) = "A"
			.FormatColumn = "(0:=round(value*24)) != 0 ? =:0 : ''"
		endwith
		with .Add("NonWorking")
			.Def(18) = 259
			.Def(19) = "A"
			.FormatColumn = "(0:=round(value*24)) != 0 ? =:0 : ''"
		endwith
	endwith
	with .Chart
		.PaneWidth(0) = 78
		.AllowCreateBar = 1
		.FirstVisibleDate = {^2005-6-20}
		.DrawLevelSeparator = .F.
		.LevelCount = 3
		.Level(1).DrawGridLines = .F.
		.AllowInsideZoom = .T.
		.DrawDateTicker = .T.
		.DateTickerLabel = "<%mmm%> <%d%><br><b><%hh%>:<%nn%></b>"
		.MarkSelectDateColor = 0x7ffff8ee
		with .DefaultInsideZoomFormat
			.OwnerLabel = "<%mmm%> <%d%>"
			.BackColor = RGB(238,248,255)
			.BackColorChart = .BackColor
			.InsideCount = 4
			.InsideLabel = "<b><%hh%></b>"
		endwith
		.InsideZooms.Add({^2005-6-22})
		.DrawGridLines = 2
		.Bars.Item("Split").Color = RGB(255,0,0)
		with .Bars.Add("Task:Split")
			.Color = RGB(255,0,0)
			.Pattern = 6
			.Shortcut = "Task"
		endwith
	endwith
	with .Items
		.AllowCellValueToItemBar = .T.
		h1 = .AddItem("Task 1")
		.AddBar(h1,"Task",{^2005-6-22 8:00:00},{^2005-6-28},"A")
		.ItemBar(h1,"A",20) = .T.
		.ItemNonworkingUnits(h1,.F.) = "weekday(value) in (1,2)"
		.ItemNonworkingUnits(h1,.T.) = "weekday(value) in (1,2) or (hour(value)<8 or hour(value)>=16 )"
		h2 = .AddItem("Task 1")
		.AddBar(h2,"Task",{^2005-6-22 4:00:00},{^2005-6-29 12:00:00},"A")
		.ItemBar(h2,"A",20) = .T.
		.ItemNonworkingUnits(h2,.F.) = "weekday(value) in (1,2)"
		.ItemNonworkingUnits(h2,.T.) = "weekday(value) in (1, 2) or (hour(value)<4 or hour(value)>=12 )"
	endwith
	.EndUpdate
endwith
1629:
How can I define the default bar's foreground color

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Task")
	with .Chart
		.FirstVisibleDate = {^2001-1-1}
		.PaneWidth(0) = 48
		with .Bars.Item("Task")
			.Height = 15
			.Pattern = 1
			.Def(8) = 16777215
		endwith
	endwith
	with .Items
		.AddBar(.AddItem("Task 1"),"Task",{^2001-1-2},{^2001-1-6},"K1","bar A")
		.AddBar(.AddItem("Task 2"),"Task",{^2001-1-2},{^2001-1-6},"K2","bar B")
		.AddBar(.AddItem("Task 3"),"Task",{^2001-1-2},{^2001-1-6},"K3","bar C")
	endwith
	.EndUpdate
endwith
1628:
How can I print the selected items only

*** AddItem event - Occurs after a new Item has been inserted to Items collection. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	.SingleSel = .F.
	.ColumnAutoResize = .F.
	.ContinueColumnScroll = .F.
	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)
	endwith
	.DataSource = rs
	.Chart.FirstVisibleDate = {^1994-8-4}
	with .Items
		.SelectItem(.ItemByIndex(0)) = .T.
		.SelectItem(.ItemByIndex(2)) = .T.
		.SelectItem(.ItemByIndex(4)) = .T.
	endwith
	.EndUpdate
	with CreateObject("Exontrol.Print")
		.Options = "Print = Selection"
		.PrintExt = thisform.G2antt1.Object
		.Preview
	endwith
endwith
1627:
How can I sort the columns to be displayed on the columns floating bar
with thisform.G2antt1
	.ColumnAutoResize = .F.
	with .Columns
		.Add("City").Visible = .F.
		.Add("Start").Visible = .F.
		.Add("End").Visible = .F.
	endwith
	.ColumnsFloatBarVisible = .T.
	.ColumnsFloatBarSortOrder = 1
endwith
1626:
How can I add a vertical padding for my cells
with thisform.G2antt1
	.BeginUpdate
	.DrawGridLines = -1
	with .Columns.Add("Padding")
		.Def(0) = .T.
		.Def(16) = .F.
		.Def(48) = 6
		.Def(49) = 6
		.Def(50) = 6
		.Def(51) = 6
	endwith
	with .Items
		.AddItem("padding")
		.AddItem("padding")
	endwith
	.EndUpdate
endwith
1625:
Trying to fill the second columns. How can I do that
with thisform.G2antt1
	.BeginUpdate
	with .Columns
		.Add("Column 1")
		.Add("Column 2")
		.Add("Column 3")
	endwith
	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"
	endwith
	.EndUpdate
endwith
1624:
How can I specify a different background color for item, in chart or list panels

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

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Task")
	.Chart.FirstVisibleDate = {^2001-1-1}
	.Chart.PaneWidth(0) = 64
	.Debug = .T.
	var_s = "gBFLBCJwBAEHhEJAAChABL8IQAAYAQGKIaBwAKBQAGaAoDDQNgyQwAAxwdBMKgBBCLIxhEYobgmGIaRjHcQjEKoSxHEqIRpGCRoJiqLIZAJIEZRZAcaQvGSQYRASCRND"
	var_s = var_s + "EOA0TDAY4jPD4aQiGIbRjjeL5YjiNo2UxTNRQCEB"
	.VisualAppearance.Add(1,var_s)
	with .Items
		h = .AddItem("Task 1")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-4},"A")
		.AddBar(h,"Task",{^2001-1-5},{^2001-1-7},"B1")
		.AddBar(h,"Task",{^2001-1-8},{^2001-1-17},"B2")
		.AddBar(.AddItem("Task 2"),"Task",{^2001-1-2},{^2001-1-4},"K3")
		.AddBar(.AddItem("Task 4"),"Task",{^2001-1-2},{^2001-1-4},"K4")
		.ItemBar(0,"<*>",33) = 255
		.ItemBar(0,"<*>",51) = 16777216
	endwith
	.EndUpdate
endwith
1622:
How can I change the the focus rectangle

with thisform.G2antt1
	.BeginUpdate
	.VisualAppearance.Add(1,"E:\Exontrol\ExG2antt\sample\EBN\hoverinsert.ebn")
	.Object.Background(19) = 0x1000000
	with .Columns.Add("Check")
		.Def(48) = 2
		.Def(0) = .T.
	endwith
	.SelForeColor = .ForeColor
	.SelBackColor = .BackColor
	.DefaultItemHeight = 22
	.ShowFocusRect = .T.
	with .Items
		.AddItem("")
		.AddItem("")
	endwith
	.EndUpdate
endwith
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 thisform.G2antt1
	.BeginUpdate
	with .Columns.Add("Column/Cell-Same").Editor
		.EditType = 3
		.AddItem(0,"Zero")
		.AddItem(1,"One")
		.AddItem(2,"Two")
	endwith
	with .Columns.Add("Column/Cell-Different").Editor
		.EditType = 1
	endwith
	with .Items
		.AddItem()
		h = .AddItem(0)
		with .CellEditor(h,1)
			.EditType = 3
			.AddItem(3,"Three")
			.AddItem(4,"Four")
		endwith
		.CellValue(h,1) = 3
		.AddItem()
		h = .AddItem(0)
		with .CellEditor(h,1)
			.EditType = 6
			.AddItem(1,"Single")
			.AddItem(2,"Double")
		endwith
		.CellValue(h,1) = 3
	endwith
	.EndUpdate
endwith
1620:
How can I specify just a few fonts in a FontType editor
with thisform.G2antt1
	.BeginUpdate
	.DefaultItemHeight = 22
	.DrawGridLines = -2
	with .Columns.Add("Fonts").Editor
		.EditType = 10
		.ClearItems
		.AddItem(0,"Calibri")
		.AddItem(1,"Arial")
		.AddItem(2,"Rockwell")
		.AddItem(3,"Tahoma")
		.SortItems(.T.)
		.DropDownRows = 4
	endwith
	with .Items
		.AddItem("Tahoma")
	endwith
	.EndUpdate
endwith
1619:
How can I show only the working-hours in chart and histogram panels

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Tasks")
	.DrawGridLines = -1
	with .Chart
		.PaneWidth(0) = 40
		.FirstVisibleDate = {^2005-6-20}
		.HistogramVisible = .T.
		.HistogramHeight = 64
		.HistogramView = 112
		.LevelCount = 3
		.NonworkingHours = 16253183
		with .Bars.Item("Task")
			.HistogramType = 1
			.HistogramPattern = .Pattern && .Pattern
		endwith
		.ShowNonworkingDates = .F.
		.ShowNonworkingUnits = .F.
		.DrawGridLines = -1
		.UnitScale = 65536
		.UnitWidth = 4
		.ResizeUnitScale = .UnitScale && .UnitScale
	endwith
	with .Items
		h = .AddItem("Task A")
		.AddBar(h,"Task",{^2005-6-23 11:00:00},{^2005-6-23 12:00:00})
		.ItemBar(h,"",21) = "0.0416666"
		.ItemBar(h,"",20) = .T.
		h = .AddItem("Task B")
		.AddBar(h,"Task",{^2005-6-23 12:00:00},{^2005-6-23 16:00:00})
		.ItemBar(h,"",21) = "0.0416666"
		.ItemBar(h,"",20) = .T.
	endwith
	.EndUpdate
endwith
1618:
How do you embed HTML options into the anchor click string
*** AnchorClick event - Occurs when an anchor element is clicked. ***
LPARAMETERS AnchorID,Options
	with thisform.G2antt1
		DEBUGOUT( AnchorID )
		DEBUGOUT( Options )
	endwith

with thisform.G2antt1
	.BeginUpdate
	with .Columns
		.Add("Car").Def(17) = 1
	endwith
	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>")
	endwith
	.EndUpdate
endwith
1617:
How do I add a checkbox column (method 2)

*** CellStateChanged event - Fired after cell's state has been changed. ***
LPARAMETERS Item,ColIndex
	with thisform.G2antt1
		DEBUGOUT( "CheckBox Changed:" )
		DEBUGOUT( .Items.CellState(Item,ColIndex) )
	endwith

with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Check").Def(0) = .T.
	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
	endwith
	.EndUpdate
endwith
1616:
How do I add a checkbox column (method 1)

*** Change event - Occurs when the user changes the cell's content. ***
LPARAMETERS Item,ColIndex,NewValue
	with thisform.G2antt1
		DEBUGOUT( "CheckBox Changed:" )
		DEBUGOUT( NewValue )
	endwith

with thisform.G2antt1
	.BeginUpdate
	with .Columns.Add("Check")
		with .Editor
			.EditType = 19
			.Option(17) = 1
		endwith
	endwith
	with .Items
		.AddItem(0)
		.AddItem(1)
		.AddItem(0)
		.AddItem(1)
	endwith
	.EndUpdate
endwith
1615:
How do I change the progress bar's appearance

with thisform.G2antt1
	with .VisualAppearance
		.Add(1,"c:\exontrol\images\normal.ebn")
		.Add(2,"c:\exontrol\images\pushed.ebn")
	endwith
	var_Editor = .Columns.Add("Progress").Editor
	with var_Editor
		.EditType = 13
		.Option(11) = 16777216
		.Option(13) = 33554432
	endwith
	.Items.AddItem(33)
endwith
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 thisform.G2antt1
	.BeginUpdate
	var_s = "gBFLBCJwBAEHhEJAEGg4BVEIQAAYAQGKIYBkAKBQAGaAoDDMOQwQwAAxjGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQCWIAzATGYBRfIUEgjBM6ExwG78eg"
	var_s = var_s + "BHp/ZpkACIJJAaRjHQdJxGKKMQB9DIhCZpeKhWgkKIJBzOEyBRC4ERBGqNGrsIgLEqWZpnWhaNpWXYTLyBN64LhuK46g53O6wLxvK6hEr2dJ/YBcIAOfghf4NQ7EMRxL"
	var_s = var_s + "C8Mw3BDvYDkOAABAIgI="
	.VisualAppearance.Add(1,var_s)
	.SelBackColor = 0x1fffffe
	.SelForeColor = RGB(0,0,0)
	.SelBackColor = 0x1000000
	.ShowFocusRect = .F.
	.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)
	endwith
	.EndUpdate
endwith
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 thisform.G2antt1
	.BeginUpdate
	.SelBackMode = 1
	.DefaultItemHeight = 22
	.ShowFocusRect = .F.
	.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)
	endwith
	.EndUpdate
endwith
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 thisform.G2antt1
	.BeginUpdate
	.SelBackColor = .BackColor
	.SelForeColor = .ForeColor
	.DefaultItemHeight = 22
	.ShowFocusRect = .T.
	.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)
	endwith
	.EndUpdate
endwith
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). ***
LPARAMETERS Item,Cancel
	with thisform.G2antt1
		DEBUGOUT( "BeforeExpandItem" )
		DEBUGOUT( Item )
		.Items.InsertItem(Item,Null,"new child")
	endwith

with thisform.G2antt1
	.BeginUpdate
	.LinesAtRoot = -1
	with .Columns
		with .Add("Items")
			.DisplayFilterButton = .T.
			.FilterList = 4
		endwith
	endwith
	with .Items
		.ItemHasChildren(.InsertItem(Null,Null,"Group 1")) = .T.
		.ItemHasChildren(.InsertItem(Null,Null,"Group 2")) = .T.
	endwith
	.EndUpdate
endwith
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. ***
LPARAMETERS nop
	with thisform.G2antt1
		DEBUGOUT( "UnitScale: " )
		DEBUGOUT( .Chart.UnitScale )
	endwith

with thisform.G2antt1
	with .Chart
		.PaneWidth(0) = 128
		.LevelCount = 2
		.OverviewVisible = 2
		.AllowOverviewZoom = 1
	endwith
endwith
1609:
How can define a minimum and maximum in a column SpinType
with thisform.G2antt1
	with .Columns
		with .Add("SpinType between 5 and 150").Editor
			.EditType = 20
			.Numeric = -1
			.Option(41) = 0
			.Option(43) = 5
			.Option(44) = 150
		endwith
	endwith
	.Items.AddItem(50)
endwith
1608:
How I can change the title of the time-scale overview. (Example: Month by 'Mes', Day by 'Dia')

with thisform.G2antt1
	with .Chart
		.PaneWidth(0) = 128
		.LevelCount = 2
		.OverviewVisible = 2
		.AllowOverviewZoom = 1
		.OverviewZoomCaption = "AŮo|||Mes|||Dia|||"
		.Label(1) = ""
		.Label(2) = ""
		.Label(17) = ""
		.Label(256) = ""
		.Label(65536) = ""
		.Label(1048576) = ""
		.Label(16777216) = ""
	endwith
endwith
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 thisform.G2antt1
	.OnResizeControl = 1
endwith
1606:
How can I clear the colors for all bars at once
with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Task")
	.Chart.FirstVisibleDate = {^2001-1-1}
	.Chart.PaneWidth(0) = 64
	.Debug = .T.
	with .Items
		h = .AddItem("Task 1")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-4},"A")
		.ItemBar(h,"A",33) = 65280
		.AddBar(h,"Task",{^2001-1-5},{^2001-1-7},"B1")
		.AddBar(h,"Task",{^2001-1-8},{^2001-1-17},"B2")
		.AddBar(.AddItem("Task 2"),"Task",{^2001-1-2},{^2001-1-4},"K3")
		.AddBar(.AddItem("Task 4"),"Task",{^2001-1-2},{^2001-1-4},"K4")
		.ItemBar(0,"<*>",33) = 0
	endwith
	.EndUpdate
endwith
1605:
How can I change the colors for all bars at once
with thisform.G2antt1
	.BeginUpdate
	.Columns.Add("Task")
	.Chart.FirstVisibleDate = {^2001-1-1}
	.Chart.PaneWidth(0) = 64
	.Debug = .T.
	with .Items
		h = .AddItem("Task 1")
		.AddBar(h,"Task",{^2001-1-2},{^2001-1-4},"A")
		.AddBar(h,"Task",{^2001-1-5},{^2001-1-7},"B1")
		.AddBar(h,"Task",{^2001-1-8},{^2001-1-17},"B2")
		.AddBar(.AddItem("Task 2"),"Task",{^2001-1-2},{^2001-1-4},"K3")
		.AddBar(.AddItem("Task 4"),"Task",{^2001-1-2},{^2001-1-4},"K4")
		.ItemBar(0,"<*>",33) = 255
	endwith
	.EndUpdate
endwith
1604:
How can I show my custom bars in the histogram (method 3)

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.LevelCount = 2
		.AllowLinkBars = .F.
		.DrawGridLines = -1
		.FirstVisibleDate = {^2000-12-31}
		.HistogramVisible = .T.
		.HistogramHeight = 64
		.PaneWidth(0) = 128
		with .Bars.Item("Task")
			.HistogramType = 256
			.HistogramItems = 6
			.HistogramPattern = .Pattern && .Pattern
			.HistogramCumulativeOriginalColorBars = 1
			.OverlaidType = 1
		endwith
	endwith
	.Columns.Add("Column")
	with .Items
		.AddBar(.AddItem("Item 1"),"Task",{^2001-1-2},{^2001-1-4})
		.AddBar(.AddItem("Item 2"),"Task",{^2001-1-3},{^2001-1-7})
		h = .AddItem("Item 3")
		.AddBar(h,"Task",{^2001-1-8},{^2001-1-12})
		.ItemBar(h,"",33) = 255
	endwith
	.EndUpdate
endwith
1603:
How can I show my custom bars in the histogram (method 2)

with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.PaneWidth(0) = 64
		.FirstVisibleDate = {^2001-1-1}
		.HistogramVisible = .T.
		.HistogramHeight = 32
		.Bars.Item("Task").HistogramPattern = 6
	endwith
	.Columns.Add("Column")
	with .Items
		.AddBar(.AddItem("Item 1"),"Task",{^2001-1-2},{^2001-1-4})
		.AddBar(.AddItem("Item 2"),"Task",{^2001-1-3},{^2001-1-7})
		h = .AddItem("Item 3")
		.AddBar(h,"Task",{^2001-1-8},{^2001-1-12})
		.ItemBar(h,"",33) = 255
	endwith
	.EndUpdate
endwith
1602:
How can I show my custom bars in the histogram (method 1)
with thisform.G2antt1
	.BeginUpdate
	with .Chart
		.PaneWidth(0) = 64
		.FirstVisibleDate = {^2001-1-1}
		.HistogramVisible = .T.
		.HistogramHeight = 32
		.Bars.Item("Task").HistogramPattern = 6
		with .Bars.Copy("Task","MyBar")
			.HistogramPattern = 5
			.Color = RGB(255,0,0)
			.HistogramColor = .Color
		endwith
	endwith
	.Columns.Add("Column")
	with .Items
		.AddBar(.AddItem("Item 1"),"Task",{^2001-1-2},{^2001-1-4})
		.AddBar(.AddItem("Item 2"),"Task",{^2001-1-3},{^2001-1-7})
		.AddBar(.AddItem("Item 3"),"MyBar",{^2001-1-8},{^2001-1-12})
	endwith
	.EndUpdate
endwith
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. ***
LPARAMETERS Item
	with thisform.G2antt1
		with .Items
			.AddBar(Item,"Task",.CellValue(Item,2),.CellValue(Item,4))
		endwith
	endwith

with thisform.G2antt1
	.BeginUpdate
	.ColumnAutoResize = .F.
	.ContinueColumnScroll = .F.
	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)
	endwith
	.DataSource = rs
	.Chart.FirstVisibleDate = {^1994-8-4}
	.EndUpdate
	with CreateObject("Exontrol.Print")
		.Options = "FitToPage = On"
		.PrintExt = thisform.G2antt1.Object
		.Preview
	endwith
endwith