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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.DefaultItemHeight = 48
		.ShowFocusRect = False
		.SelBackMode = 1
		.BackColorLevelHeader = .BackColor
		.DrawGridLines = -1
		With .Chart
			.DrawGridLines = 1
			.PaneWidth(False) = 64
			.LevelCount = 2
			.FirstVisibleDate = #12/26/2001#
			With .Bars.Add("Task:Split")
				.Shortcut = "Task"
				.Def(6) = "<%=%263%>"
				.Def(18) = -12
			End With
			.ColumnsFormatLevel = "1,2/3"
		End With
		.Columns.Add "Tasks"
		With .Columns.Add("Duration")
			.Def(18) = 513
			.Visible = False
			.Alignment = 0
			.FormatColumn = "value + `d`"
		End With
		With .Columns.Add("Working")
			.Def(18) = 258
			.Visible = False
			.Alignment = 2
			.FormatColumn = "value + `w`"
		End With
		With .Columns.Add("Working-Period")
			.Def(18) = 263
			.Visible = False
			.Alignment = 1
			.FormatColumn = "((value replace `\r\n` with `,`) replace `#` with ``) replace ` ` with ``"
		End With
		With .Items
			.AllowCellValueToItemBar = True
			.AddBar .AddItem("Task 1"),"Task",#1/2/2002#,#1/11/2002#
			.AddBar .AddItem("Task 2"),"Task",#1/3/2002#,#1/15/2002#
			.AddBar .AddItem("Task 3"),"Task",#12/31/2001#,#1/13/2002#
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_AddItem(Item)
	With G2antt1
		With .Items
			.ItemMaxHeight(Item) = 64
		End With
	End With
End Function
</SCRIPT>

<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.BackColorAlternate = RGB(240,240,240)
		With .Chart
			.PaneWidth(False) = 256
			.LevelCount = 2
			.FirstVisibleDate = #1/1/2002#
			With .Bars.Add("Task:Split")
				.Shortcut = "Task"
				.Def(6) = "<%=%263%>"
			End With
			.ColumnsFormatLevel = "1,2"
			.SelBackColor = G2antt1.SelBackColor
		End With
		With .Columns.Add("Task")
			.AllowSizing = False
			.Width = 48
		End With
		With .Columns.Add("Duration")
			.Def(18) = 513
			.Visible = False
			.Alignment = 0
		End With
		With .Columns.Add("Working")
			.Def(18) = 258
			.Visible = False
			.Alignment = 2
		End With
		With .Columns.Add("Working-Period")
			.Def(18) = 263
			.Def(16) = False
		End With
		With .Items
			.AllowCellValueToItemBar = True
			.AddBar .AddItem("Task 1"),"Task",#1/2/2002#,#1/12/2002#
			.AddBar .AddItem("Task 2"),"Task",#1/3/2002#,#1/15/2002#
			.AddBar .AddItem("Task 2"),"Task",#1/4/2002#,#1/16/2002#
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		With .Chart
			.PaneWidth(False) = 64
			.LevelCount = 2
			.FirstVisibleDate = #12/26/2001#
			.Bars.Add("Task:Split").Shortcut = "Task"
			.ColumnsFormatLevel = "1,2"
		End With
		.Columns.Add("Task").Width = 48
		With .Columns.Add("Duration")
			.Def(18) = 513
			.Visible = False
			.Alignment = 0
			.FormatColumn = "value + `d`"
		End With
		With .Columns.Add("Working")
			.Def(18) = 258
			.Visible = False
			.Alignment = 2
			.FormatColumn = "value + `w`"
		End With
		With .Items
			.AllowCellValueToItemBar = True
			.AddBar .AddItem("Task 1"),"Task",#1/2/2002#,#1/12/2002#
			.AddBar .AddItem("Task 2"),"Task",#1/3/2002#,#1/15/2002#
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_BarResizing(Item,Key)
	With G2antt1
		With .Items
			alert( .CellCaption(Item,0) )
			alert( "Working" )
			alert( .ItemBar(Item,Key,258) )
			alert( .CellCaption(Item,0) )
			alert( "Duration" )
			alert( .ItemBar(Item,Key,513) )
		End With
	End With
End Function
</SCRIPT>

<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		With .Chart
			.PaneWidth(False) = 64
			.LevelCount = 2
			.FirstVisibleDate = #12/26/2001#
			.Bars.Add("Task:Split").Shortcut = "Task"
		End With
		.Columns.Add("Task").Width = 48
		With .Items
			.AddBar .AddItem("Task 1"),"Task",#1/2/2002#,#1/12/2002#
			.AddBar .AddItem("Task 2"),"Task",#1/3/2002#,#1/15/2002#
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		With .Chart
			.PaneWidth(False) = 64
			.LevelCount = 2
			.FirstVisibleDate = #12/26/2001#
			With .Bars.Add("Task:Split")
				.Shortcut = "Task"
				.Def(3) = "<%=%258%>w"
				.Def(4) = 18
				.Def(44) = "<%=%513%>d"
				.Def(45) = 16
			End With
		End With
		.Columns.Add("Task").Width = 48
		With .Items
			.AddBar .AddItem("Task 1"),"Task",#1/2/2002#,#1/12/2002#
			.AddBar .AddItem("Task 2"),"Task",#1/3/2002#,#1/15/2002#
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		With .Chart
			.PaneWidth(False) = 196
			.LevelCount = 2
			.FirstVisibleDate = #1/1/2002#
			.Bars.Add("Task:Split").Shortcut = "Task"
		End With
		.Columns.Add("Task").Width = 48
		.Columns.Add("Duration").Def(18) = 513
		.Columns.Add("Working").Def(18) = 258
		With .Items
			.AllowCellValueToItemBar = True
			.AddBar .AddItem("Task 1"),"Task",#1/2/2002#,#1/12/2002#
			.AddBar .AddItem("Task 2"),"Task",#1/3/2002#,#1/15/2002#
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.SingleSel = False
		.DefaultItemHeight = 20
		With .VisualAppearance
			.RenderType = -1
			.Add 1,"gBFLBCJwBAEHhEJAAEhABOkGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEwpFAZBhgeDYMiSNoYDJCM4wH" & _
	"IURRJFCUJSGWQpTgSIgyT5HFIxXKoASbJabZLhWS6EpWOotTbIQQRYCkEyfKKfZyGURZQqOKA1DBZErWTJESRFJqLazgO4LAhyQYrVgAErzVKVCRNOqbJzADApdpGQJT" & _
	"ULDNTQHRFIyhOSnIRrWbMAhid6JUZiVT4dBOIYhSYANAqCwLFqrDJmWrpV5WZjlZ47V6BdAyXJsIrmFJEXaOGhyDDlGybSDZYryfZhUziUw4XjbWwZDqPF6DKTTdSGLR" & _
	"EE8WZVlURZvDaep3C+AY8kAYRgGCCBJECUhjDoHROEYWgoAGTQ1CEEx9lGMY0CQUYSnuZQDBGBYFlOH5+H+igGAKAJgEgFgGgGVgDn4CoCmCSA2A6A5hAgDgQgSYRIE4" & _
	"EoFGGCBiBeBhhkgPgbgcYgICoH4IGGWIOCSBhiGiHgVgoYooFoAoLGIWI+DCCgjCiTgrgII4ImYOoOmOSJ2AYOpWlQDQBICA="
		End With
		.ShowFocusRect = True
		.Background(19) = &H1000000
		.LinesAtRoot = -1
		.Chart.PaneWidth(True) = 1
		With .Columns.Add("P1")
			.Def(0) = True
			.PartialCheck = True
		End With
		With .Items
			h = .AddItem("Root")
			.InsertItem h,,"Child 1"
			.InsertItem h,,"Child 2"
			.ExpandItem(h) = True
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.SingleSel = False
		.DefaultItemHeight = 20
		.ShowFocusRect = True
		With .VisualAppearance
			.RenderType = -1
			.Add 2,"gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEwpFAZBhgeCRUgyJI3RgMUIzV" & _
	"AcRRFEiUJQlIZZCjOAw0SIMU7xZRcNxsACnaZnCR4NiuRYiUhOcqzRIQIQ4CiEahqOgJbDUJYwWZKAyjBY8XTZFCSJCpeJ6egOc5jRxQUp1WAEXx3GSsJKvCZ5cADBY+" & _
	"VLQNS0JBtMSTKSLaiuWoIJqCPaDRheWKQJh1NSnLqEcjyYANDxDCZlWzAYxWTZ2Uz7N7PbB0HY4DyPGKZYrfESVRbQcZNS6nNigPI9XhfGq6VjRe63ZaOaYpWrnOJqTR" & _
	"WjOKYujWdZ2BGO5lkuBAAkmcQkDmDBEAwEQJCgGhMGcQ4pkiSxGAAOYmkQIhvkYNg2gSCgyj+LI4GIMIwF2XQoAYAoAmASAWAaAZgggJgKFiT54DYDoDmECBGBKBJgGg" & _
	"TgWgWYRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChiigYgsgsYYYBYMIKCMKJOCuDRjGiOgLg6Y5InYPoPmQCAkmsXAQDQBCAg="
			.Add 3,"CP:2 -3 0 3 0"
		End With
		.Background(19) = &H3010101
		.LinesAtRoot = -1
		.Chart.PaneWidth(True) = 1
		With .Columns.Add("P1")
			.Def(0) = True
			.PartialCheck = True
		End With
		With .Items
			h = .AddItem("Root")
			.InsertItem h,,"Child 1"
			.InsertItem h,,"Child 2"
			.ExpandItem(h) = True
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.SingleSel = False
		.ShowFocusRect = True
		With .VisualAppearance
			.Add 1,"gBFLBCJwBAEHhEJAAEhABHoDg6AADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFiCCQwSDKEjyCKcGRHF6MI6gOYpCgOIYjRJNIASV" & _
	"AceAAGaUZrjSgobjmOYhAJCLqhYIgASXJqLaBlOCaAieSc+QhjQJIJoeCZXU5TFg1BTsOhqEqcRiseaRVDCaIJWzbdYWLDdNQHHKYLjnWorbpSJZ5XjNEySDQkMS9PrE" & _
	"J7vST8FBCdAABLJUB2BR9RwxRafKpnWwJDpmCaOQLXEB5DK1PyVMTKYrtGy7GrIAJxWxbV4UHh+QABOzIMAvHKJMwvHYcUZne5XVLeF41HbONogPaJZyIAK2cLROq6Xo" & _
	"7GEcJZEcLASB4DwvgWUZlE6AQQhKAYkkYdA6hyDIwHgSoqFwQgmnsYxjGgSIiBOTpSEiAwRgOJI7j4JAHA6U5wm0MpPlOBIjD8TZiGYCICiCGAuA6AxhAgMgSgOYQ4DY" & _
	"Bg/g6cw1n+ABOmMMJ9DmCwjnScw4RsVJngkYh4hoKIKmKKI2CmC5ikiQgqgiT5jhyMw8g4QwIn0OIKEiCJhD8DwTGyfA7k0WQOEWEQkGkJhIhKZB5DYSoTiSCQEn4PQO" & _
	"COXJcCeIJjliaIQk0aRyF4O5llmAhfhgZhJg4ZoYiaAxYn4PZOhOZJaCUZYTiYQw1mcOZUm+HQnHmWh4h6Z4pnYeYfk0eYsmqG4nAgNJ2DqD5DkCWoiGiOgqgyI5omoR" & _
	"oNiSaQKFKEojCaM4ugSFhOjkAJcieKgDkaH4oioGoOiaKRqgqEoqDddwyhuAxPgOMJ8DyDZqk6NYtCsapmjiLprHqdo6i+K5K1oPhOlqPgKD4DpjnII4yiOewuk6MxtA" & _
	"sMpSjObQ7EaT4wk6ewYn0PgPAiCJkjeLgDk6X44i4G4OmaORuguEpqDkLAzkaWg+E8GIUmaPIvEOVpzj2Lxbl6eo+G+S5in4OYPmOaJyjuTwjnYWpBg6DAjAqQZwkwJw" & _
	"NkKcJsEcEJCDBEpaD6Dw8BiapGjGSgfB2RpxmyBwgkicZ8haBw/g+M5TBcPQPlOXJskscp8jsMJMnMLJXDGTZzEyYw2kwMoDlcFw9i2M4/EGUJPg0CxFlENBtCcSJSnQ" & _
	"fQ0m+SgPHsaJ7lALZLG6XZVHWDRfFqVY1k0ZxdladYTnifJUGaeAWAeMnSGcGWgBObJ3lWbwdjKW5cHcTZPHaLkN4GxXDlFqFsA4uRbBOGAFAEIzAsDEFOBkfYqR4D6A" & _
	"OBEYo8QuBvAmMceInBDgcD0JwOIqQyJ1DMAwG4IANDnHSMoK4QhOgMBGNEIQvQWAdGenETIswGiddsAAQAgCAgA=="
			.Add 2,"gBFLBCJwBAEHhEJAAEhABeEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADDFIBQSLAYROGSDJBGODJDjWGIeQLOEhQH" & _
	"IMRxPE6UYLhWYpBDKPYcUbGc7yBBMVwGf59XzACoKSheQIVSDQkw6Fo6NYhAxHALyNRkBy8f60KjtGpodDUJYvW5JYyjBZ8EznOqbJBkeJ7BgOe5NQjaD72VgdWQJFSW" & _
	"JajWYYJDOJY2ZAAE5TVINEwxJbDaylChIdxaF6WAzZEBhBYoATPNLBMrhWqKDw2XaQWBCOgwHYeR5LU7BdRwbIrRq2eAAXbcVyXfDddZlBK+QA0SK9lRVTKvJZmKgBWw" & _
	"1COSxmAAGw4kcNx1iKFBiCAfQsG8lJemucg7nsXpUHOOxrm+DI3jOH4XAOBx2nscw0j2HhPG4L5uGEVIECQCBCEUAYkGMHQHFGSBlGaAxkEgQgTGCVBsDYQhCgQJZrHK" & _
	"UggGEShkFGNgIlsNpPnMHJHD+TADAIJIJiIWIeCqChikiIgmgiD5zHyXxgiACJKCuC4jHiZgtg6I4IlkCQwkwOIonMPJjEkFhGhGZBpA4KoMBCGJuEiE5lAkGg7hMY4J" & _
	"EYVoUCUNAOE6FZl0KWQACWOR2GKF5mBmChchkJRZhoXYaCKKYqGuDglEmNhuhWZpIiYc4dCcCRqGmHZlgm2YxAwSQKESHwkFkKgpiAIAIH4PIimOOg2DiChoiQJRRD+T" & _
	"ZDHCfwyAyCgyg+JpiioYJ/DgDgIlECQ6lwRAEICA="
			.Add 3,"CP:2 -2 0 2 0"
		End With
		.SelBackColor = &H1000000
		.SelForeColor = RGB(0,0,0)
		.Chart.PaneWidth(True) = 1
		.Background(19) = &H3ff0000
		.LinesAtRoot = -1
		With .Columns.Add("P1")
			.Def(0) = True
			.PartialCheck = True
		End With
		With .Items
			h = .AddItem("Root")
			.InsertItem h,,"Child 1"
			.InsertItem h,,"Child 2"
			.ExpandItem(h) = True
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Columns.Add "exBarToolTip"
		With .Chart
			.PaneWidth(False) = 96
			.FirstVisibleDate = #1/1/2001#
			.Bars.Item("Task").Def(6) = "<b><%=%9 + '/' + %C0%></b><br><upline><dotline>Start: <%=%1%><br>End: <%=%2%><br>Duration: <%=(%2-%1)%><br>Working: <%=%258%>"
		End With
		With .Items
			.AddBar .AddItem("Bar.Def"),"Task",#1/2/2001#,#1/9/2001#,"K1"
			.AddBar .AddItem("Bar.Def"),"Task",#1/3/2001#,#1/10/2001#,"K1"
			h = .AddItem("Items.ItemBar")
			.AddBar h,"Unknown",#1/4/2001#,#1/11/2001#,"K"
			.ItemBar(h,"K",6) = "Start:<%=%1%><br>End:<%=%2%>"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		With .VisualAppearance
			.RenderType = -16777216
			.Add 1,"gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDAMgBQKAAzQFAYahuGSGAAGMYxQgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQLOEgwH" & _
	"IERQjEyUJAGGQIHhyPYbUbGUpQHKkeRtGqgBgoKhKEouNYgAbGYIwTRsdyfDSXBpEWwbDgkNQwWTDNoRDIUQStCysaYjOpnfrUAJ1P7FdQ1NJkXRhGSSK7maapaiCSZ6" & _
	"STCMj1FhVKSNJ7DQKhGpgKh/ApgYpQOK4fLNXyRBK4QAyKA6bgPFZOZbFViaXY1V5bNKrcjhHQwAyHJ4XXRdV4YRAkUT4GqiJKGSYcQhuXZWbRqO6ABhef6DRThc6jKp" & _
	"FHIE4llEcojHqSZNgoIxnlgd5thsLREleL43gsYZ9BkaAYkMAgAm+CxGDWWAtiKCRfjcdRgHoHYnicUwgAIEIREAaQYkcQZUHIGRUDQJBOEYRAhDYCxGgMZAkCgdYQha" & _
	"XQIAYERwQuahXggdgeG6VZ4H4IhdiIGIOB8YIiGiHZZgqYpGF4KYHiKCI+CAU5jCiTQ2g0YhEFyax4gABAEIC"
			.Add 2,"gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQG" & _
	"h+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKf" & _
	"aZACj4arKejrRDCMAggI="
		End With
		.Columns.Add "Task"
		With .Chart
			.PaneWidth(False) = 128
			.FirstVisibleDate = #1/1/2001#
			With .Bars.Item("Task")
				.Def(4) = 18
				.Color = RGB(1,0,0)
			End With
			With .Bars.Item("Summary")
				.Def(4) = 18
				.Color = &H2000000
			End With
		End With
		With .Items
			hSummaryJ = .AddItem("Summary A")
			.AddBar hSummaryJ,"Summary",#1/2/2001#,#1/2/2001#,"J"
			hTaskJ = .InsertItem(hSummaryJ,,"Task A.1")
			.AddBar hTaskJ,"Task",#1/2/2001#,#1/5/2001#,"J1"
			hTaskJ = .InsertItem(hSummaryJ,,"Task A.2")
			.AddBar hTaskJ,"Task",#1/4/2001#,#1/8/2001#,"J2"
			.DefineSummaryBars hSummaryJ,"J",-1,"<*>"
			hSummaryK = .AddItem("Summary B")
			.AddBar hSummaryK,"Summary",#1/2/2001#,#1/2/2001#,"K"
			hTaskK = .InsertItem(hSummaryK,,"Task B.1")
			.AddBar hTaskK,"Task",#1/2/2001#,#1/5/2001#,"K1"
			hTaskK = .InsertItem(hSummaryK,,"Task B.2")
			.AddBar hTaskK,"Task",#1/4/2001#,#1/8/2001#,"K2"
			.DefineSummaryBars hSummaryK,"K",-1,"<*>"
			.ItemBar(0,"<K*>",33) = 255
			hSummaryZ = .AddItem("Summary B")
			.AddBar hSummaryZ,"Summary",#1/2/2001#,#1/2/2001#,"Z"
			hTaskZ = .InsertItem(hSummaryZ,,"Task B.1")
			.AddBar hTaskZ,"Task",#1/2/2001#,#1/5/2001#,"Z1"
			hTaskZ = .InsertItem(hSummaryZ,,"Task B.2")
			.AddBar hTaskZ,"Task",#1/4/2001#,#1/8/2001#,"Z2"
			.DefineSummaryBars hSummaryZ,"Z",-1,"<*>"
			.ItemBar(hSummaryZ,"Z",33) = 16842496
			.ItemBar(0,"<Z1>",33) = 50266112
			.ItemBar(0,"<Z2>",33) = 33554176
			.ExpandItem(0) = True
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		With .Chart
			.PaneWidth(False) = 0
			.LevelCount = 2
			.FirstVisibleDate = #12/12/2007#
			.DrawGridLines = -1
			.UnitScale = 256
			.Level(0).FormatLabel = "value + `<r><off -4><fgcolor=808080><font ;6>` + year(dvalue)"
			.Level(1).FormatLabel = "(value = 1 ? `<bgcolor=000000><fgcolor=FFFFFF>` : ``) + value"
			.WeekNumberAs = 0
			.FirstWeekDay = 1
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.ColumnAutoResize = True
		.Chart.PaneWidth(True) = 0
		.DrawGridLines = 2
		With .Columns
			With .Add("Left")
				.AllowSizing = False
				.Width = 96
				.Def(0) = True
				.FormatColumn = "0 pos `A-Z`"
			End With
			With .Add("Center")
				.HeaderAlignment = 1
				.Alignment = .HeaderAlignment ' .HeaderAlignment
				.AllowSizing = False
				.Width = 96
				.Def(0) = True
				.FormatColumn = "0 pos `A-Z`"
			End With
			With .Add("Right")
				.HeaderAlignment = 2
				.Alignment = .HeaderAlignment ' .HeaderAlignment
				.AllowSizing = False
				.Width = 96
				.Def(0) = True
				.FormatColumn = "0 pos `A-Z`"
				.Def(34) = "caption,check,icon,icons,picture"
			End With
			.Add ""
		End With
		With .Items
			.CellState(.AddItem("Item 1"),3) = 1
			.CellState(.AddItem("Item 2"),2) = 1
			.CellState(.AddItem("Item 3"),1) = 1
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.HeaderHeight = 48
		.ColumnAutoResize = True
		.Chart.PaneWidth(True) = 0
		With .Columns
			.Add "And others ..."
			With .Add("")
				.HTMLCaption = "First Column"
				.HeaderVertical = True
				.Width = 36
				.AllowSizing = False
				.Def(0) = True
				.Def(48) = 8
				.Position = 0
			End With
			With .Add("")
				.HTMLCaption = "<c><b>Second Column"
				.HeaderVertical = True
				.Width = 36
				.AllowSizing = False
				.Def(0) = True
				.Def(48) = 8
				.Position = 1
			End With
			With .Add("")
				.HTMLCaption = "<r>Third Column"
				.HeaderVertical = True
				.Width = 36
				.AllowSizing = False
				.Def(0) = True
				.Def(48) = 8
				.Position = 2
			End With
		End With
		With .Items
			.CellState(.AddItem("Item 1"),3) = 1
			.CellState(.AddItem("Item 2"),2) = 1
			.CellState(.AddItem("Item 3"),1) = 1
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.HeaderHeight = 48
		.HeaderSingleLine = False
		.ColumnAutoResize = True
		.Chart.PaneWidth(True) = 0
		With .Columns
			.Add "And others ..."
			With .Add("First Column")
				.HeaderVertical = True
				.Width = 36
				.AllowSizing = False
				.Def(0) = True
				.Def(48) = 8
				.Position = 0
			End With
			With .Add("Second Column")
				.HeaderBold = True
				.HeaderVertical = True
				.Width = 36
				.AllowSizing = False
				.Def(0) = True
				.Def(48) = 8
				.Position = 1
			End With
			With .Add("Third Column")
				.HeaderVertical = True
				.Width = 36
				.AllowSizing = False
				.Def(0) = True
				.Def(48) = 8
				.Position = 2
			End With
		End With
		With .Items
			.CellState(.AddItem("Item 1"),3) = 1
			.CellState(.AddItem("Item 2"),2) = 1
			.CellState(.AddItem("Item 3"),1) = 1
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.HeaderHeight = 48
		.ColumnAutoResize = True
		.Chart.PaneWidth(True) = 0
		With .Columns
			.Add "And others ..."
			With .Add("")
				.HTMLCaption = "First"
				.HeaderVertical = True
				.Width = 20
				.AllowSizing = False
				.Def(0) = True
				.Position = 0
			End With
			With .Add("")
				.HTMLCaption = "<c><b>Second"
				.HeaderVertical = True
				.Width = 20
				.AllowSizing = False
				.Def(0) = True
				.Position = 1
			End With
			With .Add("")
				.HTMLCaption = "<r>Third"
				.HeaderVertical = True
				.Width = 20
				.AllowSizing = False
				.Def(0) = True
				.Position = 2
			End With
		End With
		With .Items
			.CellState(.AddItem("Item 1"),3) = 1
			.CellState(.AddItem("Item 2"),2) = 1
			.CellState(.AddItem("Item 3"),1) = 1
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.HeaderHeight = 48
		.ColumnAutoResize = True
		.Chart.PaneWidth(True) = 0
		With .Columns
			.Add "And others ..."
			With .Add("First")
				.HeaderVertical = True
				.Width = 20
				.AllowSizing = False
				.Def(0) = True
				.Position = 0
			End With
			With .Add("Second")
				.HeaderBold = True
				.HeaderVertical = True
				.Width = 20
				.AllowSizing = False
				.Def(0) = True
				.Position = 1
			End With
			With .Add("Third")
				.HeaderVertical = True
				.Width = 20
				.AllowSizing = False
				.Def(0) = True
				.Position = 2
			End With
		End With
		With .Items
			.CellState(.AddItem("Item 1"),3) = 1
			.CellState(.AddItem("Item 2"),2) = 1
			.CellState(.AddItem("Item 3"),1) = 1
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Columns.Add "Tasks"
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
		End With
		With .Items
			.AddBar .AddItem("Task 1"),"Task",#8/2/2017#,#8/6/2017#
			.AddBar .AddItem("Task 2"),"Task",#8/3/2017#,#8/3/2017#
			.AddBar .AddItem("Task 3"),"Task",#8/4/2017#,#8/13/2017#
			.AddBar .AddItem("Task 4"),"Task",#8/5/2017#,#8/5/2017#
			.ItemBarEx("itembar(513) = 0 and itembar(0) = `Task`",33) = 255
			.ItemBarEx("itembar(513) = 0 and itembar(0) = `Task`",513) = "value + 1"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

1950:
Is it possible to mark items that holds items with 0-length (zero,empty, sample 3)
<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Columns.Add "Tasks"
		With .Columns.Add("Duration")
			.Def(18) = 513
			.Visible = False
		End With
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
		End With
		With .ConditionalFormats.Add("%1 = 0")
			.Bold = True
			.BackColor = RGB(190,190,190)
			.ChartBackColor = .BackColor
		End With
		With .Items
			.AllowCellValueToItemBar = True
			.AddBar .AddItem("Task 1"),"Task",#8/2/2017#,#8/6/2017#
			.AddBar .AddItem("Task 2"),"Task",#8/3/2017#,#8/3/2017#
			.AddBar .AddItem("Task 3"),"Task",#8/4/2017#,#8/13/2017#
			.AddBar .AddItem("Task 4"),"Task",#8/5/2017#,#8/5/2017#
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Columns.Add "Tasks"
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
		End With
		With .Items
			.AddBar .AddItem("Task 1"),"Task",#8/2/2017#,#8/6/2017#
			.AddBar .AddItem("Task 2"),"Task",#8/3/2017#,#8/3/2017#
			.AddBar .AddItem("Task 3"),"Task",#8/4/2017#,#8/13/2017#
			.AddBar .AddItem("Task 4"),"Task",#8/5/2017#,#8/5/2017#
			.ItemBarEx("itembar(513) = 0",3) = "`zero-length`"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Columns.Add "Tasks"
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
		End With
		With .Items
			.AddBar .AddItem("Task 1"),"Task",#8/2/2017#,#8/6/2017#
			.AddBar .AddItem("Task 2"),"Task",#8/3/2017#,#8/3/2017#
			.AddBar .AddItem("Task 3"),"Task",#8/4/2017#,#8/13/2017#
			.AddBar .AddItem("Task 4"),"Task",#8/5/2017#,#8/5/2017#
			.ItemBarEx("itembar(513) = 0",53) = "`[frame=RGB(255,0,0),framethick,pattern=6,patterncolor=RGB(255,0,0)]`"
			.ItemBarEx("itembar(513) = 0",55) = "`-4,-4,4,4`"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Columns.Add "Tasks"
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
		End With
		With .Items
			.AddBar .AddItem("Task 1"),"Task",#8/2/2017#,#8/6/2017#
			.AddBar .AddItem("Task 2"),"Task",#8/3/2017#,#8/3/2017#
			.AddBar .AddItem("Task 3"),"Task",#8/4/2017#,#8/13/2017#
			.AddBar .AddItem("Task 4"),"Task",#8/5/2017#,#8/5/2017#
			alert( .ItemBarEx("itembar(513) = 0",256) )
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

1946:
How can I remove all bars from selected items

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.SingleSel = False
		.Columns.Add "Tasks"
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			.SelBackColor = RGB(240,240,240)
			With .Bars.Item("Task")
				.OverlaidType = 3
				.OverlaidGroup = "Task,Task-Diff"
				.Def(3) = "<font ;6><%=%0%>"
				.Def(4) = 18
			End With
			With .Bars.Copy("Task","Task-Diff")
				.Height = 4
				.Color = RGB(255,0,0)
				.Def(3) = "<font ;6><%=%0%>"
				.Def(4) = 16
			End With
		End With
		With .Items
			.AddBar .AddItem("Task 1"),"Task",#8/2/2017#,#8/6/2017#
			h = .AddItem("Task 2")
			.AddBar h,"Task",#8/3/2017#,#8/9/2017#
			.SelectItem(h) = True
			h = .AddItem("Task 3")
			.AddBar h,"Task",#8/4/2017#,#8/13/2017#,""
			.AddBar h,"Task-Diff",#8/5/2017#,#8/14/2017#,"P"
			.SelectItem(h) = True
			.AddBar .AddItem("Task 4"),"Task",#8/5/2017#,#8/16/2017#
			alert( "Bars before remove: " )
			alert( .ItemBar(0,"<*>",256) )
			.ItemBarEx("itemisselected",9) = "`toberemove` + value "
			.RemoveBar 0,"<toberemove*>"
			alert( "Bars after remove: " )
			alert( .ItemBar(0,"<*>",256) )
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

1945:
How can I remove task bars from selected items

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.SingleSel = False
		.Columns.Add "Tasks"
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			.SelBackColor = RGB(240,240,240)
			With .Bars.Item("Task")
				.OverlaidType = 3
				.OverlaidGroup = "Task,Task-Diff"
				.Def(3) = "<font ;6><%=%0%>"
				.Def(4) = 18
			End With
			With .Bars.Copy("Task","Task-Diff")
				.Height = 4
				.Color = RGB(255,0,0)
				.Def(3) = "<font ;6><%=%0%>"
				.Def(4) = 16
			End With
		End With
		With .Items
			.AddBar .AddItem("Task 1"),"Task",#8/2/2017#,#8/6/2017#
			h = .AddItem("Task 2")
			.AddBar h,"Task",#8/3/2017#,#8/9/2017#
			.SelectItem(h) = True
			h = .AddItem("Task 3")
			.AddBar h,"Task",#8/4/2017#,#8/13/2017#,""
			.AddBar h,"Task-Diff",#8/5/2017#,#8/14/2017#,"P"
			.SelectItem(h) = True
			.AddBar .AddItem("Task 4"),"Task",#8/5/2017#,#8/16/2017#
			alert( "Bars before remove: " )
			alert( .ItemBar(0,"<*>",256) )
			.ItemBarEx("itemisselected and itembar(0) = `Task`",9) = "`toberemove` + value "
			.RemoveBar 0,"<toberemove*>"
			alert( "Bars after remove: " )
			alert( .ItemBar(0,"<*>",256) )
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Columns.Add("Tasks").Def(0) = True
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
		End With
		With .Items
			.AddBar .AddItem("Task 1"),"Task",#8/2/2017#,#8/6/2017#
			h = .AddItem("Task 2")
			.AddBar h,"Task",#8/3/2017#,#8/9/2017#
			.CellState(h,0) = 1
			h = .AddItem("Task 3")
			.AddBar h,"Task",#8/4/2017#,#8/13/2017#
			.CellState(h,0) = 1
			.AddBar .AddItem("Task 4"),"Task",#8/5/2017#,#8/16/2017#
			.ItemBarEx("cellstate(0)",42) = 6
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Columns.Add "Tasks"
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			.HistogramView = 112
			.HistogramVisible = True
			.HistogramHeight = 64
			With .Bars.Item("Task")
				.HistogramPattern = 6
				.HistogramType = 1
			End With
		End With
		With .Items
			.AddBar .AddItem("Task 1"),"Task",#8/2/2017#,#8/6/2017#
			.AddBar .AddItem("Task 2"),"Task",#8/3/2017#,#8/9/2017#
			.AddBar .AddItem("Task 3"),"Task",#8/4/2017#,#8/13/2017#
			.AddBar .AddItem("Task 4"),"Task",#8/5/2017#,#8/16/2017#
			.ItemBarEx(True,21) = 2
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Columns.Add "Tasks"
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			With .Bars.Add("Task%Progress")
				.Shortcut = "Task"
				.Def(14) = True
			End With
		End With
		With .Items
			.AddBar .AddItem("Task 1"),"Task",#8/2/2017#,#8/6/2017#
			.AddBar .AddItem("Task 2"),"Task",#8/3/2017#,#8/9/2017#
			.AddBar .AddItem("Task 3"),"Task",#8/4/2017#,#8/13/2017#
			.AddBar .AddItem("Task 4"),"Task",#8/5/2017#,#8/16/2017#
			.ItemBarEx(True,12) = 0.5
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Columns.Add "Tasks"
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
		End With
		With .Items
			.AddBar .AddItem("Task 1"),"Task",#8/2/2017#,#8/6/2017#
			.AddBar .AddItem("Task 2"),"Task",#8/3/2017#,#8/9/2017#
			.AddBar .AddItem("Task 3"),"Task",#8/4/2017#,#8/13/2017#
			.AddBar .AddItem("Task 4"),"Task",#8/5/2017#,#8/16/2017#
			.ItemBarEx(True,513) = 4
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Columns.Add "Tasks"
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
		End With
		With .Items
			.AddBar .AddItem("Task 1"),"Task",#8/2/2017#,#8/6/2017#
			.AddBar .AddItem("Task 2"),"Task",#8/3/2017#,#8/9/2017#
			.AddBar .AddItem("Task 3"),"Task",#8/4/2017#,#8/13/2017#
			.AddBar .AddItem("Task 4"),"Task",#8/5/2017#,#8/16/2017#
			.ItemBarEx(True,545) = "#8/15/2017#"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Columns.Add "Tasks"
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
		End With
		With .Items
			.AddBar .AddItem("Task 1"),"Task",#8/2/2017#,#8/6/2017#
			.AddBar .AddItem("Task 2"),"Task",#8/3/2017#,#8/9/2017#
			.AddBar .AddItem("Task 3"),"Task",#8/4/2017#,#8/13/2017#
			.AddBar .AddItem("Task 4"),"Task",#8/5/2017#,#8/16/2017#
			.ItemBarEx(True,544) = "#8/2/2017#"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Columns.Add "Tasks"
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			.SelBackColor = RGB(240,240,240)
			With .Bars.Item("Task")
				.OverlaidType = 3
				.OverlaidGroup = "Task,Task-Diff"
				.Def(3) = "<font ;6><%=%0%>"
				.Def(4) = 18
			End With
			With .Bars.Copy("Task","Task-Diff")
				.Height = 4
				.Color = RGB(255,0,0)
				.Def(3) = "<font ;6><%=%0%>"
				.Def(4) = 16
			End With
		End With
		With .Items
			.AddBar .AddItem("Task 1"),"Task",#8/2/2017#,#8/6/2017#
			.AddBar .AddItem("Task 2"),"Task",#8/3/2017#,#8/9/2017#
			h = .AddItem("Task 3")
			.AddBar h,"Task",#8/4/2017#,#8/13/2017#,""
			.AddBar h,"Task-Diff",#8/5/2017#,#8/14/2017#,"P"
			.AddBar .AddItem("Task 4"),"Task",#8/5/2017#,#8/16/2017#
			.ItemBarEx(True,33) = "cellcaption(0) like `*2` ? 0x0000FF : 0x00FF00"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.SingleSel = False
		.Columns.Add "Tasks"
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			.SelBackColor = RGB(240,240,240)
			With .Bars.Item("Task")
				.OverlaidType = 3
				.OverlaidGroup = "Task,Task-Diff"
				.Def(3) = "<font ;6><%=%0%>"
				.Def(4) = 18
			End With
			With .Bars.Copy("Task","Task-Diff")
				.Height = 4
				.Color = RGB(255,0,0)
				.Def(3) = "<font ;6><%=%0%>"
				.Def(4) = 16
			End With
		End With
		With .Items
			.AddBar .AddItem("Task 1"),"Task",#8/2/2017#,#8/6/2017#
			h = .AddItem("Task 2")
			.AddBar h,"Task",#8/3/2017#,#8/9/2017#
			.SelectItem(h) = True
			h = .AddItem("Task 3")
			.AddBar h,"Task",#8/4/2017#,#8/13/2017#,""
			.AddBar h,"Task-Diff",#8/5/2017#,#8/14/2017#,"P"
			.SelectItem(h) = True
			.AddBar .AddItem("Task 4"),"Task",#8/5/2017#,#8/16/2017#
			.ItemBarEx("-1",19) = "itembar(0) = `Task` ? 0 : 100"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Columns.Add "Tasks"
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
		End With
		With .Items
			.AddBar .AddItem("Task 1"),"Task",#8/2/2017#,#8/6/2017#
			.AddBar .AddItem("Task 2"),"Task",#8/3/2017#,#8/9/2017#
			.AddBar .AddItem("Task 3"),"Task",#8/4/2017#,#8/13/2017#
			.AddBar .AddItem("Task 4"),"Task",#8/5/2017#,#8/16/2017#
			alert( "Bars before remove: " )
			alert( .ItemBar(0,"<*>",256) )
			.ItemBarEx("cellcaption(0) like `*2 *3`",9) = "`toberemove` + value "
			.RemoveBar 0,"<toberemove*>"
			alert( "Bars after remove: " )
			alert( .ItemBar(0,"<*>",256) )
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_CellStateChanged(Item,ColIndex)
End Function
</SCRIPT>

<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.SelBackMode = 1
		With .Chart
			.LevelCount = 2
			.PaneWidth(False) = 256
			.FirstVisibleDate = #1/1/2017#
		End With
		With .ConditionalFormats.Add("%CS0","check")
			.Bold = True
			.ApplyToBars = "Task"
			.BarColor = RGB(0,0,1)
		End With
		With .Columns.Add("Items")
			.Def(0) = True
			.Width = 256
		End With
		.Columns.Add(G2antt1.ConditionalFormats.Item("check").Expression).FormatColumn = G2antt1.ConditionalFormats.Item("check").Expression
		With .Items
			.AddBar .AddItem("Item 1"),"Task",#1/2/2017#,#1/12/2017#
			h = .AddItem("Item 2")
			.AddBar h,"Task",#1/3/2017#,#1/13/2017#
			.CellState(h,0) = 1
			h = .AddItem("Item 3")
			.AddBar h,"Task",#1/4/2017#,#1/14/2017#
			.CellState(h,0) = 1
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

1934:
How do I automatically bold items being checked

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_CellStateChanged(Item,ColIndex)
End Function
</SCRIPT>

<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.SelBackMode = 1
		.Chart.PaneWidth(True) = 0
		With .ConditionalFormats.Add("%CS0","check")
			.Bold = True
		End With
		.Columns.Add("Items").Def(0) = True
		.Columns.Add(G2antt1.ConditionalFormats.Item("check").Expression).FormatColumn = G2antt1.ConditionalFormats.Item("check").Expression
		With .Items
			.AddItem "Item 1"
			.CellState(.AddItem("Item 2"),0) = 1
			.AddItem "Item 3"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Chart.PaneWidth(True) = 0
		.RadioImage(0) = 32699122
		.RadioImage(1) = 16777216
		.Columns.Add("Check").Def(1) = True
		With .Items
			.AddItem "Radio 1"
			.CellState(.AddItem("Radio 2"),0) = 1
			.AddItem "Radio 1"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Chart.PaneWidth(True) = 0
		.CheckImage(0) = 32699122
		.CheckImage(1) = 16777216
		.Columns.Add("Check").Def(0) = True
		With .Items
			.AddItem "Check 1"
			.CellState(.AddItem("Check 2"),0) = 1
			.AddItem "Check 3"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_CellStateChanged(Item,ColIndex)
End Function
</SCRIPT>

<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.LinesAtRoot = 4
		.SelBackMode = 1
		.Chart.PaneWidth(True) = 0
		With .Columns.Add("Items")
			.Def(0) = True
			.PartialCheck = True
		End With
		With .Columns.Add("Format")
			.FormatColumn = "%CS0"
			.Caption = .FormatColumn
			.Def(5) = 8421504
			.Def(8) = .Def(5)
		End With
		With .Items
			h = .AddItem("Root")
			.InsertItem h,,"Item 1"
			.CellState(.InsertItem(h,,"Item 2"),0) = 1
			.CellState(.InsertItem(h,,"Item 3"),0) = 1
			.ExpandItem(h) = True
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Chart.PaneWidth(True) = 0
		.Columns.Add "Items"
		With .Columns.Add("Format")
			.FormatColumn = "%CD0"
			.Caption = .FormatColumn
			.Def(5) = 8421504
			.Def(8) = .Def(5)
		End With
		With .Items
			.CellData(.AddItem("Item 1"),0) = 1234
			.CellData(.AddItem("Item 2"),0) = "this is just an user data"
			.CellData(.AddItem("Item 3"),0) = #1/1/2001#
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Chart.PaneWidth(True) = 0
		With .Columns.Add("Items")
			With .Editor
				.EditType = 3
				.AddItem 1,"Item 1"
				.AddItem 2,"Item 2"
				.AddItem 3,"Item 3"
			End With
		End With
		With .Columns.Add("Format")
			.FormatColumn = "%0"
			.Caption = .FormatColumn
			.Def(5) = 8421504
			.Def(8) = .Def(5)
			.AllowSizing = False
		End With
		With .Columns.Add("Format")
			.FormatColumn = "%C0"
			.Caption = .FormatColumn
			.Def(5) = 8421504
			.Def(8) = .Def(5)
			.AllowSizing = False
		End With
		With .Items
			.AddItem 1
			.CellValue(.AddItem(0),0) = 2
			.AddItem 2
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		With .Chart
			.PaneWidth(False) = 0
			.LevelCount = 2
			.UnitScale = 65536
			.NonworkingHours = 16253183
			.ShowNonworkingHours = False
			.ShowNonworkingUnits = False
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		With .Chart
			.PaneWidth(False) = 0
			.LevelCount = 2
			.UnitScale = 4096
			.ShowNonworkingDates = False
			.ShowNonworkingUnits = False
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_CellStateChanged(Item,ColIndex)
	With G2antt1
		With .Items
			.ItemBarEx(True,19) = "cellstate(0) = 1 ? 0 : 100"
		End With
	End With
End Function
</SCRIPT>

<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.LinesAtRoot = -1
		With .Columns.Add("Tasks")
			.Def(0) = True
			.PartialCheck = True
		End With
		.HeaderVisible = 1
		.SelBackColor = RGB(240,240,240)
		.SelForeColor = RGB(0,0,0)
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			With .Bars.Item("Summary")
				.StartShape = 0
				.EndShape = 0
				.Shape = 20
			End With
			.SelBackColor = G2antt1.SelBackColor
			.SelBarColor = RGB(128,128,128)
		End With
		With .Items
			h = .AddItem("Project")
			hChild = .InsertItem(h,,"Task 1")
			.AddBar hChild,"Task",#8/2/2017#,#8/8/2017#
			.SelectItem(hChild) = True
			hChild = .InsertItem(h,,"Task 2")
			.AddBar hChild,"Task",#8/3/2017#,#8/10/2017#
			.CellState(hChild) = 1
			hChild = .InsertItem(h,,"Task 3")
			.AddBar hChild,"Task",#8/4/2017#,#8/12/2017#
			.AddBar h,"Summary",#8/1/2017#,#8/1/2017#,"sum"
			.DefineSummaryBars h,"sum",-3,""
			.ExpandItem(h) = True
			.ItemBarEx(True,19) = "cellstate(0) = 1 ? 0 : 100"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.LinesAtRoot = -1
		With .Columns.Add("Tasks")
			.Def(0) = True
			.PartialCheck = True
		End With
		.HeaderVisible = 1
		.SelBackColor = RGB(240,240,240)
		.SelForeColor = RGB(0,0,0)
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			With .Bars.Item("Summary")
				.StartShape = 0
				.EndShape = 0
				.Shape = 20
			End With
			.SelBackColor = G2antt1.SelBackColor
			.SelBarColor = RGB(128,128,128)
		End With
		With .Items
			h = .AddItem("Project")
			hChild = .InsertItem(h,,"Task 1")
			.AddBar hChild,"Task",#8/2/2017#,#8/8/2017#
			.SelectItem(hChild) = True
			hChild = .InsertItem(h,,"Task 2")
			.AddBar hChild,"Task",#8/3/2017#,#8/10/2017#
			.CellState(hChild) = 1
			hChild = .InsertItem(h,,"Task 3")
			.AddBar hChild,"Task",#8/4/2017#,#8/12/2017#
			.CellState(hChild) = 1
			.AddBar h,"Summary",#8/1/2017#,#8/1/2017#,"sum"
			.DefineSummaryBars h,"sum",-3,""
			.ExpandItem(h) = True
			.ItemBarEx("itembar(0) = `Task`",33) = 65280
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_SelectionChanged()
	With G2antt1
		With .Items
			.ItemBarEx(True,257) = "itemisselected"
		End With
	End With
End Function
</SCRIPT>

<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.LinesAtRoot = -1
		.Columns.Add "Tasks"
		.HeaderVisible = 1
		.SelBackColor = RGB(240,240,240)
		.SelForeColor = RGB(0,0,0)
		With .Chart
			.AllowSelectObjects = 0
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			With .Bars.Item("Summary")
				.StartShape = 0
				.EndShape = 0
				.Shape = 20
			End With
			.SelBackColor = G2antt1.SelBackColor
			.SelBarColor = RGB(128,128,128)
		End With
		With .Items
			h = .AddItem("Project")
			hChild = .InsertItem(h,,"Task 1")
			.AddBar hChild,"Task",#8/2/2017#,#8/8/2017#
			.SelectItem(hChild) = True
			hChild = .InsertItem(h,,"Task 2")
			.AddBar hChild,"Task",#8/3/2017#,#8/10/2017#
			.CellState(hChild) = 1
			hChild = .InsertItem(h,,"Task 3")
			.AddBar hChild,"Task",#8/4/2017#,#8/12/2017#
			.CellState(hChild) = 1
			.AddBar h,"Summary",#8/1/2017#,#8/1/2017#,"sum"
			.DefineSummaryBars h,"sum",-3,""
			.ExpandItem(h) = True
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_CellStateChanged(Item,ColIndex)
	With G2antt1
		With .Items
			.ItemBarEx(True,257) = "cellstate(0) = 1"
		End With
	End With
End Function
</SCRIPT>

<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.LinesAtRoot = -1
		With .Columns.Add("Tasks")
			.Def(0) = True
			.PartialCheck = True
		End With
		.HeaderVisible = 1
		.SelBackColor = RGB(240,240,240)
		.SelForeColor = RGB(0,0,0)
		With .Chart
			.AllowSelectObjects = 0
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			With .Bars.Item("Summary")
				.StartShape = 0
				.EndShape = 0
				.Shape = 20
			End With
			.SelBackColor = G2antt1.SelBackColor
			.SelBarColor = RGB(128,128,128)
		End With
		With .Items
			h = .AddItem("Project")
			hChild = .InsertItem(h,,"Task 1")
			.AddBar hChild,"Task",#8/2/2017#,#8/8/2017#
			.SelectItem(hChild) = True
			hChild = .InsertItem(h,,"Task 2")
			.AddBar hChild,"Task",#8/3/2017#,#8/10/2017#
			.CellState(hChild) = 1
			hChild = .InsertItem(h,,"Task 3")
			.AddBar hChild,"Task",#8/4/2017#,#8/12/2017#
			.CellState(hChild) = 1
			.AddBar h,"Summary",#8/1/2017#,#8/1/2017#,"sum"
			.DefineSummaryBars h,"sum",-3,""
			.ExpandItem(h) = True
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

1922:
How do I select all bars on leaf items

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.LinesAtRoot = -1
		With .Columns.Add("Tasks")
			.Def(0) = True
			.PartialCheck = True
		End With
		.HeaderVisible = 1
		.SelBackColor = RGB(240,240,240)
		.SelForeColor = RGB(0,0,0)
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			With .Bars.Item("Summary")
				.StartShape = 0
				.EndShape = 0
				.Shape = 20
			End With
			.SelBackColor = G2antt1.SelBackColor
			.SelBarColor = RGB(128,128,128)
		End With
		With .Items
			h = .AddItem("Project")
			hChild = .InsertItem(h,,"Task 1")
			.AddBar hChild,"Task",#8/2/2017#,#8/8/2017#
			.SelectItem(hChild) = True
			hChild = .InsertItem(h,,"Task 2")
			.AddBar hChild,"Task",#8/3/2017#,#8/10/2017#
			.CellState(hChild) = 1
			hChild = .InsertItem(h,,"Task 3")
			.AddBar hChild,"Task",#8/4/2017#,#8/12/2017#
			.CellState(hChild) = 1
			.AddBar h,"Summary",#8/1/2017#,#8/1/2017#,"sum"
			.DefineSummaryBars h,"sum",-3,""
			.ExpandItem(h) = True
			.ItemBarEx("itemlevel = 1",257) = True
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.LinesAtRoot = -1
		With .Columns.Add("Tasks")
			.Def(0) = True
			.PartialCheck = True
		End With
		.HeaderVisible = 1
		.SelBackColor = RGB(240,240,240)
		.SelForeColor = RGB(0,0,0)
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			With .Bars.Item("Summary")
				.StartShape = 0
				.EndShape = 0
				.Shape = 20
			End With
			.SelBackColor = G2antt1.SelBackColor
			.SelBarColor = RGB(128,128,128)
		End With
		With .Items
			h = .AddItem("Project")
			hChild = .InsertItem(h,,"Task 1")
			.AddBar hChild,"Task",#8/2/2017#,#8/8/2017#
			.SelectItem(hChild) = True
			hChild = .InsertItem(h,,"Task 2")
			.AddBar hChild,"Task",#8/3/2017#,#8/10/2017#
			.CellState(hChild) = 1
			hChild = .InsertItem(h,,"Task 3")
			.AddBar hChild,"Task",#8/4/2017#,#8/12/2017#
			.CellState(hChild) = 1
			.AddBar h,"Summary",#8/1/2017#,#8/1/2017#,"sum"
			.DefineSummaryBars h,"sum",-3,""
			.ExpandItem(h) = True
			.ItemBarEx("(cellstate(0) = 1) and (itembar(0) = `Task`)",3) = "`new caption`"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.LinesAtRoot = -1
		With .Columns.Add("Tasks")
			.Def(0) = True
			.PartialCheck = True
		End With
		.HeaderVisible = 1
		.SelBackColor = RGB(240,240,240)
		.SelForeColor = RGB(0,0,0)
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			With .Bars.Item("Summary")
				.StartShape = 0
				.EndShape = 0
				.Shape = 20
			End With
			.SelBackColor = G2antt1.SelBackColor
			.SelBarColor = RGB(128,128,128)
		End With
		With .Items
			h = .AddItem("Project")
			hChild = .InsertItem(h,,"Task 1")
			.AddBar hChild,"Task",#8/2/2017#,#8/8/2017#
			.SelectItem(hChild) = True
			hChild = .InsertItem(h,,"Task 2")
			.AddBar hChild,"Task",#8/3/2017#,#8/10/2017#
			.CellState(hChild) = 1
			hChild = .InsertItem(h,,"Task 3")
			.AddBar hChild,"Task",#8/4/2017#,#8/12/2017#
			.CellState(hChild) = 1
			.AddBar h,"Summary",#8/1/2017#,#8/1/2017#,"sum"
			.DefineSummaryBars h,"sum",-3,""
			.ExpandItem(h) = True
			.ItemBarEx("(itembar(0) = `Task`)",3) = "`new caption`"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

1919:
How can I change the caption for all bars

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.LinesAtRoot = -1
		With .Columns.Add("Tasks")
			.Def(0) = True
			.PartialCheck = True
		End With
		.HeaderVisible = 1
		.SelBackColor = RGB(240,240,240)
		.SelForeColor = RGB(0,0,0)
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			With .Bars.Item("Summary")
				.StartShape = 0
				.EndShape = 0
				.Shape = 20
			End With
			.SelBackColor = G2antt1.SelBackColor
			.SelBarColor = RGB(128,128,128)
		End With
		With .Items
			h = .AddItem("Project")
			hChild = .InsertItem(h,,"Task 1")
			.AddBar hChild,"Task",#8/2/2017#,#8/8/2017#
			.SelectItem(hChild) = True
			hChild = .InsertItem(h,,"Task 2")
			.AddBar hChild,"Task",#8/3/2017#,#8/10/2017#
			.CellState(hChild) = 1
			hChild = .InsertItem(h,,"Task 3")
			.AddBar hChild,"Task",#8/4/2017#,#8/12/2017#
			.CellState(hChild) = 1
			.AddBar h,"Summary",#8/1/2017#,#8/1/2017#,"sum"
			.DefineSummaryBars h,"sum",-3,""
			.ExpandItem(h) = True
			.ItemBarEx(True,3) = "`new caption`"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.LinesAtRoot = -1
		With .Columns.Add("Tasks")
			.Def(0) = True
			.PartialCheck = True
		End With
		.HeaderVisible = 1
		.SelBackColor = RGB(240,240,240)
		.SelForeColor = RGB(0,0,0)
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			With .Bars.Item("Summary")
				.StartShape = 0
				.EndShape = 0
				.Shape = 20
			End With
			.SelBackColor = G2antt1.SelBackColor
			.SelBarColor = RGB(128,128,128)
		End With
		With .Items
			h = .AddItem("Project")
			hChild = .InsertItem(h,,"Task 1")
			.AddBar hChild,"Task",#8/2/2017#,#8/8/2017#
			.SelectItem(hChild) = True
			hChild = .InsertItem(h,,"Task 2")
			.AddBar hChild,"Task",#8/3/2017#,#8/10/2017#
			.CellState(hChild) = 1
			hChild = .InsertItem(h,,"Task 3")
			.AddBar hChild,"Task",#8/4/2017#,#8/12/2017#
			.CellState(hChild) = 1
			.AddBar h,"Summary",#8/1/2017#,#8/1/2017#,"sum"
			.DefineSummaryBars h,"sum",-3,""
			.ExpandItem(h) = True
			.ItemBarEx("(itembar(0) = `Task`)",514) = "#8/14/2017# - itembar(2)"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.LinesAtRoot = -1
		With .Columns.Add("Tasks")
			.Def(0) = True
			.PartialCheck = True
		End With
		.HeaderVisible = 1
		.SelBackColor = RGB(240,240,240)
		.SelForeColor = RGB(0,0,0)
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			With .Bars.Item("Summary")
				.StartShape = 0
				.EndShape = 0
				.Shape = 20
			End With
			.SelBackColor = G2antt1.SelBackColor
			.SelBarColor = RGB(128,128,128)
		End With
		With .Items
			h = .AddItem("Project")
			hChild = .InsertItem(h,,"Task 1")
			.AddBar hChild,"Task",#8/2/2017#,#8/8/2017#
			.SelectItem(hChild) = True
			hChild = .InsertItem(h,,"Task 2")
			.AddBar hChild,"Task",#8/3/2017#,#8/10/2017#
			.CellState(hChild) = 1
			hChild = .InsertItem(h,,"Task 3")
			.AddBar hChild,"Task",#8/4/2017#,#8/12/2017#
			.CellState(hChild) = 1
			.AddBar h,"Summary",#8/1/2017#,#8/1/2017#,"sum"
			.DefineSummaryBars h,"sum",-3,""
			.ExpandItem(h) = True
			.ItemBarEx("(itembar(0) = `Task`)",514) = "#8/3/2017# - itembar(1)"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.LinesAtRoot = -1
		With .Columns.Add("Tasks")
			.Def(0) = True
			.PartialCheck = True
		End With
		.HeaderVisible = 1
		.SelBackColor = RGB(240,240,240)
		.SelForeColor = RGB(0,0,0)
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			With .Bars.Item("Summary")
				.StartShape = 0
				.EndShape = 0
				.Shape = 20
			End With
			.SelBackColor = G2antt1.SelBackColor
			.SelBarColor = RGB(128,128,128)
		End With
		With .Items
			h = .AddItem("Project")
			hChild = .InsertItem(h,,"Task 1")
			.AddBar hChild,"Task",#8/2/2017#,#8/8/2017#
			.SelectItem(hChild) = True
			hChild = .InsertItem(h,,"Task 2")
			.AddBar hChild,"Task",#8/3/2017#,#8/10/2017#
			.CellState(hChild) = 1
			hChild = .InsertItem(h,,"Task 3")
			.AddBar hChild,"Task",#8/4/2017#,#8/12/2017#
			.CellState(hChild) = 1
			.AddBar h,"Summary",#8/1/2017#,#8/1/2017#,"sum"
			.DefineSummaryBars h,"sum",-3,""
			.ExpandItem(h) = True
			.ItemBarEx("cellstate(0) = 1 and itembar(0) = `Task`",33) = 255
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

1915:
How do I resize all Task bars programatically

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.LinesAtRoot = -1
		With .Columns.Add("Tasks")
			.Def(0) = True
			.PartialCheck = True
		End With
		.HeaderVisible = 1
		.SelBackColor = RGB(240,240,240)
		.SelForeColor = RGB(0,0,0)
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			With .Bars.Item("Summary")
				.StartShape = 0
				.EndShape = 0
				.Shape = 20
			End With
			.SelBackColor = G2antt1.SelBackColor
			.SelBarColor = RGB(128,128,128)
		End With
		With .Items
			h = .AddItem("Project")
			hChild = .InsertItem(h,,"Task 1")
			.AddBar hChild,"Task",#8/2/2017#,#8/8/2017#
			.SelectItem(hChild) = True
			hChild = .InsertItem(h,,"Task 2")
			.AddBar hChild,"Task",#8/3/2017#,#8/10/2017#
			.CellState(hChild) = 1
			hChild = .InsertItem(h,,"Task 3")
			.AddBar hChild,"Task",#8/4/2017#,#8/12/2017#
			.CellState(hChild) = 1
			.AddBar h,"Summary",#8/1/2017#,#8/1/2017#,"sum"
			.DefineSummaryBars h,"sum",-3,""
			.ExpandItem(h) = True
			.ItemBarEx("itembar(0) = `Task`",2) = "value + 2"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.LinesAtRoot = -1
		With .Columns.Add("Tasks")
			.Def(0) = True
			.PartialCheck = True
		End With
		.HeaderVisible = 1
		.SelBackColor = RGB(240,240,240)
		.SelForeColor = RGB(0,0,0)
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			With .Bars.Item("Summary")
				.StartShape = 0
				.EndShape = 0
				.Shape = 20
			End With
			.SelBackColor = G2antt1.SelBackColor
			.SelBarColor = RGB(128,128,128)
		End With
		With .Items
			h = .AddItem("Project")
			hChild = .InsertItem(h,,"Task 1")
			.AddBar hChild,"Task",#8/2/2017#,#8/8/2017#
			.SelectItem(hChild) = True
			hChild = .InsertItem(h,,"Task 2")
			.AddBar hChild,"Task",#8/3/2017#,#8/10/2017#
			.CellState(hChild) = 1
			hChild = .InsertItem(h,,"Task 3")
			.AddBar hChild,"Task",#8/4/2017#,#8/12/2017#
			.CellState(hChild) = 1
			.AddBar h,"Summary",#8/1/2017#,#8/1/2017#,"sum"
			.DefineSummaryBars h,"sum",-3,""
			.ExpandItem(h) = True
			.ItemBarEx("cellstate(0) = 1 and itembar(0) = `Task`",514) = -2
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.LinesAtRoot = -1
		With .Columns.Add("Tasks")
			.Def(0) = True
			.PartialCheck = True
		End With
		.HeaderVisible = 1
		.SelBackColor = RGB(240,240,240)
		.SelForeColor = RGB(0,0,0)
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			With .Bars.Item("Summary")
				.StartShape = 0
				.EndShape = 0
				.Shape = 20
			End With
			.SelBackColor = G2antt1.SelBackColor
			.SelBarColor = RGB(128,128,128)
		End With
		With .Items
			h = .AddItem("Project")
			hChild = .InsertItem(h,,"Task 1")
			.AddBar hChild,"Task",#8/2/2017#,#8/8/2017#
			.SelectItem(hChild) = True
			hChild = .InsertItem(h,,"Task 2")
			.AddBar hChild,"Task",#8/3/2017#,#8/10/2017#
			.CellState(hChild) = 1
			hChild = .InsertItem(h,,"Task 3")
			.AddBar hChild,"Task",#8/4/2017#,#8/12/2017#
			.CellState(hChild) = 1
			.AddBar h,"Summary",#8/1/2017#,#8/1/2017#,"sum"
			.DefineSummaryBars h,"sum",-3,""
			.ExpandItem(h) = True
			.ItemBarEx("itembar(0) = `Task`",514) = 1
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

1912:
How do I count all Task bars in the chart
<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.LinesAtRoot = -1
		.Columns.Add "Tasks"
		.HeaderVisible = 1
		.SelBackColor = RGB(240,240,240)
		.SelForeColor = RGB(0,0,0)
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			With .Bars.Item("Summary")
				.StartShape = 0
				.EndShape = 0
				.Shape = 20
			End With
			.SelBackColor = G2antt1.SelBackColor
			.SelBarColor = RGB(128,128,128)
		End With
		With .Items
			h = .AddItem("Project")
			hChild = .InsertItem(h,,"Task 1")
			.AddBar hChild,"Task",#8/2/2017#,#8/8/2017#
			hChild = .InsertItem(h,,"Task 2")
			.AddBar hChild,"Task",#8/3/2017#,#8/10/2017#
			hChild = .InsertItem(h,,"Task 3")
			.AddBar hChild,"Task",#8/4/2017#,#8/12/2017#
			.AddBar h,"Summary",#8/1/2017#,#8/1/2017#,"sum"
			.DefineSummaryBars h,"sum",-3,""
			.ExpandItem(h) = True
			alert( .ItemBarEx("itembar(0) = `Task`",256) )
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

1911:
How do I select bars whose items are checked

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.LinesAtRoot = -1
		With .Columns.Add("Tasks")
			.Def(0) = True
			.PartialCheck = True
		End With
		.HeaderVisible = 1
		.SelBackColor = RGB(240,240,240)
		.SelForeColor = RGB(0,0,0)
		With .Chart
			.FirstVisibleDate = #8/1/2017#
			.LevelCount = 2
			.PaneWidth(False) = 128
			With .Bars.Item("Summary")
				.StartShape = 0
				.EndShape = 0
				.Shape = 20
			End With
			.SelBackColor = G2antt1.SelBackColor
			.SelBarColor = RGB(128,128,128)
		End With
		With .Items
			h = .AddItem("Project")
			hChild = .InsertItem(h,,"Task 1")
			.AddBar hChild,"Task",#8/2/2017#,#8/8/2017#
			.SelectItem(hChild) = True
			hChild = .InsertItem(h,,"Task 2")
			.AddBar hChild,"Task",#8/3/2017#,#8/10/2017#
			.CellState(hChild) = 1
			hChild = .InsertItem(h,,"Task 3")
			.AddBar hChild,"Task",#8/4/2017#,#8/12/2017#
			.CellState(hChild) = 1
			.AddBar h,"Summary",#8/1/2017#,#8/1/2017#,"sum"
			.DefineSummaryBars h,"sum",-3,""
			.ExpandItem(h) = True
			.ItemBarEx("cellstate(0) = 1",257) = True
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Columns.Add "Task"
		.Chart.FirstVisibleDate = #1/1/2001#
		.Chart.PaneWidth(False) = 48
		.Chart.SelBarColor = RGB(255,0,0)
		With .Items
			h = .AddItem("Task 1")
			.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"K1","K1"
			.AddBar h,"Task",#1/5/2001#,#1/7/2001#,"K2","K2"
			.AddBar h,"Task",#1/8/2001#,#1/10/2001#,"P","P"
			.AddBar .AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"Q","Q"
			.AddBar .AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"M","M"
			.ItemBarEx("cellcaption(0) = `Task 1`",257) = True
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

1909:
How can I select/unselect all bars

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Columns.Add "Task"
		.Chart.FirstVisibleDate = #1/1/2001#
		.Chart.PaneWidth(False) = 48
		.Chart.SelBarColor = RGB(255,0,0)
		With .Items
			h = .AddItem("Task 1")
			.AddBar h,"Task",#1/2/2001#,#1/4/2001#,"K1","K1"
			.AddBar h,"Task",#1/5/2001#,#1/7/2001#,"K2","K2"
			.AddBar h,"Task",#1/8/2001#,#1/10/2001#,"P","P"
			.AddBar .AddItem("Task 2"),"Task",#1/2/2001#,#1/4/2001#,"Q","Q"
			.AddBar .AddItem("Task 4"),"Task",#1/2/2001#,#1/4/2001#,"M","M"
			.ItemBarEx(True,257) = True
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

1908:
Is it possible to set the background color of the chart for one item and one day
<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Columns.Add "Items"
		With .Chart
			.LevelCount = 2
			.PaneWidth(False) = 96
			.FirstVisibleDate = #1/1/2001#
		End With
		With .Items
			.AddItem "Item"
			h = .AddItem("Item")
			.AddBar h,"",#1/2/2001#,#1/3/2001#,"Back"," "
			.ItemBar(h,"Back",7) = 255
			.ItemBar(h,"Back",29) = False
			.AddItem "Item"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		With .Columns.Add("DropDownList").Editor
			.EditType = 3
			.AddItem 1,"One"
			.AddItem 2,"Two"
			.AddItem 3,"Three"
		End With
		With .Items
			.AddItem G2antt1.Columns.Item(0).Editor.FindItem(">ONE")
			.AddItem G2antt1.Columns.Item(0).Editor.FindItem(">ThRee")
			.AddItem G2antt1.Columns.Item(0).Editor.FindItem("ONE")
			.AddItem G2antt1.Columns.Item(0).Editor.FindItem(">tWo")
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.DrawGridLines = 1
		.Chart.PaneWidth(True) = 0
		With .Columns.Add("Default")
			.Def(17) = 1
			.Def(16) = False
		End With
		With .Items
			.AddItem "This is the first line.<br>This is the second line."
			.AddItem "This is the first line.<br>This is the second line."
			.AddItem "This is the first line.<br>This is the second line."
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.DrawGridLines = 1
		.Chart.PaneWidth(True) = 0
		.Columns.Add "Default"
		With .Items
			.CellValueFormat(.AddItem("This is the first line.<br>This is the second line."),0) = 1
			h = .AddItem("<b>This is the first line.<br>This is the second line.</b>")
			.CellValueFormat(h,0) = 1
			.CellSingleLine(h,0) = False
			.CellValueFormat(.AddItem("This is the first line.<br>This is the second line."),0) = 1
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.DrawGridLines = -1
		With .Chart
			.DrawGridLines = -1
			.LevelCount = 2
			.PaneWidth(False) = 128
			.FirstVisibleDate = #1/1/2001#
		End With
		.BackColorAlternate = &H7ff0f0f0
		.BackColorLevelHeader = .BackColor
		.Columns.Add "Column"
		With .Items
			.AddBar .AddItem("Item 1"),"Task",#1/2/2001#,#1/12/2001#
			.AddBar .AddItem("Item 2"),"Task",#1/3/2001#,#1/13/2001#
			.AddBar .AddItem("Item 3"),"Task",#1/2/2001#,#1/12/2001#
			.AddBar .AddItem("Item 4"),"Task",#1/3/2001#,#1/13/2001#
			.AddBar .AddItem("Item 5"),"Task",#1/2/2001#,#1/12/2001#
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<SCRIPT LANGUAGE="VBScript">
Function G2antt1_Change(Item,ColIndex,NewValue)
	With G2antt1
		With .Items
			.EnableItem(.ItemByIndex(1)) = NewValue
		End With
	End With
End Function
</SCRIPT>

<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.FreezeEvents True
		.BeginUpdate 
		.Chart.PaneWidth(True) = 0
		.ScrollBySingleLine = True
		.DrawGridLines = -2
		.Columns.Add "Q"
		.Columns.Add "A"
		With .Items
			h1 = .AddItem("What's your gender?")
			With .CellEditor(h1,1)
				.EditType = 3
				.AddItem 1,"Male"
				.AddItem 0,"Female"
			End With
			.CellValue(h1,1) = 1
			h2 = .AddItem("What's pet name?")
			.CellValue(h2,1) = "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
			.CellSingleLine(h2,1) = False
		End With
		.EndUpdate 
		.FreezeEvents False
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Chart.PaneWidth(True) = 0
		.ScrollBySingleLine = True
		.DrawGridLines = -2
		.Columns.Add "Q"
		With .Columns.Add("A")
			.Def(16) = False
			With .Editor
				.EditType = 5
				.Appearance = 8
			End With
		End With
		With .Items
			h1 = .AddItem("What's name?")
			.CellValue(h1,1) = "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
			h2 = .AddItem("What's your pet name?")
			.CellValue(h2,1) = "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>

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

<BODY onload="Init()">
<OBJECT CLASSID="clsid:CD481F4D-2D25-4759-803F-752C568F53B7" id="G2antt1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With G2antt1
		.BeginUpdate 
		.Chart.PaneWidth(True) = 0
		.ScrollBySingleLine = True
		.DrawGridLines = -2
		.Columns.Add "Q"
		.Columns.Add "A"
		With .Items
			h1 = .AddItem("What's name?")
			.CellValue(h1,1) = "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
			h2 = .AddItem("What's your pet name?")
			With .CellEditor(h2,1)
				.EditType = 5
				.Appearance = 8
			End With
			.CellValue(h2,1) = "This is my pet favorite long long long name, that shoul break the line in multiple pieces"
			.CellSingleLine(h2,1) = False
		End With
		.EndUpdate 
	End With
End Function
</SCRIPT>
</BODY>