1968:
How do I get the duration/working count of the bar (sample 6,excrd)

Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.DefaultItemHeight = 48
oG2antt.ShowFocusRect = .f.
oG2antt.SelBackMode = 1
oG2antt.BackColorLevelHeader = oG2antt.BackColor
oG2antt.DrawGridLines = -1
var_Chart = oG2antt.Chart
	var_Chart.DrawGridLines = 1
	' var_Chart.PaneWidth(.f.) = 64
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 64"

	var_Chart.LevelCount = 2
	var_Chart.FirstVisibleDate = {12/26/2001}
	var_Bar = var_Chart.Bars.Add("Task:Split")
		var_Bar.Shortcut = "Task"
		' var_Bar.Def(6) = "<%=%263%>"
		oG2antt.TemplateDef = "dim var_Bar"
		oG2antt.TemplateDef = var_Bar
		oG2antt.Template = "var_Bar.Def(6) = `<%=%263%>`"

		' var_Bar.Def(18) = -12
		oG2antt.TemplateDef = "dim var_Bar"
		oG2antt.TemplateDef = var_Bar
		oG2antt.Template = "var_Bar.Def(18) = -12"

	var_Chart.ColumnsFormatLevel = "1,2/3"
oG2antt.Columns.Add("Tasks")
var_Column = oG2antt.Columns.Add("Duration")
	' var_Column.Def(18) = 513
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(18) = 513"

	var_Column.Visible = .f.
	var_Column.Alignment = 0
	var_Column.FormatColumn = "value + `d`"
var_Column1 = oG2antt.Columns.Add("Working")
	' var_Column1.Def(18) = 258
	oG2antt.TemplateDef = "dim var_Column1"
	oG2antt.TemplateDef = var_Column1
	oG2antt.Template = "var_Column1.Def(18) = 258"

	var_Column1.Visible = .f.
	var_Column1.Alignment = 2
	var_Column1.FormatColumn = "value + `w`"
var_Column2 = oG2antt.Columns.Add("Working-Period")
	' var_Column2.Def(18) = 263
	oG2antt.TemplateDef = "dim var_Column2"
	oG2antt.TemplateDef = var_Column2
	oG2antt.Template = "var_Column2.Def(18) = 263"

	var_Column2.Visible = .f.
	var_Column2.Alignment = 1
	var_Column2.FormatColumn = "((value replace `\r\n` with `,`) replace `#` with ``) replace ` ` with ``"
var_Items = oG2antt.Items
	var_Items.AllowCellValueToItemBar = .t.
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{01/02/2002},{01/11/2002})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{01/03/2002},{01/15/2002})
	var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",{12/31/2001},{01/13/2002})
oG2antt.EndUpdate()

1967:
How do I get the duration/working count of the bar (sample 5)

' Occurs after a new Item has been inserted to Items collection.
function AddItem as v (Item  as  OLE::Exontrol.G2antt.1::HITEM)
	Dim var_Items as P
	oG2antt = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oG2antt.Items
		' var_Items.ItemMaxHeight(Item) = 64
		oG2antt.TemplateDef = "dim var_Items,Item"
		oG2antt.TemplateDef = var_Items
		oG2antt.TemplateDef = Item
		oG2antt.Template = "var_Items.ItemMaxHeight(Item) = 64"

end function

Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Column3 as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.BackColorAlternate = 15790320
var_Chart = oG2antt.Chart
	' var_Chart.PaneWidth(.f.) = 256
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 256"

	var_Chart.LevelCount = 2
	var_Chart.FirstVisibleDate = {01/01/2002}
	var_Bar = var_Chart.Bars.Add("Task:Split")
		var_Bar.Shortcut = "Task"
		' var_Bar.Def(6) = "<%=%263%>"
		oG2antt.TemplateDef = "dim var_Bar"
		oG2antt.TemplateDef = var_Bar
		oG2antt.Template = "var_Bar.Def(6) = `<%=%263%>`"

	var_Chart.ColumnsFormatLevel = "1,2"
	var_Chart.SelBackColor = oG2antt.SelBackColor
var_Column = oG2antt.Columns.Add("Task")
	var_Column.AllowSizing = .f.
	var_Column.Width = 48
var_Column1 = oG2antt.Columns.Add("Duration")
	' var_Column1.Def(18) = 513
	oG2antt.TemplateDef = "dim var_Column1"
	oG2antt.TemplateDef = var_Column1
	oG2antt.Template = "var_Column1.Def(18) = 513"

	var_Column1.Visible = .f.
	var_Column1.Alignment = 0
var_Column2 = oG2antt.Columns.Add("Working")
	' var_Column2.Def(18) = 258
	oG2antt.TemplateDef = "dim var_Column2"
	oG2antt.TemplateDef = var_Column2
	oG2antt.Template = "var_Column2.Def(18) = 258"

	var_Column2.Visible = .f.
	var_Column2.Alignment = 2
var_Column3 = oG2antt.Columns.Add("Working-Period")
	' var_Column3.Def(18) = 263
	oG2antt.TemplateDef = "dim var_Column3"
	oG2antt.TemplateDef = var_Column3
	oG2antt.Template = "var_Column3.Def(18) = 263"

	' var_Column3.Def(16) = .f.
	oG2antt.TemplateDef = "dim var_Column3"
	oG2antt.TemplateDef = var_Column3
	oG2antt.Template = "var_Column3.Def(16) = False"

var_Items = oG2antt.Items
	var_Items.AllowCellValueToItemBar = .t.
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{01/02/2002},{01/12/2002})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{01/03/2002},{01/15/2002})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{01/04/2002},{01/16/2002})
oG2antt.EndUpdate()

1966:
How do I get the duration/working count of the bar (sample 4)

Dim oG2antt as P
Dim var_Bar as local
Dim var_Chart as P
Dim var_Column as local
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
var_Chart = oG2antt.Chart
	' var_Chart.PaneWidth(.f.) = 64
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 64"

	var_Chart.LevelCount = 2
	var_Chart.FirstVisibleDate = {12/26/2001}
	' var_Chart.Bars.Add("Task:Split").Shortcut = "Task"
	var_Bar = var_Chart.Bars.Add("Task:Split")
	oG2antt.TemplateDef = "dim var_Bar"
	oG2antt.TemplateDef = var_Bar
	oG2antt.Template = "var_Bar.Shortcut = `Task`"

	var_Chart.ColumnsFormatLevel = "1,2"
' oG2antt.Columns.Add("Task").Width = 48
var_Column = oG2antt.Columns.Add("Task")
oG2antt.TemplateDef = "dim var_Column"
oG2antt.TemplateDef = var_Column
oG2antt.Template = "var_Column.Width = 48"

var_Column1 = oG2antt.Columns.Add("Duration")
	' var_Column1.Def(18) = 513
	oG2antt.TemplateDef = "dim var_Column1"
	oG2antt.TemplateDef = var_Column1
	oG2antt.Template = "var_Column1.Def(18) = 513"

	var_Column1.Visible = .f.
	var_Column1.Alignment = 0
	var_Column1.FormatColumn = "value + `d`"
var_Column2 = oG2antt.Columns.Add("Working")
	' var_Column2.Def(18) = 258
	oG2antt.TemplateDef = "dim var_Column2"
	oG2antt.TemplateDef = var_Column2
	oG2antt.Template = "var_Column2.Def(18) = 258"

	var_Column2.Visible = .f.
	var_Column2.Alignment = 2
	var_Column2.FormatColumn = "value + `w`"
var_Items = oG2antt.Items
	var_Items.AllowCellValueToItemBar = .t.
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{01/02/2002},{01/12/2002})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{01/03/2002},{01/15/2002})
oG2antt.EndUpdate()

1965:
How do I get the duration/working count of the bar (sample 3)

' Occurs when a bar is moving or resizing.
function BarResizing as v (Item  as  OLE::Exontrol.G2antt.1::HITEM,Key  as  A)
	Dim var_Items as P
	oG2antt = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oG2antt.Items
		? var_Items.CellCaption(Item,0) 
		? "Working" 
		? var_Items.ItemBar(Item,Key,258) 
		? var_Items.CellCaption(Item,0) 
		? "Duration" 
		? var_Items.ItemBar(Item,Key,513) 
end function

Dim oG2antt as P
Dim var_Bar as local
Dim var_Chart as P
Dim var_Column as local
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
var_Chart = oG2antt.Chart
	' var_Chart.PaneWidth(.f.) = 64
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 64"

	var_Chart.LevelCount = 2
	var_Chart.FirstVisibleDate = {12/26/2001}
	' var_Chart.Bars.Add("Task:Split").Shortcut = "Task"
	var_Bar = var_Chart.Bars.Add("Task:Split")
	oG2antt.TemplateDef = "dim var_Bar"
	oG2antt.TemplateDef = var_Bar
	oG2antt.Template = "var_Bar.Shortcut = `Task`"

' oG2antt.Columns.Add("Task").Width = 48
var_Column = oG2antt.Columns.Add("Task")
oG2antt.TemplateDef = "dim var_Column"
oG2antt.TemplateDef = var_Column
oG2antt.Template = "var_Column.Width = 48"

var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{01/02/2002},{01/12/2002})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{01/03/2002},{01/15/2002})
oG2antt.EndUpdate()

1964:
How do I get the duration/working count of the bar (sample 2)

Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Column as local
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
var_Chart = oG2antt.Chart
	' var_Chart.PaneWidth(.f.) = 64
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 64"

	var_Chart.LevelCount = 2
	var_Chart.FirstVisibleDate = {12/26/2001}
	var_Bar = var_Chart.Bars.Add("Task:Split")
		var_Bar.Shortcut = "Task"
		' var_Bar.Def(3) = "<%=%258%>w"
		oG2antt.TemplateDef = "dim var_Bar"
		oG2antt.TemplateDef = var_Bar
		oG2antt.Template = "var_Bar.Def(3) = `<%=%258%>w`"

		' var_Bar.Def(4) = 18
		oG2antt.TemplateDef = "dim var_Bar"
		oG2antt.TemplateDef = var_Bar
		oG2antt.Template = "var_Bar.Def(4) = 18"

		' var_Bar.Def(44) = "<%=%513%>d"
		oG2antt.TemplateDef = "dim var_Bar"
		oG2antt.TemplateDef = var_Bar
		oG2antt.Template = "var_Bar.Def(44) = `<%=%513%>d`"

		' var_Bar.Def(45) = 16
		oG2antt.TemplateDef = "dim var_Bar"
		oG2antt.TemplateDef = var_Bar
		oG2antt.Template = "var_Bar.Def(45) = 16"

' oG2antt.Columns.Add("Task").Width = 48
var_Column = oG2antt.Columns.Add("Task")
oG2antt.TemplateDef = "dim var_Column"
oG2antt.TemplateDef = var_Column
oG2antt.Template = "var_Column.Width = 48"

var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{01/02/2002},{01/12/2002})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{01/03/2002},{01/15/2002})
oG2antt.EndUpdate()

1963:
How do I get the duration/working count of the bar (sample 1)

Dim oG2antt as P
Dim var_Bar as local
Dim var_Chart as P
Dim var_Column as local
Dim var_Column1 as local
Dim var_Column2 as local
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
var_Chart = oG2antt.Chart
	' var_Chart.PaneWidth(.f.) = 196
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 196"

	var_Chart.LevelCount = 2
	var_Chart.FirstVisibleDate = {01/01/2002}
	' var_Chart.Bars.Add("Task:Split").Shortcut = "Task"
	var_Bar = var_Chart.Bars.Add("Task:Split")
	oG2antt.TemplateDef = "dim var_Bar"
	oG2antt.TemplateDef = var_Bar
	oG2antt.Template = "var_Bar.Shortcut = `Task`"

' oG2antt.Columns.Add("Task").Width = 48
var_Column = oG2antt.Columns.Add("Task")
oG2antt.TemplateDef = "dim var_Column"
oG2antt.TemplateDef = var_Column
oG2antt.Template = "var_Column.Width = 48"

' oG2antt.Columns.Add("Duration").Def(18) = 513
var_Column1 = oG2antt.Columns.Add("Duration")
oG2antt.TemplateDef = "dim var_Column1"
oG2antt.TemplateDef = var_Column1
oG2antt.Template = "var_Column1.Def(18) = 513"

' oG2antt.Columns.Add("Working").Def(18) = 258
var_Column2 = oG2antt.Columns.Add("Working")
oG2antt.TemplateDef = "dim var_Column2"
oG2antt.TemplateDef = var_Column2
oG2antt.Template = "var_Column2.Def(18) = 258"

var_Items = oG2antt.Items
	var_Items.AllowCellValueToItemBar = .t.
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{01/02/2002},{01/12/2002})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{01/03/2002},{01/15/2002})
oG2antt.EndUpdate()

1962:
How can I draw a solid frame around the the focusing item

Dim h as N
Dim oG2antt as P
Dim var_Appearance as P
Dim var_Chart as local
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.SingleSel = .f.
oG2antt.DefaultItemHeight = 20
var_Appearance = oG2antt.VisualAppearance
	var_Appearance.RenderType = -1
	var_Appearance.Add(1,"gBFLBCJwBAEHhEJAAEhABOkGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEwpFAZBhgeDYMiSNoYDJCM4wHIURRJFCUJSGWQpTgSIgyT5HFIxXKoASbJabZLhWS6EpWOotTbIQQRYCkEyfKKfZyGURZQqOKA1DBZErWTJESRFJqLazgO4LAhyQYrVgAErzVKVCRNOqbJzADApdpGQJTULDNTQHRFIyhOSnIRrWbMAhid6JUZiVT4dBOIYhSYANAqCwLFqrDJmWrpV5WZjlZ47V6BdAyXJsIrmFJEXaOGhyDDlGybSDZYryfZhUziUw4XjbWwZDqPF6DKTTdSGLREE8WZVlURZvDaep3C+AY8kAYRgGCCBJECUhjDoHROEYWgoAGTQ1CEEx9lGMY0CQUYSnuZQDBGBYFlOH5+H+igGAKAJgEgFgGgGVgDn4CoCmCSA2A6A5hAgDgQgSYRIE4EoFGGCBiBeBhhkgPgbgcYgICoH4IGGWIOCSBhiGiHgVgoYooFoAoLGIWI+DCCgjCiTgrgII4ImYOoOmOSJ2AYOpWlQDQBICA=")
oG2antt.ShowFocusRect = .t.
oG2antt.Template = "Background(19) = 16777216" // oG2antt.Background(19) = 16777216
oG2antt.LinesAtRoot = -1
' oG2antt.Chart.PaneWidth(.t.) = 1
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 1"

var_Column = oG2antt.Columns.Add("P1")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
var_Items = oG2antt.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

oG2antt.EndUpdate()

1961:
The frame around the focusing item is not very clear. Can I show it larger or more cleared (sample 2)

Dim h as N
Dim oG2antt as P
Dim var_Appearance as P
Dim var_Chart as local
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.SingleSel = .f.
oG2antt.DefaultItemHeight = 20
oG2antt.ShowFocusRect = .t.
var_Appearance = oG2antt.VisualAppearance
	var_Appearance.RenderType = -1
	var_Appearance.Add(2,"gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEwpFAZBhgeCRUgyJI3RgMUIzVAcRRFEiUJQlIZZCjOAw0SIMU7xZRcNxsACnaZnCR4NiuRYiUhOcqzRIQIQ4CiEahqOgJbDUJYwWZKAyjBY8XTZFCSJCpeJ6egOc5jRxQUp1WAEXx3GSsJKvCZ5cADBY+VLQNS0JBtMSTKSLaiuWoIJqCPaDRheWKQJh1NSnLqEcjyYANDxDCZlWzAYxWTZ2Uz7N7PbB0HY4DyPGKZYrfESVRbQcZNS6nNigPI9XhfGq6VjRe63ZaOaYpWrnOJqTRWjOKYujWdZ2BGO5lkuBAAkmcQkDmDBEAwEQJCgGhMGcQ4pkiSxGAAOYmkQIhvkYNg2gSCgyj+LI4GIMIwF2XQoAYAoAmASAWAaAZgggJgKFiT54DYDoDmECBGBKBJgGgTgWgWYRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChiigYgsgsYYYBYMIKCMKJOCuDRjGiOgLg6Y5InYPoPmQCAkmsXAQDQBCAg=")
	var_Appearance.Add(3,"CP:2 -3 0 3 0")
oG2antt.Template = "Background(19) = 50397441" // oG2antt.Background(19) = 50397441
oG2antt.LinesAtRoot = -1
' oG2antt.Chart.PaneWidth(.t.) = 1
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 1"

var_Column = oG2antt.Columns.Add("P1")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
var_Items = oG2antt.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

oG2antt.EndUpdate()

1960:
The frame around the focusing item is not very clear. Can I show it larger or more cleared (sample 1)

Dim h as N
Dim oG2antt as P
Dim var_Appearance as P
Dim var_Chart as local
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.SingleSel = .f.
oG2antt.ShowFocusRect = .t.
var_Appearance = oG2antt.VisualAppearance
	var_Appearance.Add(1,"gBFLBCJwBAEHhEJAAEhABHoDg6AADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFiCCQwSDKEjyCKcGRHF6MI6gOYpCgOIYjRJNIASVAceAAGaUZrjSgobjmOYhAJCLqhYIgASXJqLaBlOCaAieSc+QhjQJIJoeCZXU5TFg1BTsOhqEqcRiseaRVDCaIJWzbdYWLDdNQHHKYLjnWorbpSJZ5XjNEySDQkMS9PrEJ7vST8FBCdAABLJUB2BR9RwxRafKpnWwJDpmCaOQLXEB5DK1PyVMTKYrtGy7GrIAJxWxbV4UHh+QABOzIMAvHKJMwvHYcUZne5XVLeF41HbONogPaJZyIAK2cLROq6Xo7GEcJZEcLASB4DwvgWUZlE6AQQhKAYkkYdA6hyDIwHgSoqFwQgmnsYxjGgSIiBOTpSEiAwRgOJI7j4JAHA6U5wm0MpPlOBIjD8TZiGYCICiCGAuA6AxhAgMgSgOYQ4DYBg/g6cw1n+ABOmMMJ9DmCwjnScw4RsVJngkYh4hoKIKmKKI2CmC5ikiQgqgiT5jhyMw8g4QwIn0OIKEiCJhD8DwTGyfA7k0WQOEWEQkGkJhIhKZB5DYSoTiSCQEn4PQOCOXJcCeIJjliaIQk0aRyF4O5llmAhfhgZhJg4ZoYiaAxYn4PZOhOZJaCUZYTiYQw1mcOZUm+HQnHmWh4h6Z4pnYeYfk0eYsmqG4nAgNJ2DqD5DkCWoiGiOgqgyI5omoRoNiSaQKFKEojCaM4ugSFhOjkAJcieKgDkaH4oioGoOiaKRqgqEoqDddwyhuAxPgOMJ8DyDZqk6NYtCsapmjiLprHqdo6i+K5K1oPhOlqPgKD4DpjnII4yiOewuk6MxtAsMpSjObQ7EaT4wk6ewYn0PgPAiCJkjeLgDk6X44i4G4OmaORuguEpqDkLAzkaWg+E8GIUmaPIvEOVpzj2Lxbl6eo+G+S5in4OYPmOaJyjuTwjnYWpBg6DAjAqQZwkwJwNkKcJsEcEJCDBEpaD6Dw8BiapGjGSgfB2RpxmyBwgkicZ8haBw/g+M5TBcPQPlOXJskscp8jsMJMnMLJXDGTZzEyYw2kwMoDlcFw9i2M4/EGUJPg0CxFlENBtCcSJSnQfQ0m+SgPHsaJ7lALZLG6XZVHWDRfFqVY1k0ZxdladYTnifJUGaeAWAeMnSGcGWgBObJ3lWbwdjKW5cHcTZPHaLkN4GxXDlFqFsA4uRbBOGAFAEIzAsDEFOBkfYqR4D6AOBEYo8QuBvAmMceInBDgcD0JwOIqQyJ1DMAwG4IANDnHSMoK4QhOgMBGNEIQvQWAdGenETIswGiddsAAQAgCAgA==")
	var_Appearance.Add(2,"gBFLBCJwBAEHhEJAAEhABeEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADDFIBQSLAYROGSDJBGODJDjWGIeQLOEhQHIMRxPE6UYLhWYpBDKPYcUbGc7yBBMVwGf59XzACoKSheQIVSDQkw6Fo6NYhAxHALyNRkBy8f60KjtGpodDUJYvW5JYyjBZ8EznOqbJBkeJ7BgOe5NQjaD72VgdWQJFSWJajWYYJDOJY2ZAAE5TVINEwxJbDaylChIdxaF6WAzZEBhBYoATPNLBMrhWqKDw2XaQWBCOgwHYeR5LU7BdRwbIrRq2eAAXbcVyXfDddZlBK+QA0SK9lRVTKvJZmKgBWw1COSxmAAGw4kcNx1iKFBiCAfQsG8lJemucg7nsXpUHOOxrm+DI3jOH4XAOBx2nscw0j2HhPG4L5uGEVIECQCBCEUAYkGMHQHFGSBlGaAxkEgQgTGCVBsDYQhCgQJZrHKUggGEShkFGNgIlsNpPnMHJHD+TADAIJIJiIWIeCqChikiIgmgiD5zHyXxgiACJKCuC4jHiZgtg6I4IlkCQwkwOIonMPJjEkFhGhGZBpA4KoMBCGJuEiE5lAkGg7hMY4JEYVoUCUNAOE6FZl0KWQACWOR2GKF5mBmChchkJRZhoXYaCKKYqGuDglEmNhuhWZpIiYc4dCcCRqGmHZlgm2YxAwSQKESHwkFkKgpiAIAIH4PIimOOg2DiChoiQJRRD+TZDHCfwyAyCgyg+JpiioYJ/DgDgIlECQ6lwRAEICA=")
	var_Appearance.Add(3,"CP:2 -2 0 2 0")
oG2antt.SelBackColor = 16777216
oG2antt.SelForeColor = 0
' oG2antt.Chart.PaneWidth(.t.) = 1
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 1"

oG2antt.Template = "Background(19) = 67043328" // oG2antt.Background(19) = 67043328
oG2antt.LinesAtRoot = -1
var_Column = oG2antt.Columns.Add("P1")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
var_Items = oG2antt.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Child 1")
	var_Items.InsertItem(h,,"Child 2")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

oG2antt.EndUpdate()

1959:
How can I display the start/end margins of bars, when cursor hovers it like a tooltip

Dim h as N
Dim oG2antt as P
Dim var_Bars as local
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.Columns.Add("exBarToolTip")
var_Chart = oG2antt.Chart
	' var_Chart.PaneWidth(.f.) = 96
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 96"

	var_Chart.FirstVisibleDate = {01/01/2001}
	' var_Chart.Bars.Item("Task").Def(6) = "<b><%=%9 + '/' + %C0%></b><br><upline><dotline>Start: <%=%1%><br>End: <%=%2%><br>Duration: <%=(%2-%1)%><br>Working: <%=%258%>"
	var_Bars = var_Chart.Bars.Item("Task")
	oG2antt.TemplateDef = "dim var_Bars"
	oG2antt.TemplateDef = var_Bars
	oG2antt.Template = "var_Bars.Def(6) = `<b><%=%9 + '/' + %C0%></b><br><upline><dotline>Start: <%=%1%><br>End: <%=%2%><br>Duration: <%=(%2-%1)%><br>Working: <%=%258%>`"

var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Bar.Def"),"Task",{01/02/2001},{01/09/2001},"K1")
	var_Items.AddBar(var_Items.AddItem("Bar.Def"),"Task",{01/03/2001},{01/10/2001},"K1")
	h = var_Items.AddItem("Items.ItemBar")
	var_Items.AddBar(h,"Unknown",{01/04/2001},{01/11/2001},"K")
	' var_Items.ItemBar(h,"K",6) = "Start:<%=%1%><br>End:<%=%2%>"
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ItemBar(h,`K`,6) = `Start:<%=%1%><br>End:<%=%2%>`"

oG2antt.EndUpdate()

1958:
Is it possible to define different kinds of summary bars with using the EBN files

Dim hSummaryJ as N
Dim hSummaryK as N
Dim hSummaryZ as N
Dim hTaskJ as N
Dim hTaskK as N
Dim hTaskZ as N
Dim oG2antt as P
Dim var_Appearance as P
Dim var_Bar as P
Dim var_Bar1 as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
var_Appearance = oG2antt.VisualAppearance
	var_Appearance.RenderType = -16777216
	var_Appearance.Add(1,"gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDAMgBQKAAzQFAYahuGSGAAGMYxQgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQLOEgwHIERQjEyUJAGGQIHhyPYbUbGUpQHKkeRtGqgBgoKhKEouNYgAbGYIwTRsdyfDSXBpEWwbDgkNQwWTDNoRDIUQStCysaYjOpnfrUAJ1P7FdQ1NJkXRhGSSK7maapaiCSZ6STCMj1FhVKSNJ7DQKhGpgKh/ApgYpQOK4fLNXyRBK4QAyKA6bgPFZOZbFViaXY1V5bNKrcjhHQwAyHJ4XXRdV4YRAkUT4GqiJKGSYcQhuXZWbRqO6ABhef6DRThc6jKpFHIE4llEcojHqSZNgoIxnlgd5thsLREleL43gsYZ9BkaAYkMAgAm+CxGDWWAtiKCRfjcdRgHoHYnicUwgAIEIREAaQYkcQZUHIGRUDQJBOEYRAhDYCxGgMZAkCgdYQhaXQIAYERwQuahXggdgeG6VZ4H4IhdiIGIOB8YIiGiHZZgqYpGF4KYHiKCI+CAU5jCiTQ2g0YhEFyax4gABAEIC")
	var_Appearance.Add(2,"gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQGh+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKfaZACj4arKejrRDCMAggI=")
oG2antt.Columns.Add("Task")
var_Chart = oG2antt.Chart
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Chart.FirstVisibleDate = {01/01/2001}
	var_Bar = var_Chart.Bars.Item("Task")
		' var_Bar.Def(4) = 18
		oG2antt.TemplateDef = "dim var_Bar"
		oG2antt.TemplateDef = var_Bar
		oG2antt.Template = "var_Bar.Def(4) = 18"

		var_Bar.Color = 1
	var_Bar1 = var_Chart.Bars.Item("Summary")
		' var_Bar1.Def(4) = 18
		oG2antt.TemplateDef = "dim var_Bar1"
		oG2antt.TemplateDef = var_Bar1
		oG2antt.Template = "var_Bar1.Def(4) = 18"

		var_Bar1.Color = 33554432
var_Items = oG2antt.Items
	hSummaryJ = var_Items.AddItem("Summary A")
	var_Items.AddBar(hSummaryJ,"Summary",{01/02/2001},{01/02/2001},"J")
	hTaskJ = var_Items.InsertItem(hSummaryJ,,"Task A.1")
	var_Items.AddBar(hTaskJ,"Task",{01/02/2001},{01/05/2001},"J1")
	hTaskJ = var_Items.InsertItem(hSummaryJ,,"Task A.2")
	var_Items.AddBar(hTaskJ,"Task",{01/04/2001},{01/08/2001},"J2")
	var_Items.DefineSummaryBars(hSummaryJ,"J",-1,"<*>")
	hSummaryK = var_Items.AddItem("Summary B")
	var_Items.AddBar(hSummaryK,"Summary",{01/02/2001},{01/02/2001},"K")
	hTaskK = var_Items.InsertItem(hSummaryK,,"Task B.1")
	var_Items.AddBar(hTaskK,"Task",{01/02/2001},{01/05/2001},"K1")
	hTaskK = var_Items.InsertItem(hSummaryK,,"Task B.2")
	var_Items.AddBar(hTaskK,"Task",{01/04/2001},{01/08/2001},"K2")
	var_Items.DefineSummaryBars(hSummaryK,"K",-1,"<*>")
	' var_Items.ItemBar(0,"<K*>",33) = 255
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBar(0,`<K*>`,33) = 255"

	hSummaryZ = var_Items.AddItem("Summary B")
	var_Items.AddBar(hSummaryZ,"Summary",{01/02/2001},{01/02/2001},"Z")
	hTaskZ = var_Items.InsertItem(hSummaryZ,,"Task B.1")
	var_Items.AddBar(hTaskZ,"Task",{01/02/2001},{01/05/2001},"Z1")
	hTaskZ = var_Items.InsertItem(hSummaryZ,,"Task B.2")
	var_Items.AddBar(hTaskZ,"Task",{01/04/2001},{01/08/2001},"Z2")
	var_Items.DefineSummaryBars(hSummaryZ,"Z",-1,"<*>")
	' var_Items.ItemBar(hSummaryZ,"Z",33) = 16842496
	oG2antt.TemplateDef = "dim var_Items,hSummaryZ"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hSummaryZ
	oG2antt.Template = "var_Items.ItemBar(hSummaryZ,`Z`,33) = 16842496"

	' var_Items.ItemBar(0,"<Z1>",33) = 50266112
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBar(0,`<Z1>`,33) = 50266112"

	' var_Items.ItemBar(0,"<Z2>",33) = 33554176
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBar(0,`<Z2>`,33) = 33554176"

	' var_Items.ExpandItem(0) = .t.
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ExpandItem(0) = True"

oG2antt.EndUpdate()

1957:
How can I display the week-number in ISO8601 format

Dim oG2antt as P
Dim var_Chart as P
Dim var_Level as local
Dim var_Level1 as local

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
var_Chart = oG2antt.Chart
	' var_Chart.PaneWidth(.f.) = 0
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 0"

	var_Chart.LevelCount = 2
	var_Chart.FirstVisibleDate = {12/12/2007}
	var_Chart.DrawGridLines = -1
	var_Chart.UnitScale = 256
	' var_Chart.Level(0).FormatLabel = "value + `<r><off -4><fgcolor=808080><font ;6>` + year(dvalue)"
	var_Level = var_Chart.Level(0)
	oG2antt.TemplateDef = "dim var_Level"
	oG2antt.TemplateDef = var_Level
	oG2antt.Template = "var_Level.FormatLabel = `value + ``<r><off -4><fgcolor=808080><font ;6>`` + year(dvalue)`"

	' var_Chart.Level(1).FormatLabel = "(value = 1 ? `<bgcolor=000000><fgcolor=FFFFFF>` : ``) + value"
	var_Level1 = var_Chart.Level(1)
	oG2antt.TemplateDef = "dim var_Level1"
	oG2antt.TemplateDef = var_Level1
	oG2antt.Template = "var_Level1.FormatLabel = `(value = 1 ? ``<bgcolor=000000><fgcolor=FFFFFF>`` : ````) + value`"

	var_Chart.WeekNumberAs = 0
	var_Chart.FirstWeekDay = 1
oG2antt.EndUpdate()

1956:
I have a column right-aligned. How can I display its check box aligned to the right, as it appears to the left of the cell's caption

Dim oG2antt as P
Dim var_Chart as local
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Columns as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.ColumnAutoResize = .t.
' oG2antt.Chart.PaneWidth(.t.) = 0
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 0"

oG2antt.DrawGridLines = 2
var_Columns = oG2antt.Columns
	var_Column = var_Columns.Add("Left")
		var_Column.AllowSizing = .f.
		var_Column.Width = 96
		' var_Column.Def(0) = .t.
		oG2antt.TemplateDef = "dim var_Column"
		oG2antt.TemplateDef = var_Column
		oG2antt.Template = "var_Column.Def(0) = True"

		var_Column.FormatColumn = "0 pos `A-Z`"
	var_Column1 = var_Columns.Add("Center")
		var_Column1.HeaderAlignment = 1
		var_Column1.Alignment = var_Column1.HeaderAlignment
		var_Column1.AllowSizing = .f.
		var_Column1.Width = 96
		' var_Column1.Def(0) = .t.
		oG2antt.TemplateDef = "dim var_Column1"
		oG2antt.TemplateDef = var_Column1
		oG2antt.Template = "var_Column1.Def(0) = True"

		var_Column1.FormatColumn = "0 pos `A-Z`"
	var_Column2 = var_Columns.Add("Right")
		var_Column2.HeaderAlignment = 2
		var_Column2.Alignment = var_Column2.HeaderAlignment
		var_Column2.AllowSizing = .f.
		var_Column2.Width = 96
		' var_Column2.Def(0) = .t.
		oG2antt.TemplateDef = "dim var_Column2"
		oG2antt.TemplateDef = var_Column2
		oG2antt.Template = "var_Column2.Def(0) = True"

		var_Column2.FormatColumn = "0 pos `A-Z`"
		' var_Column2.Def(34) = "caption,check,icon,icons,picture"
		oG2antt.TemplateDef = "dim var_Column2"
		oG2antt.TemplateDef = var_Column2
		oG2antt.Template = "var_Column2.Def(34) = `caption,check,icon,icons,picture`"

	var_Columns.Add("")
var_Items = oG2antt.Items
	' var_Items.CellState(var_Items.AddItem("Item 1"),3) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(AddItem(`Item 1`),3) = 1"

	' var_Items.CellState(var_Items.AddItem("Item 2"),2) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(AddItem(`Item 2`),2) = 1"

	' var_Items.CellState(var_Items.AddItem("Item 3"),1) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(AddItem(`Item 3`),1) = 1"

oG2antt.EndUpdate()

1955:
Can I display the column's multiple-lines caption vertically oriented (method 2)

Dim oG2antt as P
Dim var_Chart as local
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Columns as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.HeaderHeight = 48
oG2antt.ColumnAutoResize = .t.
' oG2antt.Chart.PaneWidth(.t.) = 0
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 0"

var_Columns = oG2antt.Columns
	var_Columns.Add("And others ...")
	var_Column = var_Columns.Add("")
		var_Column.HTMLCaption = "First Column"
		var_Column.HeaderVertical = .t.
		var_Column.Width = 36
		var_Column.AllowSizing = .f.
		' var_Column.Def(0) = .t.
		oG2antt.TemplateDef = "dim var_Column"
		oG2antt.TemplateDef = var_Column
		oG2antt.Template = "var_Column.Def(0) = True"

		' var_Column.Def(48) = 8
		oG2antt.TemplateDef = "dim var_Column"
		oG2antt.TemplateDef = var_Column
		oG2antt.Template = "var_Column.Def(48) = 8"

		var_Column.Position = 0
	var_Column1 = var_Columns.Add("")
		var_Column1.HTMLCaption = "<c><b>Second Column"
		var_Column1.HeaderVertical = .t.
		var_Column1.Width = 36
		var_Column1.AllowSizing = .f.
		' var_Column1.Def(0) = .t.
		oG2antt.TemplateDef = "dim var_Column1"
		oG2antt.TemplateDef = var_Column1
		oG2antt.Template = "var_Column1.Def(0) = True"

		' var_Column1.Def(48) = 8
		oG2antt.TemplateDef = "dim var_Column1"
		oG2antt.TemplateDef = var_Column1
		oG2antt.Template = "var_Column1.Def(48) = 8"

		var_Column1.Position = 1
	var_Column2 = var_Columns.Add("")
		var_Column2.HTMLCaption = "<r>Third Column"
		var_Column2.HeaderVertical = .t.
		var_Column2.Width = 36
		var_Column2.AllowSizing = .f.
		' var_Column2.Def(0) = .t.
		oG2antt.TemplateDef = "dim var_Column2"
		oG2antt.TemplateDef = var_Column2
		oG2antt.Template = "var_Column2.Def(0) = True"

		' var_Column2.Def(48) = 8
		oG2antt.TemplateDef = "dim var_Column2"
		oG2antt.TemplateDef = var_Column2
		oG2antt.Template = "var_Column2.Def(48) = 8"

		var_Column2.Position = 2
var_Items = oG2antt.Items
	' var_Items.CellState(var_Items.AddItem("Item 1"),3) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(AddItem(`Item 1`),3) = 1"

	' var_Items.CellState(var_Items.AddItem("Item 2"),2) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(AddItem(`Item 2`),2) = 1"

	' var_Items.CellState(var_Items.AddItem("Item 3"),1) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(AddItem(`Item 3`),1) = 1"

oG2antt.EndUpdate()

1954:
Can I display the column's multiple-lines caption vertically oriented (method 1)

Dim oG2antt as P
Dim var_Chart as local
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Columns as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.HeaderHeight = 48
oG2antt.HeaderSingleLine = .f.
oG2antt.ColumnAutoResize = .t.
' oG2antt.Chart.PaneWidth(.t.) = 0
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 0"

var_Columns = oG2antt.Columns
	var_Columns.Add("And others ...")
	var_Column = var_Columns.Add("First Column")
		var_Column.HeaderVertical = .t.
		var_Column.Width = 36
		var_Column.AllowSizing = .f.
		' var_Column.Def(0) = .t.
		oG2antt.TemplateDef = "dim var_Column"
		oG2antt.TemplateDef = var_Column
		oG2antt.Template = "var_Column.Def(0) = True"

		' var_Column.Def(48) = 8
		oG2antt.TemplateDef = "dim var_Column"
		oG2antt.TemplateDef = var_Column
		oG2antt.Template = "var_Column.Def(48) = 8"

		var_Column.Position = 0
	var_Column1 = var_Columns.Add("Second Column")
		var_Column1.HeaderBold = .t.
		var_Column1.HeaderVertical = .t.
		var_Column1.Width = 36
		var_Column1.AllowSizing = .f.
		' var_Column1.Def(0) = .t.
		oG2antt.TemplateDef = "dim var_Column1"
		oG2antt.TemplateDef = var_Column1
		oG2antt.Template = "var_Column1.Def(0) = True"

		' var_Column1.Def(48) = 8
		oG2antt.TemplateDef = "dim var_Column1"
		oG2antt.TemplateDef = var_Column1
		oG2antt.Template = "var_Column1.Def(48) = 8"

		var_Column1.Position = 1
	var_Column2 = var_Columns.Add("Third Column")
		var_Column2.HeaderVertical = .t.
		var_Column2.Width = 36
		var_Column2.AllowSizing = .f.
		' var_Column2.Def(0) = .t.
		oG2antt.TemplateDef = "dim var_Column2"
		oG2antt.TemplateDef = var_Column2
		oG2antt.Template = "var_Column2.Def(0) = True"

		' var_Column2.Def(48) = 8
		oG2antt.TemplateDef = "dim var_Column2"
		oG2antt.TemplateDef = var_Column2
		oG2antt.Template = "var_Column2.Def(48) = 8"

		var_Column2.Position = 2
var_Items = oG2antt.Items
	' var_Items.CellState(var_Items.AddItem("Item 1"),3) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(AddItem(`Item 1`),3) = 1"

	' var_Items.CellState(var_Items.AddItem("Item 2"),2) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(AddItem(`Item 2`),2) = 1"

	' var_Items.CellState(var_Items.AddItem("Item 3"),1) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(AddItem(`Item 3`),1) = 1"

oG2antt.EndUpdate()

1953:
Can I display the column's caption vertically oriented (method 2)

Dim oG2antt as P
Dim var_Chart as local
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Columns as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.HeaderHeight = 48
oG2antt.ColumnAutoResize = .t.
' oG2antt.Chart.PaneWidth(.t.) = 0
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 0"

var_Columns = oG2antt.Columns
	var_Columns.Add("And others ...")
	var_Column = var_Columns.Add("")
		var_Column.HTMLCaption = "First"
		var_Column.HeaderVertical = .t.
		var_Column.Width = 20
		var_Column.AllowSizing = .f.
		' var_Column.Def(0) = .t.
		oG2antt.TemplateDef = "dim var_Column"
		oG2antt.TemplateDef = var_Column
		oG2antt.Template = "var_Column.Def(0) = True"

		var_Column.Position = 0
	var_Column1 = var_Columns.Add("")
		var_Column1.HTMLCaption = "<c><b>Second"
		var_Column1.HeaderVertical = .t.
		var_Column1.Width = 20
		var_Column1.AllowSizing = .f.
		' var_Column1.Def(0) = .t.
		oG2antt.TemplateDef = "dim var_Column1"
		oG2antt.TemplateDef = var_Column1
		oG2antt.Template = "var_Column1.Def(0) = True"

		var_Column1.Position = 1
	var_Column2 = var_Columns.Add("")
		var_Column2.HTMLCaption = "<r>Third"
		var_Column2.HeaderVertical = .t.
		var_Column2.Width = 20
		var_Column2.AllowSizing = .f.
		' var_Column2.Def(0) = .t.
		oG2antt.TemplateDef = "dim var_Column2"
		oG2antt.TemplateDef = var_Column2
		oG2antt.Template = "var_Column2.Def(0) = True"

		var_Column2.Position = 2
var_Items = oG2antt.Items
	' var_Items.CellState(var_Items.AddItem("Item 1"),3) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(AddItem(`Item 1`),3) = 1"

	' var_Items.CellState(var_Items.AddItem("Item 2"),2) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(AddItem(`Item 2`),2) = 1"

	' var_Items.CellState(var_Items.AddItem("Item 3"),1) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(AddItem(`Item 3`),1) = 1"

oG2antt.EndUpdate()

1952:
Can I display the column's caption vertically oriented (method 1)

Dim oG2antt as P
Dim var_Chart as local
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Columns as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.HeaderHeight = 48
oG2antt.ColumnAutoResize = .t.
' oG2antt.Chart.PaneWidth(.t.) = 0
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 0"

var_Columns = oG2antt.Columns
	var_Columns.Add("And others ...")
	var_Column = var_Columns.Add("First")
		var_Column.HeaderVertical = .t.
		var_Column.Width = 20
		var_Column.AllowSizing = .f.
		' var_Column.Def(0) = .t.
		oG2antt.TemplateDef = "dim var_Column"
		oG2antt.TemplateDef = var_Column
		oG2antt.Template = "var_Column.Def(0) = True"

		var_Column.Position = 0
	var_Column1 = var_Columns.Add("Second")
		var_Column1.HeaderBold = .t.
		var_Column1.HeaderVertical = .t.
		var_Column1.Width = 20
		var_Column1.AllowSizing = .f.
		' var_Column1.Def(0) = .t.
		oG2antt.TemplateDef = "dim var_Column1"
		oG2antt.TemplateDef = var_Column1
		oG2antt.Template = "var_Column1.Def(0) = True"

		var_Column1.Position = 1
	var_Column2 = var_Columns.Add("Third")
		var_Column2.HeaderVertical = .t.
		var_Column2.Width = 20
		var_Column2.AllowSizing = .f.
		' var_Column2.Def(0) = .t.
		oG2antt.TemplateDef = "dim var_Column2"
		oG2antt.TemplateDef = var_Column2
		oG2antt.Template = "var_Column2.Def(0) = True"

		var_Column2.Position = 2
var_Items = oG2antt.Items
	' var_Items.CellState(var_Items.AddItem("Item 1"),3) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(AddItem(`Item 1`),3) = 1"

	' var_Items.CellState(var_Items.AddItem("Item 2"),2) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(AddItem(`Item 2`),2) = 1"

	' var_Items.CellState(var_Items.AddItem("Item 3"),1) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(AddItem(`Item 3`),1) = 1"

oG2antt.EndUpdate()

1951:
How can I resize all task-bars 0-length

Dim oG2antt as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.Columns.Add("Tasks")
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{08/02/2017},{08/06/2017})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{08/03/2017},{08/03/2017})
	var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",{08/04/2017},{08/13/2017})
	var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{08/05/2017},{08/05/2017})
	' var_Items.ItemBarEx("itembar(513) = 0 and itembar(0) = `Task`",33) = 255
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`itembar(513) = 0 and itembar(0) = ``Task```,33) = 255"

	' var_Items.ItemBarEx("itembar(513) = 0 and itembar(0) = `Task`",513) = "value + 1"
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`itembar(513) = 0 and itembar(0) = ``Task```,513) = `value + 1`"

oG2antt.EndUpdate()

1950:
Is it possible to mark items that holds items with 0-length (zero,empty, sample 3)
Dim oG2antt as P
Dim var_Chart as P
Dim var_Column as P
Dim var_ConditionalFormat as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.Columns.Add("Tasks")
var_Column = oG2antt.Columns.Add("Duration")
	' var_Column.Def(18) = 513
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(18) = 513"

	var_Column.Visible = .f.
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

var_ConditionalFormat = oG2antt.ConditionalFormats.Add("%1 = 0")
	var_ConditionalFormat.Bold = .t.
	var_ConditionalFormat.BackColor = 12500670
	var_ConditionalFormat.ChartBackColor = var_ConditionalFormat.BackColor
var_Items = oG2antt.Items
	var_Items.AllowCellValueToItemBar = .t.
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{08/02/2017},{08/06/2017})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{08/03/2017},{08/03/2017})
	var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",{08/04/2017},{08/13/2017})
	var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{08/05/2017},{08/05/2017})
oG2antt.EndUpdate()

1949:
Is it possible to mark items that holds items with 0-length (zero,empty, sample 2)

Dim oG2antt as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.Columns.Add("Tasks")
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{08/02/2017},{08/06/2017})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{08/03/2017},{08/03/2017})
	var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",{08/04/2017},{08/13/2017})
	var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{08/05/2017},{08/05/2017})
	' var_Items.ItemBarEx("itembar(513) = 0",3) = "`zero-length`"
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`itembar(513) = 0`,3) = ```zero-length```"

oG2antt.EndUpdate()

1948:
Is it possible to mark items that holds items with 0-length (zero,empty, sample 1)

Dim oG2antt as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.Columns.Add("Tasks")
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{08/02/2017},{08/06/2017})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{08/03/2017},{08/03/2017})
	var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",{08/04/2017},{08/13/2017})
	var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{08/05/2017},{08/05/2017})
	' var_Items.ItemBarEx("itembar(513) = 0",53) = "`[frame=RGB(255,0,0),framethick,pattern=6,patterncolor=RGB(255,0,0)]`"
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`itembar(513) = 0`,53) = ```[frame=RGB(255,0,0),framethick,pattern=6,patterncolor=RGB(255,0,0)]```"

	' var_Items.ItemBarEx("itembar(513) = 0",55) = "`-4,-4,4,4`"
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`itembar(513) = 0`,55) = ```-4,-4,4,4```"

oG2antt.EndUpdate()

1947:
How can I find how many tasks/bars of 0-length (zero,empty) do I have

Dim oG2antt as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.Columns.Add("Tasks")
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{08/02/2017},{08/06/2017})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{08/03/2017},{08/03/2017})
	var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",{08/04/2017},{08/13/2017})
	var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{08/05/2017},{08/05/2017})
	? var_Items.ItemBarEx("itembar(513) = 0",256) 
oG2antt.EndUpdate()

1946:
How can I remove all bars from selected items

Dim h as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Bar1 as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.SingleSel = .f.
oG2antt.Columns.Add("Tasks")
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Chart.SelBackColor = 15790320
	var_Bar = var_Chart.Bars.Item("Task")
		var_Bar.OverlaidType = 3
		var_Bar.OverlaidGroup = "Task,Task-Diff"
		' var_Bar.Def(3) = "<font ;6><%=%0%>"
		oG2antt.TemplateDef = "dim var_Bar"
		oG2antt.TemplateDef = var_Bar
		oG2antt.Template = "var_Bar.Def(3) = `<font ;6><%=%0%>`"

		' var_Bar.Def(4) = 18
		oG2antt.TemplateDef = "dim var_Bar"
		oG2antt.TemplateDef = var_Bar
		oG2antt.Template = "var_Bar.Def(4) = 18"

	var_Bar1 = var_Chart.Bars.Copy("Task","Task-Diff")
		var_Bar1.Height = 4
		var_Bar1.Color = 255
		' var_Bar1.Def(3) = "<font ;6><%=%0%>"
		oG2antt.TemplateDef = "dim var_Bar1"
		oG2antt.TemplateDef = var_Bar1
		oG2antt.Template = "var_Bar1.Def(3) = `<font ;6><%=%0%>`"

		' var_Bar1.Def(4) = 16
		oG2antt.TemplateDef = "dim var_Bar1"
		oG2antt.TemplateDef = var_Bar1
		oG2antt.Template = "var_Bar1.Def(4) = 16"

var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{08/02/2017},{08/06/2017})
	h = var_Items.AddItem("Task 2")
	var_Items.AddBar(h,"Task",{08/03/2017},{08/09/2017})
	' var_Items.SelectItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.SelectItem(h) = True"

	h = var_Items.AddItem("Task 3")
	var_Items.AddBar(h,"Task",{08/04/2017},{08/13/2017},"")
	var_Items.AddBar(h,"Task-Diff",{08/05/2017},{08/14/2017},"P")
	' var_Items.SelectItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.SelectItem(h) = True"

	var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{08/05/2017},{08/16/2017})
	? "Bars before remove: " 
	? var_Items.ItemBar(0,"<*>",256) 
	' var_Items.ItemBarEx("itemisselected",9) = "`toberemove` + value "
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`itemisselected`,9) = ```toberemove`` + value `"

	var_Items.RemoveBar(0,"<toberemove*>")
	? "Bars after remove: " 
	? var_Items.ItemBar(0,"<*>",256) 
oG2antt.EndUpdate()

1945:
How can I remove task bars from selected items

Dim h as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Bar1 as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.SingleSel = .f.
oG2antt.Columns.Add("Tasks")
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Chart.SelBackColor = 15790320
	var_Bar = var_Chart.Bars.Item("Task")
		var_Bar.OverlaidType = 3
		var_Bar.OverlaidGroup = "Task,Task-Diff"
		' var_Bar.Def(3) = "<font ;6><%=%0%>"
		oG2antt.TemplateDef = "dim var_Bar"
		oG2antt.TemplateDef = var_Bar
		oG2antt.Template = "var_Bar.Def(3) = `<font ;6><%=%0%>`"

		' var_Bar.Def(4) = 18
		oG2antt.TemplateDef = "dim var_Bar"
		oG2antt.TemplateDef = var_Bar
		oG2antt.Template = "var_Bar.Def(4) = 18"

	var_Bar1 = var_Chart.Bars.Copy("Task","Task-Diff")
		var_Bar1.Height = 4
		var_Bar1.Color = 255
		' var_Bar1.Def(3) = "<font ;6><%=%0%>"
		oG2antt.TemplateDef = "dim var_Bar1"
		oG2antt.TemplateDef = var_Bar1
		oG2antt.Template = "var_Bar1.Def(3) = `<font ;6><%=%0%>`"

		' var_Bar1.Def(4) = 16
		oG2antt.TemplateDef = "dim var_Bar1"
		oG2antt.TemplateDef = var_Bar1
		oG2antt.Template = "var_Bar1.Def(4) = 16"

var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{08/02/2017},{08/06/2017})
	h = var_Items.AddItem("Task 2")
	var_Items.AddBar(h,"Task",{08/03/2017},{08/09/2017})
	' var_Items.SelectItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.SelectItem(h) = True"

	h = var_Items.AddItem("Task 3")
	var_Items.AddBar(h,"Task",{08/04/2017},{08/13/2017},"")
	var_Items.AddBar(h,"Task-Diff",{08/05/2017},{08/14/2017},"P")
	' var_Items.SelectItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.SelectItem(h) = True"

	var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{08/05/2017},{08/16/2017})
	? "Bars before remove: " 
	? var_Items.ItemBar(0,"<*>",256) 
	' var_Items.ItemBarEx("itemisselected and itembar(0) = `Task`",9) = "`toberemove` + value "
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`itemisselected and itembar(0) = ``Task```,9) = ```toberemove`` + value `"

	var_Items.RemoveBar(0,"<toberemove*>")
	? "Bars after remove: " 
	? var_Items.ItemBar(0,"<*>",256) 
oG2antt.EndUpdate()

1944:
How can I change the pattern for some bars only

Dim h as N
Dim oG2antt as P
Dim var_Chart as P
Dim var_Column as local
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
' oG2antt.Columns.Add("Tasks").Def(0) = .t.
var_Column = oG2antt.Columns.Add("Tasks")
oG2antt.TemplateDef = "dim var_Column"
oG2antt.TemplateDef = var_Column
oG2antt.Template = "var_Column.Def(0) = True"

var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{08/02/2017},{08/06/2017})
	h = var_Items.AddItem("Task 2")
	var_Items.AddBar(h,"Task",{08/03/2017},{08/09/2017})
	' var_Items.CellState(h,0) = 1
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.CellState(h,0) = 1"

	h = var_Items.AddItem("Task 3")
	var_Items.AddBar(h,"Task",{08/04/2017},{08/13/2017})
	' var_Items.CellState(h,0) = 1
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.CellState(h,0) = 1"

	var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{08/05/2017},{08/16/2017})
	' var_Items.ItemBarEx("cellstate(0)",42) = 6
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`cellstate(0)`,42) = 6"

oG2antt.EndUpdate()

1943:
How do I apply the same effort to all bars

Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.Columns.Add("Tasks")
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Chart.HistogramView = 112
	var_Chart.HistogramVisible = .t.
	var_Chart.HistogramHeight = 64
	var_Bar = var_Chart.Bars.Item("Task")
		var_Bar.HistogramPattern = 6
		var_Bar.HistogramType = 1
var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{08/02/2017},{08/06/2017})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{08/03/2017},{08/09/2017})
	var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",{08/04/2017},{08/13/2017})
	var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{08/05/2017},{08/16/2017})
	' var_Items.ItemBarEx(.t.,21) = 2
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(True,21) = 2"

oG2antt.EndUpdate()

1942:
How do I apply the same percent to all bars

Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.Columns.Add("Tasks")
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Bar = var_Chart.Bars.Add("Task%Progress")
		var_Bar.Shortcut = "Task"
		' var_Bar.Def(14) = .t.
		oG2antt.TemplateDef = "dim var_Bar"
		oG2antt.TemplateDef = var_Bar
		oG2antt.Template = "var_Bar.Def(14) = True"

var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{08/02/2017},{08/06/2017})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{08/03/2017},{08/09/2017})
	var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",{08/04/2017},{08/13/2017})
	var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{08/05/2017},{08/16/2017})
	' var_Items.ItemBarEx(.t.,12) = 0.5
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(True,12) = 0.5"

oG2antt.EndUpdate()

1941:
How can I set the same duration for all bars

Dim oG2antt as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.Columns.Add("Tasks")
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{08/02/2017},{08/06/2017})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{08/03/2017},{08/09/2017})
	var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",{08/04/2017},{08/13/2017})
	var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{08/05/2017},{08/16/2017})
	' var_Items.ItemBarEx(.t.,513) = 4
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(True,513) = 4"

oG2antt.EndUpdate()

1940:
How do I move all bars to end at the same date-time

Dim oG2antt as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.Columns.Add("Tasks")
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{08/02/2017},{08/06/2017})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{08/03/2017},{08/09/2017})
	var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",{08/04/2017},{08/13/2017})
	var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{08/05/2017},{08/16/2017})
	' var_Items.ItemBarEx(.t.,545) = "#8/15/2017#"
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(True,545) = `#8/15/2017#`"

oG2antt.EndUpdate()

1939:
How do I move all bars to start at the same date-time

Dim oG2antt as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.Columns.Add("Tasks")
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{08/02/2017},{08/06/2017})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{08/03/2017},{08/09/2017})
	var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",{08/04/2017},{08/13/2017})
	var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{08/05/2017},{08/16/2017})
	' var_Items.ItemBarEx(.t.,544) = "#8/2/2017#"
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(True,544) = `#8/2/2017#`"

oG2antt.EndUpdate()

1938:
How do I apply a new color for some bars, while others should be shown with a different color

Dim h as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Bar1 as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.Columns.Add("Tasks")
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Chart.SelBackColor = 15790320
	var_Bar = var_Chart.Bars.Item("Task")
		var_Bar.OverlaidType = 3
		var_Bar.OverlaidGroup = "Task,Task-Diff"
		' var_Bar.Def(3) = "<font ;6><%=%0%>"
		oG2antt.TemplateDef = "dim var_Bar"
		oG2antt.TemplateDef = var_Bar
		oG2antt.Template = "var_Bar.Def(3) = `<font ;6><%=%0%>`"

		' var_Bar.Def(4) = 18
		oG2antt.TemplateDef = "dim var_Bar"
		oG2antt.TemplateDef = var_Bar
		oG2antt.Template = "var_Bar.Def(4) = 18"

	var_Bar1 = var_Chart.Bars.Copy("Task","Task-Diff")
		var_Bar1.Height = 4
		var_Bar1.Color = 255
		' var_Bar1.Def(3) = "<font ;6><%=%0%>"
		oG2antt.TemplateDef = "dim var_Bar1"
		oG2antt.TemplateDef = var_Bar1
		oG2antt.Template = "var_Bar1.Def(3) = `<font ;6><%=%0%>`"

		' var_Bar1.Def(4) = 16
		oG2antt.TemplateDef = "dim var_Bar1"
		oG2antt.TemplateDef = var_Bar1
		oG2antt.Template = "var_Bar1.Def(4) = 16"

var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{08/02/2017},{08/06/2017})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{08/03/2017},{08/09/2017})
	h = var_Items.AddItem("Task 3")
	var_Items.AddBar(h,"Task",{08/04/2017},{08/13/2017},"")
	var_Items.AddBar(h,"Task-Diff",{08/05/2017},{08/14/2017},"P")
	var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{08/05/2017},{08/16/2017})
	' var_Items.ItemBarEx(.t.,33) = "cellcaption(0) like `*2` ? 0x0000FF : 0x00FF00"
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(True,33) = `cellcaption(0) like ``*2`` ? 0x0000FF : 0x00FF00`"

oG2antt.EndUpdate()

1937:
How do I hide some bars, and show others

Dim h as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Bar1 as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.SingleSel = .f.
oG2antt.Columns.Add("Tasks")
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Chart.SelBackColor = 15790320
	var_Bar = var_Chart.Bars.Item("Task")
		var_Bar.OverlaidType = 3
		var_Bar.OverlaidGroup = "Task,Task-Diff"
		' var_Bar.Def(3) = "<font ;6><%=%0%>"
		oG2antt.TemplateDef = "dim var_Bar"
		oG2antt.TemplateDef = var_Bar
		oG2antt.Template = "var_Bar.Def(3) = `<font ;6><%=%0%>`"

		' var_Bar.Def(4) = 18
		oG2antt.TemplateDef = "dim var_Bar"
		oG2antt.TemplateDef = var_Bar
		oG2antt.Template = "var_Bar.Def(4) = 18"

	var_Bar1 = var_Chart.Bars.Copy("Task","Task-Diff")
		var_Bar1.Height = 4
		var_Bar1.Color = 255
		' var_Bar1.Def(3) = "<font ;6><%=%0%>"
		oG2antt.TemplateDef = "dim var_Bar1"
		oG2antt.TemplateDef = var_Bar1
		oG2antt.Template = "var_Bar1.Def(3) = `<font ;6><%=%0%>`"

		' var_Bar1.Def(4) = 16
		oG2antt.TemplateDef = "dim var_Bar1"
		oG2antt.TemplateDef = var_Bar1
		oG2antt.Template = "var_Bar1.Def(4) = 16"

var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{08/02/2017},{08/06/2017})
	h = var_Items.AddItem("Task 2")
	var_Items.AddBar(h,"Task",{08/03/2017},{08/09/2017})
	' var_Items.SelectItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.SelectItem(h) = True"

	h = var_Items.AddItem("Task 3")
	var_Items.AddBar(h,"Task",{08/04/2017},{08/13/2017},"")
	var_Items.AddBar(h,"Task-Diff",{08/05/2017},{08/14/2017},"P")
	' var_Items.SelectItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.SelectItem(h) = True"

	var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{08/05/2017},{08/16/2017})
	' var_Items.ItemBarEx("-1",19) = "itembar(0) = `Task` ? 0 : 100"
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`-1`,19) = `itembar(0) = ``Task`` ? 0 : 100`"

oG2antt.EndUpdate()

1936:
I like how ItemBarEx works, the question is how can I remove the bars based on the same criteria

Dim oG2antt as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.Columns.Add("Tasks")
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Task 1"),"Task",{08/02/2017},{08/06/2017})
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{08/03/2017},{08/09/2017})
	var_Items.AddBar(var_Items.AddItem("Task 3"),"Task",{08/04/2017},{08/13/2017})
	var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{08/05/2017},{08/16/2017})
	? "Bars before remove: " 
	? var_Items.ItemBar(0,"<*>",256) 
	' var_Items.ItemBarEx("cellcaption(0) like `*2 *3`",9) = "`toberemove` + value "
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`cellcaption(0) like ``*2 *3```,9) = ```toberemove`` + value `"

	var_Items.RemoveBar(0,"<toberemove*>")
	? "Bars after remove: " 
	? var_Items.ItemBar(0,"<*>",256) 
oG2antt.EndUpdate()

1935:
Is it possible to automatically color the bar being checked

' Fired after cell's state has been changed.
function CellStateChanged as v (Item  as  OLE::Exontrol.G2antt.1::HITEM,ColIndex  as  N)
	oG2antt = topparent:CONTROL_ACTIVEX1.activex
end function

Dim h as N
Dim oG2antt as P
Dim var_Chart as P
Dim var_Column as P
Dim var_Column1 as local
Dim var_ConditionalFormat as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.SelBackMode = 1
var_Chart = oG2antt.Chart
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 256
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 256"

	var_Chart.FirstVisibleDate = {01/01/2017}
var_ConditionalFormat = oG2antt.ConditionalFormats.Add("%CS0","check")
	var_ConditionalFormat.Bold = .t.
	var_ConditionalFormat.ApplyToBars = "Task"
	var_ConditionalFormat.BarColor = 65536
var_Column = oG2antt.Columns.Add("Items")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.Width = 256
' oG2antt.Columns.Add(oG2antt.ConditionalFormats.Item("check").Expression).FormatColumn = oG2antt.ConditionalFormats.Item("check").Expression
var_Column1 = oG2antt.Columns.Add(oG2antt.ConditionalFormats.Item("check").Expression)
oG2antt.TemplateDef = "dim var_Column1"
oG2antt.TemplateDef = var_Column1
oG2antt.Template = "var_Column1.FormatColumn = Me.ConditionalFormats.Item(`check`).Expression"

var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Item 1"),"Task",{01/02/2017},{01/12/2017})
	h = var_Items.AddItem("Item 2")
	var_Items.AddBar(h,"Task",{01/03/2017},{01/13/2017})
	' var_Items.CellState(h,0) = 1
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.CellState(h,0) = 1"

	h = var_Items.AddItem("Item 3")
	var_Items.AddBar(h,"Task",{01/04/2017},{01/14/2017})
	' var_Items.CellState(h,0) = 1
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.CellState(h,0) = 1"

oG2antt.EndUpdate()

1934:
How do I automatically bold items being checked

' Fired after cell's state has been changed.
function CellStateChanged as v (Item  as  OLE::Exontrol.G2antt.1::HITEM,ColIndex  as  N)
	oG2antt = topparent:CONTROL_ACTIVEX1.activex
end function

Dim oG2antt as P
Dim var_Chart as local
Dim var_Column as local
Dim var_Column1 as local
Dim var_ConditionalFormat as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.SelBackMode = 1
' oG2antt.Chart.PaneWidth(.t.) = 0
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 0"

var_ConditionalFormat = oG2antt.ConditionalFormats.Add("%CS0","check")
	var_ConditionalFormat.Bold = .t.
' oG2antt.Columns.Add("Items").Def(0) = .t.
var_Column = oG2antt.Columns.Add("Items")
oG2antt.TemplateDef = "dim var_Column"
oG2antt.TemplateDef = var_Column
oG2antt.Template = "var_Column.Def(0) = True"

' oG2antt.Columns.Add(oG2antt.ConditionalFormats.Item("check").Expression).FormatColumn = oG2antt.ConditionalFormats.Item("check").Expression
var_Column1 = oG2antt.Columns.Add(oG2antt.ConditionalFormats.Item("check").Expression)
oG2antt.TemplateDef = "dim var_Column1"
oG2antt.TemplateDef = var_Column1
oG2antt.Template = "var_Column1.FormatColumn = Me.ConditionalFormats.Item(`check`).Expression"

var_Items = oG2antt.Items
	var_Items.AddItem("Item 1")
	' var_Items.CellState(var_Items.AddItem("Item 2"),0) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(AddItem(`Item 2`),0) = 1"

	var_Items.AddItem("Item 3")
oG2antt.EndUpdate()

1933:
Can I display the radio-button with a solid color

Dim oG2antt as P
Dim var_Chart as local
Dim var_Column as local
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
' oG2antt.Chart.PaneWidth(.t.) = 0
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 0"

oG2antt.Template = "RadioImage(0) = 32699122" // oG2antt.RadioImage(.f.) = 32699122
oG2antt.Template = "RadioImage(1) = 16777216" // oG2antt.RadioImage(.t.) = 16777216
' oG2antt.Columns.Add("Check").Def(1) = .t.
var_Column = oG2antt.Columns.Add("Check")
oG2antt.TemplateDef = "dim var_Column"
oG2antt.TemplateDef = var_Column
oG2antt.Template = "var_Column.Def(1) = True"

var_Items = oG2antt.Items
	var_Items.AddItem("Radio 1")
	' var_Items.CellState(var_Items.AddItem("Radio 2"),0) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(AddItem(`Radio 2`),0) = 1"

	var_Items.AddItem("Radio 1")
oG2antt.EndUpdate()

1932:
Can I display the check-box with a solid color

Dim oG2antt as P
Dim var_Chart as local
Dim var_Column as local
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
' oG2antt.Chart.PaneWidth(.t.) = 0
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 0"

oG2antt.Template = "CheckImage(0) = 32699122" // oG2antt.CheckImage(0) = 32699122
oG2antt.Template = "CheckImage(1) = 16777216" // oG2antt.CheckImage(1) = 16777216
' oG2antt.Columns.Add("Check").Def(0) = .t.
var_Column = oG2antt.Columns.Add("Check")
oG2antt.TemplateDef = "dim var_Column"
oG2antt.TemplateDef = var_Column
oG2antt.Template = "var_Column.Def(0) = True"

var_Items = oG2antt.Items
	var_Items.AddItem("Check 1")
	' var_Items.CellState(var_Items.AddItem("Check 2"),0) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(AddItem(`Check 2`),0) = 1"

	var_Items.AddItem("Check 3")
oG2antt.EndUpdate()

1931:
How can I use the CellState with ConditionalFormat/ComputedField/FormatColumn

' Fired after cell's state has been changed.
function CellStateChanged as v (Item  as  OLE::Exontrol.G2antt.1::HITEM,ColIndex  as  N)
	oG2antt = topparent:CONTROL_ACTIVEX1.activex
end function

Dim h as N
Dim oG2antt as P
Dim var_Chart as local
Dim var_Column as P
Dim var_Column1 as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.LinesAtRoot = 4
oG2antt.SelBackMode = 1
' oG2antt.Chart.PaneWidth(.t.) = 0
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 0"

var_Column = oG2antt.Columns.Add("Items")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
var_Column1 = oG2antt.Columns.Add("Format")
	var_Column1.FormatColumn = "%CS0"
	var_Column1.Caption = var_Column1.FormatColumn
	' var_Column1.Def(5) = 8421504
	oG2antt.TemplateDef = "dim var_Column1"
	oG2antt.TemplateDef = var_Column1
	oG2antt.Template = "var_Column1.Def(5) = 8421504"

	' var_Column1.Def(8) = var_Column1.Def(5)
	oG2antt.TemplateDef = "dim var_Column1"
	oG2antt.TemplateDef = var_Column1
	oG2antt.Template = "var_Column1.Def(8) = Def(5)"

var_Items = oG2antt.Items
	h = var_Items.AddItem("Root")
	var_Items.InsertItem(h,,"Item 1")
	' var_Items.CellState(var_Items.InsertItem(h,,"Item 2"),0) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(InsertItem(h,,`Item 2`),0) = 1"

	' var_Items.CellState(var_Items.InsertItem(h,,"Item 3"),0) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellState(InsertItem(h,,`Item 3`),0) = 1"

	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

oG2antt.EndUpdate()

1930:
How can I use the CellData with ConditionalFormat/ComputedField/FormatColumn

Dim oG2antt as P
Dim var_Chart as local
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
' oG2antt.Chart.PaneWidth(.t.) = 0
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 0"

oG2antt.Columns.Add("Items")
var_Column = oG2antt.Columns.Add("Format")
	var_Column.FormatColumn = "%CD0"
	var_Column.Caption = var_Column.FormatColumn
	' var_Column.Def(5) = 8421504
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(5) = 8421504"

	' var_Column.Def(8) = var_Column.Def(5)
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(8) = Def(5)"

var_Items = oG2antt.Items
	' var_Items.CellData(var_Items.AddItem("Item 1"),0) = 1234
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellData(AddItem(`Item 1`),0) = 1234"

	' var_Items.CellData(var_Items.AddItem("Item 2"),0) = "this is just an user data"
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellData(AddItem(`Item 2`),0) = `this is just an user data`"

	' var_Items.CellData(var_Items.AddItem("Item 3"),0) = {01/01/2001}
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellData(AddItem(`Item 3`),0) = #1/1/2001#"

oG2antt.EndUpdate()

1929:
How can I use the CellValue/CellCaption with ConditionalFormat/ComputedField/FormatColumn

Dim oG2antt as P
Dim var_Chart as local
Dim var_Column as P
Dim var_Column1 as P
Dim var_Column2 as P
Dim var_Editor as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
' oG2antt.Chart.PaneWidth(.t.) = 0
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 0"

var_Column = oG2antt.Columns.Add("Items")
	var_Editor = var_Column.Editor
		var_Editor.EditType = 3
		var_Editor.AddItem(1,"Item 1")
		var_Editor.AddItem(2,"Item 2")
		var_Editor.AddItem(3,"Item 3")
var_Column1 = oG2antt.Columns.Add("Format")
	var_Column1.FormatColumn = "%0"
	var_Column1.Caption = var_Column1.FormatColumn
	' var_Column1.Def(5) = 8421504
	oG2antt.TemplateDef = "dim var_Column1"
	oG2antt.TemplateDef = var_Column1
	oG2antt.Template = "var_Column1.Def(5) = 8421504"

	' var_Column1.Def(8) = var_Column1.Def(5)
	oG2antt.TemplateDef = "dim var_Column1"
	oG2antt.TemplateDef = var_Column1
	oG2antt.Template = "var_Column1.Def(8) = Def(5)"

	var_Column1.AllowSizing = .f.
var_Column2 = oG2antt.Columns.Add("Format")
	var_Column2.FormatColumn = "%C0"
	var_Column2.Caption = var_Column2.FormatColumn
	' var_Column2.Def(5) = 8421504
	oG2antt.TemplateDef = "dim var_Column2"
	oG2antt.TemplateDef = var_Column2
	oG2antt.Template = "var_Column2.Def(5) = 8421504"

	' var_Column2.Def(8) = var_Column2.Def(5)
	oG2antt.TemplateDef = "dim var_Column2"
	oG2antt.TemplateDef = var_Column2
	oG2antt.Template = "var_Column2.Def(8) = Def(5)"

	var_Column2.AllowSizing = .f.
var_Items = oG2antt.Items
	var_Items.AddItem(1)
	' var_Items.CellValue(var_Items.AddItem(0),0) = 2
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellValue(AddItem(0),0) = 2"

	var_Items.AddItem(2)
oG2antt.EndUpdate()

1928:
How can I use the ShowNonworkingHours property (hide the non-working hours)

Dim oG2antt as P
Dim var_Chart as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
var_Chart = oG2antt.Chart
	' var_Chart.PaneWidth(.f.) = 0
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 0"

	var_Chart.LevelCount = 2
	var_Chart.UnitScale = 65536
	var_Chart.NonworkingHours = 16253183
	var_Chart.ShowNonworkingHours = .f.
	var_Chart.ShowNonworkingUnits = .f.
oG2antt.EndUpdate()

1927:
How can I use the ShowNonworkingDates property (hide the non-working days)

Dim oG2antt as P
Dim var_Chart as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
var_Chart = oG2antt.Chart
	' var_Chart.PaneWidth(.f.) = 0
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 0"

	var_Chart.LevelCount = 2
	var_Chart.UnitScale = 4096
	var_Chart.ShowNonworkingDates = .f.
	var_Chart.ShowNonworkingUnits = .f.
oG2antt.EndUpdate()

1926:
How can I show/hide bars once the user checks or un-checks a column

' Fired after cell's state has been changed.
function CellStateChanged as v (Item  as  OLE::Exontrol.G2antt.1::HITEM,ColIndex  as  N)
	Dim var_Items as P
	oG2antt = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oG2antt.Items
		' var_Items.ItemBarEx(.t.,19) = "cellstate(0) = 1 ? 0 : 100"
		oG2antt.TemplateDef = "dim var_Items"
		oG2antt.TemplateDef = var_Items
		oG2antt.Template = "var_Items.ItemBarEx(True,19) = `cellstate(0) = 1 ? 0 : 100`"

end function

Dim h as N
Dim hChild as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.LinesAtRoot = -1
var_Column = oG2antt.Columns.Add("Tasks")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
oG2antt.HeaderVisible = 1
oG2antt.SelBackColor = 15790320
oG2antt.SelForeColor = 0
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Bar = var_Chart.Bars.Item("Summary")
		var_Bar.StartShape = 0
		var_Bar.EndShape = 0
		var_Bar.Shape = 20
	var_Chart.SelBackColor = oG2antt.SelBackColor
	var_Chart.SelBarColor = 8421504
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"Task 1")
	var_Items.AddBar(hChild,"Task",{08/02/2017},{08/08/2017})
	' var_Items.SelectItem(hChild) = .t.
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.SelectItem(hChild) = True"

	hChild = var_Items.InsertItem(h,,"Task 2")
	var_Items.AddBar(hChild,"Task",{08/03/2017},{08/10/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	hChild = var_Items.InsertItem(h,,"Task 3")
	var_Items.AddBar(hChild,"Task",{08/04/2017},{08/12/2017})
	var_Items.AddBar(h,"Summary",{08/01/2017},{08/01/2017},"sum")
	var_Items.DefineSummaryBars(h,"sum",-3,"")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBarEx(.t.,19) = "cellstate(0) = 1 ? 0 : 100"
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(True,19) = `cellstate(0) = 1 ? 0 : 100`"

oG2antt.EndUpdate()

1925:
How can I change the color for all Task bars

Dim h as N
Dim hChild as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.LinesAtRoot = -1
var_Column = oG2antt.Columns.Add("Tasks")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
oG2antt.HeaderVisible = 1
oG2antt.SelBackColor = 15790320
oG2antt.SelForeColor = 0
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Bar = var_Chart.Bars.Item("Summary")
		var_Bar.StartShape = 0
		var_Bar.EndShape = 0
		var_Bar.Shape = 20
	var_Chart.SelBackColor = oG2antt.SelBackColor
	var_Chart.SelBarColor = 8421504
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"Task 1")
	var_Items.AddBar(hChild,"Task",{08/02/2017},{08/08/2017})
	' var_Items.SelectItem(hChild) = .t.
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.SelectItem(hChild) = True"

	hChild = var_Items.InsertItem(h,,"Task 2")
	var_Items.AddBar(hChild,"Task",{08/03/2017},{08/10/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	hChild = var_Items.InsertItem(h,,"Task 3")
	var_Items.AddBar(hChild,"Task",{08/04/2017},{08/12/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	var_Items.AddBar(h,"Summary",{08/01/2017},{08/01/2017},"sum")
	var_Items.DefineSummaryBars(h,"sum",-3,"")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBarEx("itembar(0) = `Task`",33) = 65280
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`itembar(0) = ``Task```,33) = 65280"

oG2antt.EndUpdate()

1924:
Is it possible to automatically select bars only when user selects a new item

' Fired after a new item has been selected.
function SelectionChanged as v ()
	Dim var_Items as P
	oG2antt = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oG2antt.Items
		' var_Items.ItemBarEx(.t.,257) = "itemisselected"
		oG2antt.TemplateDef = "dim var_Items"
		oG2antt.TemplateDef = var_Items
		oG2antt.Template = "var_Items.ItemBarEx(True,257) = `itemisselected`"

end function

Dim h as N
Dim hChild as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.LinesAtRoot = -1
oG2antt.Columns.Add("Tasks")
oG2antt.HeaderVisible = 1
oG2antt.SelBackColor = 15790320
oG2antt.SelForeColor = 0
var_Chart = oG2antt.Chart
	var_Chart.AllowSelectObjects = 0
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Bar = var_Chart.Bars.Item("Summary")
		var_Bar.StartShape = 0
		var_Bar.EndShape = 0
		var_Bar.Shape = 20
	var_Chart.SelBackColor = oG2antt.SelBackColor
	var_Chart.SelBarColor = 8421504
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"Task 1")
	var_Items.AddBar(hChild,"Task",{08/02/2017},{08/08/2017})
	' var_Items.SelectItem(hChild) = .t.
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.SelectItem(hChild) = True"

	hChild = var_Items.InsertItem(h,,"Task 2")
	var_Items.AddBar(hChild,"Task",{08/03/2017},{08/10/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	hChild = var_Items.InsertItem(h,,"Task 3")
	var_Items.AddBar(hChild,"Task",{08/04/2017},{08/12/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	var_Items.AddBar(h,"Summary",{08/01/2017},{08/01/2017},"sum")
	var_Items.DefineSummaryBars(h,"sum",-3,"")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

oG2antt.EndUpdate()

1923:
Is it possible to automatically select bars only when the user clicks the column's checkbox

' Fired after cell's state has been changed.
function CellStateChanged as v (Item  as  OLE::Exontrol.G2antt.1::HITEM,ColIndex  as  N)
	Dim var_Items as P
	oG2antt = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oG2antt.Items
		' var_Items.ItemBarEx(.t.,257) = "cellstate(0) = 1"
		oG2antt.TemplateDef = "dim var_Items"
		oG2antt.TemplateDef = var_Items
		oG2antt.Template = "var_Items.ItemBarEx(True,257) = `cellstate(0) = 1`"

end function

Dim h as N
Dim hChild as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.LinesAtRoot = -1
var_Column = oG2antt.Columns.Add("Tasks")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
oG2antt.HeaderVisible = 1
oG2antt.SelBackColor = 15790320
oG2antt.SelForeColor = 0
var_Chart = oG2antt.Chart
	var_Chart.AllowSelectObjects = 0
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Bar = var_Chart.Bars.Item("Summary")
		var_Bar.StartShape = 0
		var_Bar.EndShape = 0
		var_Bar.Shape = 20
	var_Chart.SelBackColor = oG2antt.SelBackColor
	var_Chart.SelBarColor = 8421504
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"Task 1")
	var_Items.AddBar(hChild,"Task",{08/02/2017},{08/08/2017})
	' var_Items.SelectItem(hChild) = .t.
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.SelectItem(hChild) = True"

	hChild = var_Items.InsertItem(h,,"Task 2")
	var_Items.AddBar(hChild,"Task",{08/03/2017},{08/10/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	hChild = var_Items.InsertItem(h,,"Task 3")
	var_Items.AddBar(hChild,"Task",{08/04/2017},{08/12/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	var_Items.AddBar(h,"Summary",{08/01/2017},{08/01/2017},"sum")
	var_Items.DefineSummaryBars(h,"sum",-3,"")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

oG2antt.EndUpdate()

1922:
How do I select all bars on leaf items

Dim h as N
Dim hChild as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.LinesAtRoot = -1
var_Column = oG2antt.Columns.Add("Tasks")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
oG2antt.HeaderVisible = 1
oG2antt.SelBackColor = 15790320
oG2antt.SelForeColor = 0
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Bar = var_Chart.Bars.Item("Summary")
		var_Bar.StartShape = 0
		var_Bar.EndShape = 0
		var_Bar.Shape = 20
	var_Chart.SelBackColor = oG2antt.SelBackColor
	var_Chart.SelBarColor = 8421504
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"Task 1")
	var_Items.AddBar(hChild,"Task",{08/02/2017},{08/08/2017})
	' var_Items.SelectItem(hChild) = .t.
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.SelectItem(hChild) = True"

	hChild = var_Items.InsertItem(h,,"Task 2")
	var_Items.AddBar(hChild,"Task",{08/03/2017},{08/10/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	hChild = var_Items.InsertItem(h,,"Task 3")
	var_Items.AddBar(hChild,"Task",{08/04/2017},{08/12/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	var_Items.AddBar(h,"Summary",{08/01/2017},{08/01/2017},"sum")
	var_Items.DefineSummaryBars(h,"sum",-3,"")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBarEx("itemlevel = 1",257) = .t.
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`itemlevel = 1`,257) = True"

oG2antt.EndUpdate()

1921:
How can I change the caption for all checked Task bars

Dim h as N
Dim hChild as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.LinesAtRoot = -1
var_Column = oG2antt.Columns.Add("Tasks")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
oG2antt.HeaderVisible = 1
oG2antt.SelBackColor = 15790320
oG2antt.SelForeColor = 0
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Bar = var_Chart.Bars.Item("Summary")
		var_Bar.StartShape = 0
		var_Bar.EndShape = 0
		var_Bar.Shape = 20
	var_Chart.SelBackColor = oG2antt.SelBackColor
	var_Chart.SelBarColor = 8421504
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"Task 1")
	var_Items.AddBar(hChild,"Task",{08/02/2017},{08/08/2017})
	' var_Items.SelectItem(hChild) = .t.
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.SelectItem(hChild) = True"

	hChild = var_Items.InsertItem(h,,"Task 2")
	var_Items.AddBar(hChild,"Task",{08/03/2017},{08/10/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	hChild = var_Items.InsertItem(h,,"Task 3")
	var_Items.AddBar(hChild,"Task",{08/04/2017},{08/12/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	var_Items.AddBar(h,"Summary",{08/01/2017},{08/01/2017},"sum")
	var_Items.DefineSummaryBars(h,"sum",-3,"")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBarEx("(cellstate(0) = 1) and (itembar(0) = `Task`)",3) = "`new caption`"
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`(cellstate(0) = 1) and (itembar(0) = ``Task``)`,3) = ```new caption```"

oG2antt.EndUpdate()

1920:
How can I change the caption for all Task bars

Dim h as N
Dim hChild as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.LinesAtRoot = -1
var_Column = oG2antt.Columns.Add("Tasks")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
oG2antt.HeaderVisible = 1
oG2antt.SelBackColor = 15790320
oG2antt.SelForeColor = 0
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Bar = var_Chart.Bars.Item("Summary")
		var_Bar.StartShape = 0
		var_Bar.EndShape = 0
		var_Bar.Shape = 20
	var_Chart.SelBackColor = oG2antt.SelBackColor
	var_Chart.SelBarColor = 8421504
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"Task 1")
	var_Items.AddBar(hChild,"Task",{08/02/2017},{08/08/2017})
	' var_Items.SelectItem(hChild) = .t.
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.SelectItem(hChild) = True"

	hChild = var_Items.InsertItem(h,,"Task 2")
	var_Items.AddBar(hChild,"Task",{08/03/2017},{08/10/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	hChild = var_Items.InsertItem(h,,"Task 3")
	var_Items.AddBar(hChild,"Task",{08/04/2017},{08/12/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	var_Items.AddBar(h,"Summary",{08/01/2017},{08/01/2017},"sum")
	var_Items.DefineSummaryBars(h,"sum",-3,"")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBarEx("(itembar(0) = `Task`)",3) = "`new caption`"
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`(itembar(0) = ``Task``)`,3) = ```new caption```"

oG2antt.EndUpdate()

1919:
How can I change the caption for all bars

Dim h as N
Dim hChild as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.LinesAtRoot = -1
var_Column = oG2antt.Columns.Add("Tasks")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
oG2antt.HeaderVisible = 1
oG2antt.SelBackColor = 15790320
oG2antt.SelForeColor = 0
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Bar = var_Chart.Bars.Item("Summary")
		var_Bar.StartShape = 0
		var_Bar.EndShape = 0
		var_Bar.Shape = 20
	var_Chart.SelBackColor = oG2antt.SelBackColor
	var_Chart.SelBarColor = 8421504
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"Task 1")
	var_Items.AddBar(hChild,"Task",{08/02/2017},{08/08/2017})
	' var_Items.SelectItem(hChild) = .t.
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.SelectItem(hChild) = True"

	hChild = var_Items.InsertItem(h,,"Task 2")
	var_Items.AddBar(hChild,"Task",{08/03/2017},{08/10/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	hChild = var_Items.InsertItem(h,,"Task 3")
	var_Items.AddBar(hChild,"Task",{08/04/2017},{08/12/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	var_Items.AddBar(h,"Summary",{08/01/2017},{08/01/2017},"sum")
	var_Items.DefineSummaryBars(h,"sum",-3,"")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBarEx(.t.,3) = "`new caption`"
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(True,3) = ```new caption```"

oG2antt.EndUpdate()

1918:
How can I move all Task bars to end at the same date time

Dim h as N
Dim hChild as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.LinesAtRoot = -1
var_Column = oG2antt.Columns.Add("Tasks")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
oG2antt.HeaderVisible = 1
oG2antt.SelBackColor = 15790320
oG2antt.SelForeColor = 0
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Bar = var_Chart.Bars.Item("Summary")
		var_Bar.StartShape = 0
		var_Bar.EndShape = 0
		var_Bar.Shape = 20
	var_Chart.SelBackColor = oG2antt.SelBackColor
	var_Chart.SelBarColor = 8421504
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"Task 1")
	var_Items.AddBar(hChild,"Task",{08/02/2017},{08/08/2017})
	' var_Items.SelectItem(hChild) = .t.
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.SelectItem(hChild) = True"

	hChild = var_Items.InsertItem(h,,"Task 2")
	var_Items.AddBar(hChild,"Task",{08/03/2017},{08/10/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	hChild = var_Items.InsertItem(h,,"Task 3")
	var_Items.AddBar(hChild,"Task",{08/04/2017},{08/12/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	var_Items.AddBar(h,"Summary",{08/01/2017},{08/01/2017},"sum")
	var_Items.DefineSummaryBars(h,"sum",-3,"")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBarEx("(itembar(0) = `Task`)",514) = "#8/14/2017# - itembar(2)"
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`(itembar(0) = ``Task``)`,514) = `#8/14/2017# - itembar(2)`"

oG2antt.EndUpdate()

1917:
How can I move all Task bars to start at the same date time

Dim h as N
Dim hChild as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.LinesAtRoot = -1
var_Column = oG2antt.Columns.Add("Tasks")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
oG2antt.HeaderVisible = 1
oG2antt.SelBackColor = 15790320
oG2antt.SelForeColor = 0
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Bar = var_Chart.Bars.Item("Summary")
		var_Bar.StartShape = 0
		var_Bar.EndShape = 0
		var_Bar.Shape = 20
	var_Chart.SelBackColor = oG2antt.SelBackColor
	var_Chart.SelBarColor = 8421504
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"Task 1")
	var_Items.AddBar(hChild,"Task",{08/02/2017},{08/08/2017})
	' var_Items.SelectItem(hChild) = .t.
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.SelectItem(hChild) = True"

	hChild = var_Items.InsertItem(h,,"Task 2")
	var_Items.AddBar(hChild,"Task",{08/03/2017},{08/10/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	hChild = var_Items.InsertItem(h,,"Task 3")
	var_Items.AddBar(hChild,"Task",{08/04/2017},{08/12/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	var_Items.AddBar(h,"Summary",{08/01/2017},{08/01/2017},"sum")
	var_Items.DefineSummaryBars(h,"sum",-3,"")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBarEx("(itembar(0) = `Task`)",514) = "#8/3/2017# - itembar(1)"
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`(itembar(0) = ``Task``)`,514) = `#8/3/2017# - itembar(1)`"

oG2antt.EndUpdate()

1916:
How can I change the color for checked Task bars

Dim h as N
Dim hChild as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.LinesAtRoot = -1
var_Column = oG2antt.Columns.Add("Tasks")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
oG2antt.HeaderVisible = 1
oG2antt.SelBackColor = 15790320
oG2antt.SelForeColor = 0
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Bar = var_Chart.Bars.Item("Summary")
		var_Bar.StartShape = 0
		var_Bar.EndShape = 0
		var_Bar.Shape = 20
	var_Chart.SelBackColor = oG2antt.SelBackColor
	var_Chart.SelBarColor = 8421504
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"Task 1")
	var_Items.AddBar(hChild,"Task",{08/02/2017},{08/08/2017})
	' var_Items.SelectItem(hChild) = .t.
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.SelectItem(hChild) = True"

	hChild = var_Items.InsertItem(h,,"Task 2")
	var_Items.AddBar(hChild,"Task",{08/03/2017},{08/10/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	hChild = var_Items.InsertItem(h,,"Task 3")
	var_Items.AddBar(hChild,"Task",{08/04/2017},{08/12/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	var_Items.AddBar(h,"Summary",{08/01/2017},{08/01/2017},"sum")
	var_Items.DefineSummaryBars(h,"sum",-3,"")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBarEx("cellstate(0) = 1 and itembar(0) = `Task`",33) = 255
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`cellstate(0) = 1 and itembar(0) = ``Task```,33) = 255"

oG2antt.EndUpdate()

1915:
How do I resize all Task bars programatically

Dim h as N
Dim hChild as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.LinesAtRoot = -1
var_Column = oG2antt.Columns.Add("Tasks")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
oG2antt.HeaderVisible = 1
oG2antt.SelBackColor = 15790320
oG2antt.SelForeColor = 0
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Bar = var_Chart.Bars.Item("Summary")
		var_Bar.StartShape = 0
		var_Bar.EndShape = 0
		var_Bar.Shape = 20
	var_Chart.SelBackColor = oG2antt.SelBackColor
	var_Chart.SelBarColor = 8421504
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"Task 1")
	var_Items.AddBar(hChild,"Task",{08/02/2017},{08/08/2017})
	' var_Items.SelectItem(hChild) = .t.
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.SelectItem(hChild) = True"

	hChild = var_Items.InsertItem(h,,"Task 2")
	var_Items.AddBar(hChild,"Task",{08/03/2017},{08/10/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	hChild = var_Items.InsertItem(h,,"Task 3")
	var_Items.AddBar(hChild,"Task",{08/04/2017},{08/12/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	var_Items.AddBar(h,"Summary",{08/01/2017},{08/01/2017},"sum")
	var_Items.DefineSummaryBars(h,"sum",-3,"")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBarEx("itembar(0) = `Task`",2) = "value + 2"
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`itembar(0) = ``Task```,2) = `value + 2`"

oG2antt.EndUpdate()

1914:
How do I move just the checked Task bars in the chart

Dim h as N
Dim hChild as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.LinesAtRoot = -1
var_Column = oG2antt.Columns.Add("Tasks")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
oG2antt.HeaderVisible = 1
oG2antt.SelBackColor = 15790320
oG2antt.SelForeColor = 0
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Bar = var_Chart.Bars.Item("Summary")
		var_Bar.StartShape = 0
		var_Bar.EndShape = 0
		var_Bar.Shape = 20
	var_Chart.SelBackColor = oG2antt.SelBackColor
	var_Chart.SelBarColor = 8421504
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"Task 1")
	var_Items.AddBar(hChild,"Task",{08/02/2017},{08/08/2017})
	' var_Items.SelectItem(hChild) = .t.
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.SelectItem(hChild) = True"

	hChild = var_Items.InsertItem(h,,"Task 2")
	var_Items.AddBar(hChild,"Task",{08/03/2017},{08/10/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	hChild = var_Items.InsertItem(h,,"Task 3")
	var_Items.AddBar(hChild,"Task",{08/04/2017},{08/12/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	var_Items.AddBar(h,"Summary",{08/01/2017},{08/01/2017},"sum")
	var_Items.DefineSummaryBars(h,"sum",-3,"")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBarEx("cellstate(0) = 1 and itembar(0) = `Task`",514) = -2
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`cellstate(0) = 1 and itembar(0) = ``Task```,514) = -2"

oG2antt.EndUpdate()

1913:
How do I move all Task bars in the chart

Dim h as N
Dim hChild as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.LinesAtRoot = -1
var_Column = oG2antt.Columns.Add("Tasks")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
oG2antt.HeaderVisible = 1
oG2antt.SelBackColor = 15790320
oG2antt.SelForeColor = 0
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Bar = var_Chart.Bars.Item("Summary")
		var_Bar.StartShape = 0
		var_Bar.EndShape = 0
		var_Bar.Shape = 20
	var_Chart.SelBackColor = oG2antt.SelBackColor
	var_Chart.SelBarColor = 8421504
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"Task 1")
	var_Items.AddBar(hChild,"Task",{08/02/2017},{08/08/2017})
	' var_Items.SelectItem(hChild) = .t.
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.SelectItem(hChild) = True"

	hChild = var_Items.InsertItem(h,,"Task 2")
	var_Items.AddBar(hChild,"Task",{08/03/2017},{08/10/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	hChild = var_Items.InsertItem(h,,"Task 3")
	var_Items.AddBar(hChild,"Task",{08/04/2017},{08/12/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	var_Items.AddBar(h,"Summary",{08/01/2017},{08/01/2017},"sum")
	var_Items.DefineSummaryBars(h,"sum",-3,"")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBarEx("itembar(0) = `Task`",514) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`itembar(0) = ``Task```,514) = 1"

oG2antt.EndUpdate()

1912:
How do I count all Task bars in the chart
Dim h as N
Dim hChild as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.LinesAtRoot = -1
oG2antt.Columns.Add("Tasks")
oG2antt.HeaderVisible = 1
oG2antt.SelBackColor = 15790320
oG2antt.SelForeColor = 0
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Bar = var_Chart.Bars.Item("Summary")
		var_Bar.StartShape = 0
		var_Bar.EndShape = 0
		var_Bar.Shape = 20
	var_Chart.SelBackColor = oG2antt.SelBackColor
	var_Chart.SelBarColor = 8421504
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"Task 1")
	var_Items.AddBar(hChild,"Task",{08/02/2017},{08/08/2017})
	hChild = var_Items.InsertItem(h,,"Task 2")
	var_Items.AddBar(hChild,"Task",{08/03/2017},{08/10/2017})
	hChild = var_Items.InsertItem(h,,"Task 3")
	var_Items.AddBar(hChild,"Task",{08/04/2017},{08/12/2017})
	var_Items.AddBar(h,"Summary",{08/01/2017},{08/01/2017},"sum")
	var_Items.DefineSummaryBars(h,"sum",-3,"")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

	? var_Items.ItemBarEx("itembar(0) = `Task`",256) 
oG2antt.EndUpdate()

1911:
How do I select bars whose items are checked

Dim h as N
Dim hChild as N
Dim oG2antt as P
Dim var_Bar as P
Dim var_Chart as P
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.LinesAtRoot = -1
var_Column = oG2antt.Columns.Add("Tasks")
	' var_Column.Def(0) = .t.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(0) = True"

	var_Column.PartialCheck = .t.
oG2antt.HeaderVisible = 1
oG2antt.SelBackColor = 15790320
oG2antt.SelForeColor = 0
var_Chart = oG2antt.Chart
	var_Chart.FirstVisibleDate = {08/01/2017}
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Bar = var_Chart.Bars.Item("Summary")
		var_Bar.StartShape = 0
		var_Bar.EndShape = 0
		var_Bar.Shape = 20
	var_Chart.SelBackColor = oG2antt.SelBackColor
	var_Chart.SelBarColor = 8421504
var_Items = oG2antt.Items
	h = var_Items.AddItem("Project")
	hChild = var_Items.InsertItem(h,,"Task 1")
	var_Items.AddBar(hChild,"Task",{08/02/2017},{08/08/2017})
	' var_Items.SelectItem(hChild) = .t.
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.SelectItem(hChild) = True"

	hChild = var_Items.InsertItem(h,,"Task 2")
	var_Items.AddBar(hChild,"Task",{08/03/2017},{08/10/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	hChild = var_Items.InsertItem(h,,"Task 3")
	var_Items.AddBar(hChild,"Task",{08/04/2017},{08/12/2017})
	' var_Items.CellState(hChild) = 1
	oG2antt.TemplateDef = "dim var_Items,hChild"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = hChild
	oG2antt.Template = "var_Items.CellState(hChild) = 1"

	var_Items.AddBar(h,"Summary",{08/01/2017},{08/01/2017},"sum")
	var_Items.DefineSummaryBars(h,"sum",-3,"")
	' var_Items.ExpandItem(h) = .t.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ExpandItem(h) = True"

	' var_Items.ItemBarEx("cellstate(0) = 1",257) = .t.
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`cellstate(0) = 1`,257) = True"

oG2antt.EndUpdate()

1910:
How can I select all bars, where a specified column matches a specified criteria

Dim h as N
Dim oG2antt as P
Dim var_Chart as local
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.Columns.Add("Task")
oG2antt.Chart.FirstVisibleDate = {01/01/2001}
' oG2antt.Chart.PaneWidth(.f.) = 48
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(False) = 48"

oG2antt.Chart.SelBarColor = 255
var_Items = oG2antt.Items
	h = var_Items.AddItem("Task 1")
	var_Items.AddBar(h,"Task",{01/02/2001},{01/04/2001},"K1","K1")
	var_Items.AddBar(h,"Task",{01/05/2001},{01/07/2001},"K2","K2")
	var_Items.AddBar(h,"Task",{01/08/2001},{01/10/2001},"P","P")
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{01/02/2001},{01/04/2001},"Q","Q")
	var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{01/02/2001},{01/04/2001},"M","M")
	' var_Items.ItemBarEx("cellcaption(0) = `Task 1`",257) = .t.
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(`cellcaption(0) = ``Task 1```,257) = True"

oG2antt.EndUpdate()

1909:
How can I select/unselect all bars

Dim h as N
Dim oG2antt as P
Dim var_Chart as local
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.Columns.Add("Task")
oG2antt.Chart.FirstVisibleDate = {01/01/2001}
' oG2antt.Chart.PaneWidth(.f.) = 48
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(False) = 48"

oG2antt.Chart.SelBarColor = 255
var_Items = oG2antt.Items
	h = var_Items.AddItem("Task 1")
	var_Items.AddBar(h,"Task",{01/02/2001},{01/04/2001},"K1","K1")
	var_Items.AddBar(h,"Task",{01/05/2001},{01/07/2001},"K2","K2")
	var_Items.AddBar(h,"Task",{01/08/2001},{01/10/2001},"P","P")
	var_Items.AddBar(var_Items.AddItem("Task 2"),"Task",{01/02/2001},{01/04/2001},"Q","Q")
	var_Items.AddBar(var_Items.AddItem("Task 4"),"Task",{01/02/2001},{01/04/2001},"M","M")
	' var_Items.ItemBarEx(.t.,257) = .t.
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.ItemBarEx(True,257) = True"

oG2antt.EndUpdate()

1908:
Is it possible to set the background color of the chart for one item and one day
Dim h as N
Dim oG2antt as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.Columns.Add("Items")
var_Chart = oG2antt.Chart
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 96
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 96"

	var_Chart.FirstVisibleDate = {01/01/2001}
var_Items = oG2antt.Items
	var_Items.AddItem("Item")
	h = var_Items.AddItem("Item")
	var_Items.AddBar(h,"",{01/02/2001},{01/03/2001},"Back"," ")
	' var_Items.ItemBar(h,"Back",7) = 255
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ItemBar(h,`Back`,7) = 255"

	' var_Items.ItemBar(h,"Back",29) = .f.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.ItemBar(h,`Back`,29) = False"

	var_Items.AddItem("Item")
oG2antt.EndUpdate()

1907:
It is possible to search for an item ( inside the Editor ), case insensitive

Dim oG2antt as P
Dim var_Editor as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
var_Editor = oG2antt.Columns.Add("DropDownList").Editor
	var_Editor.EditType = 3
	var_Editor.AddItem(1,"One")
	var_Editor.AddItem(2,"Two")
	var_Editor.AddItem(3,"Three")
var_Items = oG2antt.Items
	var_Items.AddItem(oG2antt.Columns.Item(0).Editor.FindItem(">ONE"))
	var_Items.AddItem(oG2antt.Columns.Item(0).Editor.FindItem(">ThRee"))
	var_Items.AddItem(oG2antt.Columns.Item(0).Editor.FindItem("ONE"))
	var_Items.AddItem(oG2antt.Columns.Item(0).Editor.FindItem(">tWo"))
oG2antt.EndUpdate()

1906:
The text after the BR-tag is in same line as the text before the BR-tag (entire column)

Dim oG2antt as P
Dim var_Chart as local
Dim var_Column as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.DrawGridLines = 1
' oG2antt.Chart.PaneWidth(.t.) = 0
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 0"

var_Column = oG2antt.Columns.Add("Default")
	' var_Column.Def(17) = 1
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(17) = 1"

	' var_Column.Def(16) = .f.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(16) = False"

var_Items = oG2antt.Items
	var_Items.AddItem("This is the first line.<br>This is the second line.")
	var_Items.AddItem("This is the first line.<br>This is the second line.")
	var_Items.AddItem("This is the first line.<br>This is the second line.")
oG2antt.EndUpdate()

1905:
The text after the BR-tag is in same line as the text before the BR-tag (individual)

Dim h as N
Dim oG2antt as P
Dim var_Chart as local
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.DrawGridLines = 1
' oG2antt.Chart.PaneWidth(.t.) = 0
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 0"

oG2antt.Columns.Add("Default")
var_Items = oG2antt.Items
	' var_Items.CellValueFormat(var_Items.AddItem("This is the first line.<br>This is the second line."),0) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellValueFormat(AddItem(`This is the first line.<br>This is the second line.`),0) = 1"

	h = var_Items.AddItem("<b>This is the first line.<br>This is the second line.</b>")
	' var_Items.CellValueFormat(h,0) = 1
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.CellValueFormat(h,0) = 1"

	' var_Items.CellSingleLine(h,0) = .f.
	oG2antt.TemplateDef = "dim var_Items,h"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h
	oG2antt.Template = "var_Items.CellSingleLine(h,0) = False"

	' var_Items.CellValueFormat(var_Items.AddItem("This is the first line.<br>This is the second line."),0) = 1
	oG2antt.TemplateDef = "dim var_Items"
	oG2antt.TemplateDef = var_Items
	oG2antt.Template = "var_Items.CellValueFormat(AddItem(`This is the first line.<br>This is the second line.`),0) = 1"

oG2antt.EndUpdate()

1904:
How do I prevent showing the control's BackColorAlternate property on empty / non-items part of the control

Dim oG2antt as P
Dim var_Chart as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
oG2antt.DrawGridLines = -1
var_Chart = oG2antt.Chart
	var_Chart.DrawGridLines = -1
	var_Chart.LevelCount = 2
	' var_Chart.PaneWidth(.f.) = 128
	oG2antt.TemplateDef = "dim var_Chart"
	oG2antt.TemplateDef = var_Chart
	oG2antt.Template = "var_Chart.PaneWidth(False) = 128"

	var_Chart.FirstVisibleDate = {01/01/2001}
oG2antt.BackColorAlternate = 2146496752
oG2antt.BackColorLevelHeader = oG2antt.BackColor
oG2antt.Columns.Add("Column")
var_Items = oG2antt.Items
	var_Items.AddBar(var_Items.AddItem("Item 1"),"Task",{01/02/2001},{01/12/2001})
	var_Items.AddBar(var_Items.AddItem("Item 2"),"Task",{01/03/2001},{01/13/2001})
	var_Items.AddBar(var_Items.AddItem("Item 3"),"Task",{01/02/2001},{01/12/2001})
	var_Items.AddBar(var_Items.AddItem("Item 4"),"Task",{01/03/2001},{01/13/2001})
	var_Items.AddBar(var_Items.AddItem("Item 5"),"Task",{01/02/2001},{01/12/2001})
oG2antt.EndUpdate()

1903:
Can I disable an item once the user selects a new value into a different item

' Occurs when the user changes the cell's content.
function Change as v (Item  as  OLE::Exontrol.G2antt.1::HITEM,ColIndex  as  N,NewValue  as  A)
	Dim var_Items as P
	oG2antt = topparent:CONTROL_ACTIVEX1.activex
	var_Items = oG2antt.Items
		' var_Items.EnableItem(var_Items.ItemByIndex(1)) = .f.
		oG2antt.TemplateDef = "dim var_Items"
		oG2antt.TemplateDef = var_Items
		oG2antt.Template = "var_Items.EnableItem(ItemByIndex(1)) = NewValue"

end function

Dim h1 as N
Dim h2 as N
Dim oG2antt as P
Dim var_Chart as local
Dim var_Editor as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.FreezeEvents(.t.)
oG2antt.BeginUpdate()
' oG2antt.Chart.PaneWidth(.t.) = 0
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 0"

oG2antt.ScrollBySingleLine = .t.
oG2antt.DrawGridLines = -2
oG2antt.Columns.Add("Q")
oG2antt.Columns.Add("A")
var_Items = oG2antt.Items
	h1 = var_Items.AddItem("What's your gender?")
	var_Editor = var_Items.CellEditor(h1,1)
		var_Editor.EditType = 3
		var_Editor.AddItem(1,"Male")
		var_Editor.AddItem(0,"Female")
	' var_Items.CellValue(h1,1) = 1
	oG2antt.TemplateDef = "dim var_Items,h1"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h1
	oG2antt.Template = "var_Items.CellValue(h1,1) = 1"

	h2 = var_Items.AddItem("What's pet name?")
	' var_Items.CellValue(h2,1) = "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
	oG2antt.TemplateDef = "dim var_Items,h2"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h2
	oG2antt.Template = "var_Items.CellValue(h2,1) = `This is my pet favorite long long long name, that shoul break the line in multiple pieces`"

	' var_Items.CellSingleLine(h2,1) = .f.
	oG2antt.TemplateDef = "dim var_Items,h2"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h2
	oG2antt.Template = "var_Items.CellSingleLine(h2,1) = False"

oG2antt.EndUpdate()
oG2antt.FreezeEvents(.f.)

1902:
How can I get a row expanded / enlarged to fit the cell's text (entire column)

Dim h1 as N
Dim h2 as N
Dim oG2antt as P
Dim var_Chart as local
Dim var_Column as P
Dim var_Editor as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
' oG2antt.Chart.PaneWidth(.t.) = 0
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 0"

oG2antt.ScrollBySingleLine = .t.
oG2antt.DrawGridLines = -2
oG2antt.Columns.Add("Q")
var_Column = oG2antt.Columns.Add("A")
	' var_Column.Def(16) = .f.
	oG2antt.TemplateDef = "dim var_Column"
	oG2antt.TemplateDef = var_Column
	oG2antt.Template = "var_Column.Def(16) = False"

	var_Editor = var_Column.Editor
		var_Editor.EditType = 5
		var_Editor.Appearance = 8
var_Items = oG2antt.Items
	h1 = var_Items.AddItem("What's name?")
	' var_Items.CellValue(h1,1) = "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
	oG2antt.TemplateDef = "dim var_Items,h1"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h1
	oG2antt.Template = "var_Items.CellValue(h1,1) = `This is my pet favorite long long long name, that shoul break the line in multiple pieces`"

	h2 = var_Items.AddItem("What's your pet name?")
	' var_Items.CellValue(h2,1) = "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
	oG2antt.TemplateDef = "dim var_Items,h2"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h2
	oG2antt.Template = "var_Items.CellValue(h2,1) = `This is my pet favorite long long long name, that shoul break the line in multiple pieces`"

oG2antt.EndUpdate()

1901:
How can I get a row expanded / enlarged to fit the cell's text (individual cell)

Dim h1 as N
Dim h2 as N
Dim oG2antt as P
Dim var_Chart as local
Dim var_Editor as P
Dim var_Items as P

oG2antt = topparent:CONTROL_ACTIVEX1.activex
oG2antt.BeginUpdate()
' oG2antt.Chart.PaneWidth(.t.) = 0
var_Chart = oG2antt.Chart
oG2antt.TemplateDef = "dim var_Chart"
oG2antt.TemplateDef = var_Chart
oG2antt.Template = "var_Chart.PaneWidth(True) = 0"

oG2antt.ScrollBySingleLine = .t.
oG2antt.DrawGridLines = -2
oG2antt.Columns.Add("Q")
oG2antt.Columns.Add("A")
var_Items = oG2antt.Items
	h1 = var_Items.AddItem("What's name?")
	' var_Items.CellValue(h1,1) = "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
	oG2antt.TemplateDef = "dim var_Items,h1"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h1
	oG2antt.Template = "var_Items.CellValue(h1,1) = `This is my pet favorite long long long name, that shoul break the line in multiple pieces`"

	h2 = var_Items.AddItem("What's your pet name?")
	var_Editor = var_Items.CellEditor(h2,1)
		var_Editor.EditType = 5
		var_Editor.Appearance = 8
	' var_Items.CellValue(h2,1) = "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
	oG2antt.TemplateDef = "dim var_Items,h2"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h2
	oG2antt.Template = "var_Items.CellValue(h2,1) = `This is my pet favorite long long long name, that shoul break the line in multiple pieces`"

	' var_Items.CellSingleLine(h2,1) = .f.
	oG2antt.TemplateDef = "dim var_Items,h2"
	oG2antt.TemplateDef = var_Items
	oG2antt.TemplateDef = h2
	oG2antt.Template = "var_Items.CellSingleLine(h2,1) = False"

oG2antt.EndUpdate()