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

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DefaultItemHeight := 48
		oG2antt:ShowFocusRect := .F.
		oG2antt:SelBackMode := 1/*exTransparent*/
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := 1/*exHLines*/
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/26/2001"
			oBar := oChart:Bars():Add("Task:Split")
				oBar:Shortcut := "Task"
				oBar:SetProperty("Def",6/*exBarToolTip*/,"<%=%263%>")
				oBar:SetProperty("Def",18/*exBarOffset*/,-12)
			oChart:ColumnsFormatLevel := "1,2/3"
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Duration")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,513)
			oColumn:Visible := .F.
			oColumn:Alignment := 0/*LeftAlignment*/
			oColumn:FormatColumn := "value + `d`"
		oColumn1 := oG2antt:Columns():Add("Working")
			oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,258)
			oColumn1:Visible := .F.
			oColumn1:Alignment := 2/*RightAlignment*/
			oColumn1:FormatColumn := "value + `w`"
		oColumn2 := oG2antt:Columns():Add("Working-Period")
			oColumn2:SetProperty("Def",18/*exCellValueToItemBarProperty*/,263)
			oColumn2:Visible := .F.
			oColumn2:Alignment := 1/*CenterAlignment*/
			oColumn2:FormatColumn := "((value replace `\r\n` with `,`) replace `#` with ``) replace ` ` with ``"
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2002","01/11/2002")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/03/2002","01/15/2002")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","12/31/2001","01/13/2002")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1967:
How do I get the duration/working count of the bar (sample 5)

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemMaxHeight",Item,64)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn,oColumn1,oColumn2,oColumn3
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2002"
			oBar := oChart:Bars():Add("Task:Split")
				oBar:Shortcut := "Task"
				oBar:SetProperty("Def",6/*exBarToolTip*/,"<%=%263%>")
			oChart:ColumnsFormatLevel := "1,2"
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
		oColumn := oG2antt:Columns():Add("Task")
			oColumn:AllowSizing := .F.
			oColumn:Width := 48
		oColumn1 := oG2antt:Columns():Add("Duration")
			oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,513)
			oColumn1:Visible := .F.
			oColumn1:Alignment := 0/*LeftAlignment*/
		oColumn2 := oG2antt:Columns():Add("Working")
			oColumn2:SetProperty("Def",18/*exCellValueToItemBarProperty*/,258)
			oColumn2:Visible := .F.
			oColumn2:Alignment := 2/*RightAlignment*/
		oColumn3 := oG2antt:Columns():Add("Working-Period")
			oColumn3:SetProperty("Def",18/*exCellValueToItemBarProperty*/,263)
			oColumn3:SetProperty("Def",16/*exCellSingleLine*/,.F.)
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2002","01/12/2002")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/03/2002","01/15/2002")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/04/2002","01/16/2002")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1966:
How do I get the duration/working count of the bar (sample 4)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn,oColumn1
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/26/2001"
			oChart:Bars():Add("Task:Split"):Shortcut := "Task"
			oChart:ColumnsFormatLevel := "1,2"
		oG2antt:Columns():Add("Task"):Width := 48
		oColumn := oG2antt:Columns():Add("Duration")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,513)
			oColumn:Visible := .F.
			oColumn:Alignment := 0/*LeftAlignment*/
			oColumn:FormatColumn := "value + `d`"
		oColumn1 := oG2antt:Columns():Add("Working")
			oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,258)
			oColumn1:Visible := .F.
			oColumn1:Alignment := 2/*RightAlignment*/
			oColumn1:FormatColumn := "value + `w`"
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2002","01/12/2002")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/03/2002","01/15/2002")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1965:
How do I get the duration/working count of the bar (sample 3)

PROCEDURE OnBarResizing(oG2antt,Item,Key)
	LOCAL oItems
	oItems := oG2antt:Items()
		DevOut( oItems:CellCaption(Item,0) )
		DevOut( "Working" )
		DevOut( Transform(oItems:ItemBar(Item,Key,258/*exBarWorkingCount*/),"") )
		DevOut( oItems:CellCaption(Item,0) )
		DevOut( "Duration" )
		DevOut( Transform(oItems:ItemBar(Item,Key,513/*exBarDuration*/),"") )
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BarResizing := {|Item,Key| OnBarResizing(oG2antt,Item,Key)} /*Occurs when a bar is moving or resizing.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/26/2001"
			oChart:Bars():Add("Task:Split"):Shortcut := "Task"
		oG2antt:Columns():Add("Task"):Width := 48
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2002","01/12/2002")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/03/2002","01/15/2002")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1964:
How do I get the duration/working count of the bar (sample 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/26/2001"
			oBar := oChart:Bars():Add("Task:Split")
				oBar:Shortcut := "Task"
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%258%>w")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar:SetProperty("Def",44/*exBarExtraCaption*/,"<%=%513%>d")
				oBar:SetProperty("Def",45/*exBarExtraCaptionHAlign*/,16)
		oG2antt:Columns():Add("Task"):Width := 48
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2002","01/12/2002")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/03/2002","01/15/2002")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1963:
How do I get the duration/working count of the bar (sample 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,196)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2002"
			oChart:Bars():Add("Task:Split"):Shortcut := "Task"
		oG2antt:Columns():Add("Task"):Width := 48
		oG2antt:Columns():Add("Duration"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,513)
		oG2antt:Columns():Add("Working"):SetProperty("Def",18/*exCellValueToItemBarProperty*/,258)
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","01/02/2002","01/12/2002")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/03/2002","01/15/2002")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1962:
How can I draw a solid frame around the the focusing item

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:SingleSel := .F.
		oG2antt:DefaultItemHeight := 20
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:RenderType := -1
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABOkGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEwpFAZBhgeDYMiSNoYDJCM4wHIURRJFCUJSGWQpTgSIgyT5HFIxXKoASbJabZLhWS6EpWOotTbIQQRYCkEyfKKfZyGURZQqOKA1DBZErWTJESRFJqLazgO4LAhyQYrVgAErzVKVCRNOqbJzADApdpGQJTULDNTQHRFIyhOSnIRrWbMAhid6JUZiVT4dBOIYhSYANAqCwLFqrDJmWrpV5WZjlZ47V6BdAyXJsIrmFJEXaOGhyDDlGybSDZYryfZhUziUw4XjbWwZDqPF6DKTTdSGLREE8WZVlURZvDaep3C+AY8kAYRgGCCBJECUhjDoHROEYWgoAGTQ1CEEx9lGMY0CQUYSnuZQDBGBYFlOH5+H+igGAKAJgEgFgGgGVgDn4CoCmCSA2A6A5hAgDgQgSYRIE4" +;
		"EoFGGCBiBeBhhkgPgbgcYgICoH4IGGWIOCSBhiGiHgVgoYooFoAoLGIWI+DCCgjCiTgrgII4ImYOoOmOSJ2AYOpWlQDQBICA=")
		oG2antt:ShowFocusRect := .T.
		oG2antt:SetProperty("Background",19/*exShowFocusRect*/,0x1000000)
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Chart():SetProperty("PaneWidth",.T.,1)
		oColumn := oG2antt:Columns():Add("P1")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1961:
The frame around the focusing item is not very clear. Can I show it larger or more cleared (sample 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:SingleSel := .F.
		oG2antt:DefaultItemHeight := 20
		oG2antt:ShowFocusRect := .T.
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:RenderType := -1
			oAppearance:Add(2,"gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBKUQSDqEYyjGLIXAWCYSAAMIwDKAUEwpFAZBhgeCRUgyJI3RgMUIzVAcRRFEiUJQlIZZCjOAw0SIMU7xZRcNxsACnaZnCR4NiuRYiUhOcqzRIQIQ4CiEahqOgJbDUJYwWZKAyjBY8XTZFCSJCpeJ6egOc5jRxQUp1WAEXx3GSsJKvCZ5cADBY+VLQNS0JBtMSTKSLaiuWoIJqCPaDRheWKQJh1NSnLqEcjyYANDxDCZlWzAYxWTZ2Uz7N7PbB0HY4DyPGKZYrfESVRbQcZNS6nNigPI9XhfGq6VjRe63ZaOaYpWrnOJqTRWjOKYujWdZ2BGO5lkuBAAkmcQkDmDBEAwEQJCgGhMGcQ4pkiSxGAAOYmkQIhvkYNg2gSCgyj+LI4GIMIwF2XQoAYAoAmASAWAaAZgggJgKFiT54DYDoDmECBGBKBJgGg" +;
		"TgWgWYRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChiigYgsgsYYYBYMIKCMKJOCuDRjGiOgLg6Y5InYPoPmQCAkmsXAQDQBCAg=")
			oAppearance:Add(3,"CP:2 -3 0 3 0")
		oG2antt:SetProperty("Background",19/*exShowFocusRect*/,0x3010101)
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Chart():SetProperty("PaneWidth",.T.,1)
		oColumn := oG2antt:Columns():Add("P1")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1960:
The frame around the focusing item is not very clear. Can I show it larger or more cleared (sample 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oColumn
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:SingleSel := .F.
		oG2antt:ShowFocusRect := .T.
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABHoDg6AADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFiCCQwSDKEjyCKcGRHF6MI6gOYpCgOIYjRJNIASVAceAAGaUZrjSgobjmOYhAJCLqhYIgASXJqLaBlOCaAieSc+QhjQJIJoeCZXU5TFg1BTsOhqEqcRiseaRVDCaIJWzbdYWLDdNQHHKYLjnWorbpSJZ5XjNEySDQkMS9PrEJ7vST8FBCdAABLJUB2BR9RwxRafKpnWwJDpmCaOQLXEB5DK1PyVMTKYrtGy7GrIAJxWxbV4UHh+QABOzIMAvHKJMwvHYcUZne5XVLeF41HbONogPaJZyIAK2cLROq6Xo7GEcJZEcLASB4DwvgWUZlE6AQQhKAYkkYdA6hyDIwHgSoqFwQgmnsYxjGgSIiBOTpSEiAwRgOJI7j4JAHA6U5wm0MpPlOBIjD8TZiGYCICiCGAuA6AxhAgMgSgOYQ4DY" +;
		"Bg/g6cw1n+ABOmMMJ9DmCwjnScw4RsVJngkYh4hoKIKmKKI2CmC5ikiQgqgiT5jhyMw8g4QwIn0OIKEiCJhD8DwTGyfA7k0WQOEWEQkGkJhIhKZB5DYSoTiSCQEn4PQOCOXJcCeIJjliaIQk0aRyF4O5llmAhfhgZhJg4ZoYiaAxYn4PZOhOZJaCUZYTiYQw1mcOZUm+HQnHmWh4h6Z4pnYeYfk0eYsmqG4nAgNJ2DqD5DkCWoiGiOgqgyI5omoRoNiSaQKFKEojCaM4ugSFhOjkAJcieKgDkaH4oioGoOiaKRqgqEoqDddwyhuAxPgOMJ8DyDZqk6NYtCsapmjiLprHqdo6i+K5K1oPhOlqPgKD4DpjnII4yiOewuk6MxtAsMpSjObQ7EaT4wk6ewYn0PgPAiCJkjeLgDk6X44i4G4OmaORuguEpqDkLAzkaWg+E8GIUmaPIvEOVpzj2Lxbl6eo+G+S5in4OYPmOaJyjuTwjnYWpBg6DAjAqQZwkwJw" +;
		"NkKcJsEcEJCDBEpaD6Dw8BiapGjGSgfB2RpxmyBwgkicZ8haBw/g+M5TBcPQPlOXJskscp8jsMJMnMLJXDGTZzEyYw2kwMoDlcFw9i2M4/EGUJPg0CxFlENBtCcSJSnQfQ0m+SgPHsaJ7lALZLG6XZVHWDRfFqVY1k0ZxdladYTnifJUGaeAWAeMnSGcGWgBObJ3lWbwdjKW5cHcTZPHaLkN4GxXDlFqFsA4uRbBOGAFAEIzAsDEFOBkfYqR4D6AOBEYo8QuBvAmMceInBDgcD0JwOIqQyJ1DMAwG4IANDnHSMoK4QhOgMBGNEIQvQWAdGenETIswGiddsAAQAgCAgA==")
			oAppearance:Add(2,"gBFLBCJwBAEHhEJAAEhABeEGACAADACAxRDgMQBQKAAzAJBIYhkGYYYCgMZRUDGCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADDFIBQSLAYROGSDJBGODJDjWGIeQLOEhQHIMRxPE6UYLhWYpBDKPYcUbGc7yBBMVwGf59XzACoKSheQIVSDQkw6Fo6NYhAxHALyNRkBy8f60KjtGpodDUJYvW5JYyjBZ8EznOqbJBkeJ7BgOe5NQjaD72VgdWQJFSWJajWYYJDOJY2ZAAE5TVINEwxJbDaylChIdxaF6WAzZEBhBYoATPNLBMrhWqKDw2XaQWBCOgwHYeR5LU7BdRwbIrRq2eAAXbcVyXfDddZlBK+QA0SK9lRVTKvJZmKgBWw1COSxmAAGw4kcNx1iKFBiCAfQsG8lJemucg7nsXpUHOOxrm+DI3jOH4XAOBx2nscw0j2HhPG4L5uGEVIECQCBCEUAYkGMHQHFGSBlGaAxkEgQgTGCVBsDYQhCgQJZrHK" +;
		"UggGEShkFGNgIlsNpPnMHJHD+TADAIJIJiIWIeCqChikiIgmgiD5zHyXxgiACJKCuC4jHiZgtg6I4IlkCQwkwOIonMPJjEkFhGhGZBpA4KoMBCGJuEiE5lAkGg7hMY4JEYVoUCUNAOE6FZl0KWQACWOR2GKF5mBmChchkJRZhoXYaCKKYqGuDglEmNhuhWZpIiYc4dCcCRqGmHZlgm2YxAwSQKESHwkFkKgpiAIAIH4PIimOOg2DiChoiQJRRD+TZDHCfwyAyCgyg+JpiioYJ/DgDgIlECQ6lwRAEICA=")
			oAppearance:Add(3,"CP:2 -2 0 2 0")
		oG2antt:SetProperty("SelBackColor",0x1000000)
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oG2antt:Chart():SetProperty("PaneWidth",.T.,1)
		oG2antt:SetProperty("Background",19/*exShowFocusRect*/,0x3ff0000)
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("P1")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1959:
How can I display the start/end margins of bars, when cursor hovers it like a tooltip

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("exBarToolTip")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:Bars:Item("Task"):SetProperty("Def",6/*exBarToolTip*/,"<b><%=%9 + '/' + %C0%></b><br><upline><dotline>Start: <%=%1%><br>End: <%=%2%><br>Duration: <%=(%2-%1)%><br>Working: <%=%258%>")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Bar.Def"),"Task","01/02/2001","01/09/2001","K1")
			oItems:AddBar(oItems:AddItem("Bar.Def"),"Task","01/03/2001","01/10/2001","K1")
			h := oItems:AddItem("Items.ItemBar")
			oItems:AddBar(h,"Unknown","01/04/2001","01/11/2001","K")
			oItems:SetProperty("ItemBar",h,"K",6/*exBarToolTip*/,"Start:<%=%1%><br>End:<%=%2%>")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1958:
Is it possible to define different kinds of summary bars with using the EBN files

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oItems
	LOCAL hSummaryJ,hSummaryK,hSummaryZ,hTaskJ,hTaskK,hTaskZ

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:RenderType := -16777216
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABN0GACAADACAxRDAMgBQKAAzQFAYahuGSGAAGMYxQgmFgAQhFcZQSKUOQTDKMIziYBYJhEMQyDAAUIjOKsIhkGYcZAGQBJCjWGodQLOEgwHIERQjEyUJAGGQIHhyPYbUbGUpQHKkeRtGqgBgoKhKEouNYgAbGYIwTRsdyfDSXBpEWwbDgkNQwWTDNoRDIUQStCysaYjOpnfrUAJ1P7FdQ1NJkXRhGSSK7maapaiCSZ6STCMj1FhVKSNJ7DQKhGpgKh/ApgYpQOK4fLNXyRBK4QAyKA6bgPFZOZbFViaXY1V5bNKrcjhHQwAyHJ4XXRdV4YRAkUT4GqiJKGSYcQhuXZWbRqO6ABhef6DRThc6jKpFHIE4llEcojHqSZNgoIxnlgd5thsLREleL43gsYZ9BkaAYkMAgAm+CxGDWWAtiKCRfjcdRgHoHYnicUwgAIEIREAaQYkcQZUHIGRUDQJBOEYRAhDYCxGgMZAkCgdYQha" +;
		"XQIAYERwQuahXggdgeG6VZ4H4IhdiIGIOB8YIiGiHZZgqYpGF4KYHiKCI+CAU5jCiTQ2g0YhEFyax4gABAEIC")
			oAppearance:Add(2,"gBFLBCJwBAEHhEJAAEhABU0IQAAYAQGKQYhiAKBQAGaAoDDcMA4QwAAyjAKMEwsACEIrjKCRShyCYZRhGcTAJBMIhiGQYAChEZxVhEMgzDjIAxSJAcQRFESaAABGCQGh+N4/S4NIi0CIsZQjCaiZ7pKA5bgMCo+UrNMixZQVCSOGChYRpCaZWpGGodQRUFbVHAlKypJKCKrEWSrDhuYAAW7XM7yBS1TzVNSuLZtaLqSroAJ1WTWMB0Ra8NzZEKfaZACj4arKejrRDCMAggI=")
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 1,0,0 } )  , .F. ))
			oBar1 := oChart:Bars:Item("Summary")
				oBar1:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar1:SetProperty("Color",0x2000000)
		oItems := oG2antt:Items()
			hSummaryJ := oItems:AddItem("Summary A")
			oItems:AddBar(hSummaryJ,"Summary","01/02/2001","01/02/2001","J")
			hTaskJ := oItems:InsertItem(hSummaryJ,,"Task A.1")
			oItems:AddBar(hTaskJ,"Task","01/02/2001","01/05/2001","J1")
			hTaskJ := oItems:InsertItem(hSummaryJ,,"Task A.2")
			oItems:AddBar(hTaskJ,"Task","01/04/2001","01/08/2001","J2")
			oItems:DefineSummaryBars(hSummaryJ,"J",-1,"<*>")
			hSummaryK := oItems:AddItem("Summary B")
			oItems:AddBar(hSummaryK,"Summary","01/02/2001","01/02/2001","K")
			hTaskK := oItems:InsertItem(hSummaryK,,"Task B.1")
			oItems:AddBar(hTaskK,"Task","01/02/2001","01/05/2001","K1")
			hTaskK := oItems:InsertItem(hSummaryK,,"Task B.2")
			oItems:AddBar(hTaskK,"Task","01/04/2001","01/08/2001","K2")
			oItems:DefineSummaryBars(hSummaryK,"K",-1,"<*>")
			oItems:SetProperty("ItemBar",0,"<K*>",33/*exBarColor*/,255)
			hSummaryZ := oItems:AddItem("Summary B")
			oItems:AddBar(hSummaryZ,"Summary","01/02/2001","01/02/2001","Z")
			hTaskZ := oItems:InsertItem(hSummaryZ,,"Task B.1")
			oItems:AddBar(hTaskZ,"Task","01/02/2001","01/05/2001","Z1")
			hTaskZ := oItems:InsertItem(hSummaryZ,,"Task B.2")
			oItems:AddBar(hTaskZ,"Task","01/04/2001","01/08/2001","Z2")
			oItems:DefineSummaryBars(hSummaryZ,"Z",-1,"<*>")
			oItems:SetProperty("ItemBar",hSummaryZ,"Z",33/*exBarColor*/,16842496)
			oItems:SetProperty("ItemBar",0,"<Z1>",33/*exBarColor*/,50266112)
			oItems:SetProperty("ItemBar",0,"<Z2>",33/*exBarColor*/,33554176)
			oItems:SetProperty("ExpandItem",0,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1957:
How can I display the week-number in ISO8601 format

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/12/2007"
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:UnitScale := 256/*exWeek*/
			oChart:Level(0):FormatLabel := "value + `<r><off -4><fgcolor=808080><font ;6>` + year(dvalue)"
			oChart:Level(1):FormatLabel := "(value = 1 ? `<bgcolor=000000><fgcolor=FFFFFF>` : ``) + value"
			oChart:WeekNumberAs := 0/*exISO8601WeekNumber*/
			oChart:FirstWeekDay := 1/*exMonday*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
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

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:ColumnAutoResize := .T.
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:DrawGridLines := 2/*exVLines*/
		oColumns := oG2antt:Columns()
			oColumn := oColumns:Add("Left")
				oColumn:AllowSizing := .F.
				oColumn:Width := 96
				oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn:FormatColumn := "0 pos `A-Z`"
			oColumn1 := oColumns:Add("Center")
				oColumn1:HeaderAlignment := 1/*CenterAlignment*/
				oColumn1:Alignment := oColumn1:HeaderAlignment()
				oColumn1:AllowSizing := .F.
				oColumn1:Width := 96
				oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn1:FormatColumn := "0 pos `A-Z`"
			oColumn2 := oColumns:Add("Right")
				oColumn2:HeaderAlignment := 2/*RightAlignment*/
				oColumn2:Alignment := oColumn2:HeaderAlignment()
				oColumn2:AllowSizing := .F.
				oColumn2:Width := 96
				oColumn2:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn2:FormatColumn := "0 pos `A-Z`"
				oColumn2:SetProperty("Def",34/*exCellDrawPartsOrder*/,"caption,check,icon,icons,picture")
			oColumns:Add("")
		oItems := oG2antt:Items()
			oItems:SetProperty("CellState",oItems:AddItem("Item 1"),3,1)
			oItems:SetProperty("CellState",oItems:AddItem("Item 2"),2,1)
			oItems:SetProperty("CellState",oItems:AddItem("Item 3"),1,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1955:
Can I display the column's multiple-lines caption vertically oriented (method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:HeaderHeight := 48
		oG2antt:ColumnAutoResize := .T.
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumns := oG2antt:Columns()
			oColumns:Add("And others ...")
			oColumn := oColumns:Add("")
				oColumn:HTMLCaption := "First Column"
				oColumn:HeaderVertical := .T.
				oColumn:Width := 36
				oColumn:AllowSizing := .F.
				oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn:SetProperty("Def",48/*exCellPaddingLeft*/,8)
				oColumn:Position := 0
			oColumn1 := oColumns:Add("")
				oColumn1:HTMLCaption := "<c><b>Second Column"
				oColumn1:HeaderVertical := .T.
				oColumn1:Width := 36
				oColumn1:AllowSizing := .F.
				oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn1:SetProperty("Def",48/*exCellPaddingLeft*/,8)
				oColumn1:Position := 1
			oColumn2 := oColumns:Add("")
				oColumn2:HTMLCaption := "<r>Third Column"
				oColumn2:HeaderVertical := .T.
				oColumn2:Width := 36
				oColumn2:AllowSizing := .F.
				oColumn2:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn2:SetProperty("Def",48/*exCellPaddingLeft*/,8)
				oColumn2:Position := 2
		oItems := oG2antt:Items()
			oItems:SetProperty("CellState",oItems:AddItem("Item 1"),3,1)
			oItems:SetProperty("CellState",oItems:AddItem("Item 2"),2,1)
			oItems:SetProperty("CellState",oItems:AddItem("Item 3"),1,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1954:
Can I display the column's multiple-lines caption vertically oriented (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:HeaderHeight := 48
		oG2antt:HeaderSingleLine := .F.
		oG2antt:ColumnAutoResize := .T.
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumns := oG2antt:Columns()
			oColumns:Add("And others ...")
			oColumn := oColumns:Add("First Column")
				oColumn:HeaderVertical := .T.
				oColumn:Width := 36
				oColumn:AllowSizing := .F.
				oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn:SetProperty("Def",48/*exCellPaddingLeft*/,8)
				oColumn:Position := 0
			oColumn1 := oColumns:Add("Second Column")
				oColumn1:HeaderBold := .T.
				oColumn1:HeaderVertical := .T.
				oColumn1:Width := 36
				oColumn1:AllowSizing := .F.
				oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn1:SetProperty("Def",48/*exCellPaddingLeft*/,8)
				oColumn1:Position := 1
			oColumn2 := oColumns:Add("Third Column")
				oColumn2:HeaderVertical := .T.
				oColumn2:Width := 36
				oColumn2:AllowSizing := .F.
				oColumn2:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn2:SetProperty("Def",48/*exCellPaddingLeft*/,8)
				oColumn2:Position := 2
		oItems := oG2antt:Items()
			oItems:SetProperty("CellState",oItems:AddItem("Item 1"),3,1)
			oItems:SetProperty("CellState",oItems:AddItem("Item 2"),2,1)
			oItems:SetProperty("CellState",oItems:AddItem("Item 3"),1,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1953:
Can I display the column's caption vertically oriented (method 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:HeaderHeight := 48
		oG2antt:ColumnAutoResize := .T.
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumns := oG2antt:Columns()
			oColumns:Add("And others ...")
			oColumn := oColumns:Add("")
				oColumn:HTMLCaption := "First"
				oColumn:HeaderVertical := .T.
				oColumn:Width := 20
				oColumn:AllowSizing := .F.
				oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn:Position := 0
			oColumn1 := oColumns:Add("")
				oColumn1:HTMLCaption := "<c><b>Second"
				oColumn1:HeaderVertical := .T.
				oColumn1:Width := 20
				oColumn1:AllowSizing := .F.
				oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn1:Position := 1
			oColumn2 := oColumns:Add("")
				oColumn2:HTMLCaption := "<r>Third"
				oColumn2:HeaderVertical := .T.
				oColumn2:Width := 20
				oColumn2:AllowSizing := .F.
				oColumn2:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn2:Position := 2
		oItems := oG2antt:Items()
			oItems:SetProperty("CellState",oItems:AddItem("Item 1"),3,1)
			oItems:SetProperty("CellState",oItems:AddItem("Item 2"),2,1)
			oItems:SetProperty("CellState",oItems:AddItem("Item 3"),1,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1952:
Can I display the column's caption vertically oriented (method 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:HeaderHeight := 48
		oG2antt:ColumnAutoResize := .T.
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumns := oG2antt:Columns()
			oColumns:Add("And others ...")
			oColumn := oColumns:Add("First")
				oColumn:HeaderVertical := .T.
				oColumn:Width := 20
				oColumn:AllowSizing := .F.
				oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn:Position := 0
			oColumn1 := oColumns:Add("Second")
				oColumn1:HeaderBold := .T.
				oColumn1:HeaderVertical := .T.
				oColumn1:Width := 20
				oColumn1:AllowSizing := .F.
				oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn1:Position := 1
			oColumn2 := oColumns:Add("Third")
				oColumn2:HeaderVertical := .T.
				oColumn2:Width := 20
				oColumn2:AllowSizing := .F.
				oColumn2:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn2:Position := 2
		oItems := oG2antt:Items()
			oItems:SetProperty("CellState",oItems:AddItem("Item 1"),3,1)
			oItems:SetProperty("CellState",oItems:AddItem("Item 2"),2,1)
			oItems:SetProperty("CellState",oItems:AddItem("Item 3"),1,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1951:
How can I resize all task-bars 0-length

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/06/2017")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","08/03/2017","08/03/2017")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","08/04/2017","08/13/2017")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","08/05/2017","08/05/2017")
			oItems:SetProperty("ItemBarEx","itembar(513) = 0 and itembar(0) = `Task`",33/*exBarColor*/,255)
			oItems:SetProperty("ItemBarEx","itembar(513) = 0 and itembar(0) = `Task`",513/*exBarDuration*/,"value + 1")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1950:
Is it possible to mark items that holds items with 0-length (zero,empty, sample 3)
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oConditionalFormat
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Duration")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,513)
			oColumn:Visible := .F.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
		oConditionalFormat := oG2antt:ConditionalFormats():Add("%1 = 0")
			oConditionalFormat:Bold := .T.
			oConditionalFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
			oConditionalFormat:SetProperty("ChartBackColor",oConditionalFormat:BackColor())
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/06/2017")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","08/03/2017","08/03/2017")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","08/04/2017","08/13/2017")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","08/05/2017","08/05/2017")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1949:
Is it possible to mark items that holds items with 0-length (zero,empty, sample 2)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/06/2017")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","08/03/2017","08/03/2017")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","08/04/2017","08/13/2017")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","08/05/2017","08/05/2017")
			oItems:SetProperty("ItemBarEx","itembar(513) = 0",3/*exBarCaption*/,"`zero-length`")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1948:
Is it possible to mark items that holds items with 0-length (zero,empty, sample 1)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/06/2017")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","08/03/2017","08/03/2017")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","08/04/2017","08/13/2017")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","08/05/2017","08/05/2017")
			oItems:SetProperty("ItemBarEx","itembar(513) = 0",53/*exBarBackgroundExt*/,"`[frame=RGB(255,0,0),framethick,pattern=6,patterncolor=RGB(255,0,0)]`")
			oItems:SetProperty("ItemBarEx","itembar(513) = 0",55/*exBarBackgroundExtInflate*/,"`-4,-4,4,4`")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1947:
How can I find how many tasks/bars of 0-length (zero,empty) do I have

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/06/2017")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","08/03/2017","08/03/2017")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","08/04/2017","08/13/2017")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","08/05/2017","08/05/2017")
			DevOut( Transform(oItems:ItemBarEx("itembar(513) = 0",256/*exBarsCount*/),"") )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1946:
How can I remove all bars from selected items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:SingleSel := .F.
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 3/*exOverlaidBarsStack*/
				oBar:OverlaidGroup := "Task,Task-Diff"
				oBar:SetProperty("Def",3/*exBarCaption*/,"<font ;6><%=%0%>")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
			oBar1 := oChart:Bars():CallMethod("Copy","Task","Task-Diff")
				oBar1:Height := 4
				oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oBar1:SetProperty("Def",3/*exBarCaption*/,"<font ;6><%=%0%>")
				oBar1:SetProperty("Def",4/*exBarHAlignCaption*/,16)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/06/2017")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","08/03/2017","08/09/2017")
			oItems:SetProperty("SelectItem",h,.T.)
			h := oItems:AddItem("Task 3")
			oItems:AddBar(h,"Task","08/04/2017","08/13/2017","")
			oItems:AddBar(h,"Task-Diff","08/05/2017","08/14/2017","P")
			oItems:SetProperty("SelectItem",h,.T.)
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","08/05/2017","08/16/2017")
			DevOut( "Bars before remove: " )
			DevOut( Transform(oItems:ItemBar(0,"<*>",256/*exBarsCount*/),"") )
			oItems:SetProperty("ItemBarEx","itemisselected",9/*exBarKey*/,"`toberemove` + value ")
			oItems:RemoveBar(0,"<toberemove*>")
			DevOut( "Bars after remove: " )
			DevOut( Transform(oItems:ItemBar(0,"<*>",256/*exBarsCount*/),"") )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1945:
How can I remove task bars from selected items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:SingleSel := .F.
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 3/*exOverlaidBarsStack*/
				oBar:OverlaidGroup := "Task,Task-Diff"
				oBar:SetProperty("Def",3/*exBarCaption*/,"<font ;6><%=%0%>")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
			oBar1 := oChart:Bars():CallMethod("Copy","Task","Task-Diff")
				oBar1:Height := 4
				oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oBar1:SetProperty("Def",3/*exBarCaption*/,"<font ;6><%=%0%>")
				oBar1:SetProperty("Def",4/*exBarHAlignCaption*/,16)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/06/2017")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","08/03/2017","08/09/2017")
			oItems:SetProperty("SelectItem",h,.T.)
			h := oItems:AddItem("Task 3")
			oItems:AddBar(h,"Task","08/04/2017","08/13/2017","")
			oItems:AddBar(h,"Task-Diff","08/05/2017","08/14/2017","P")
			oItems:SetProperty("SelectItem",h,.T.)
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","08/05/2017","08/16/2017")
			DevOut( "Bars before remove: " )
			DevOut( Transform(oItems:ItemBar(0,"<*>",256/*exBarsCount*/),"") )
			oItems:SetProperty("ItemBarEx","itemisselected and itembar(0) = `Task`",9/*exBarKey*/,"`toberemove` + value ")
			oItems:RemoveBar(0,"<toberemove*>")
			DevOut( "Bars after remove: " )
			DevOut( Transform(oItems:ItemBar(0,"<*>",256/*exBarsCount*/),"") )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1944:
How can I change the pattern for some bars only

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks"):SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/06/2017")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","08/03/2017","08/09/2017")
			oItems:SetProperty("CellState",h,0,1)
			h := oItems:AddItem("Task 3")
			oItems:AddBar(h,"Task","08/04/2017","08/13/2017")
			oItems:SetProperty("CellState",h,0,1)
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","08/05/2017","08/16/2017")
			oItems:SetProperty("ItemBarEx","cellstate(0)",42/*exBarPattern*/,6)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1943:
How do I apply the same effort to all bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:HistogramView := 112/*exHistogramAllItems*/
			oChart:HistogramVisible := .T.
			oChart:HistogramHeight := 64
			oBar := oChart:Bars:Item("Task")
				oBar:HistogramPattern := 6/*exPatternBDiagonal*/
				oBar:HistogramType := 1/*exHistOverAllocation*/
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/06/2017")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","08/03/2017","08/09/2017")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","08/04/2017","08/13/2017")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","08/05/2017","08/16/2017")
			oItems:SetProperty("ItemBarEx",.T.,21/*exBarEffort*/,2)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1942:
How do I apply the same percent to all bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars():Add("Task%Progress")
				oBar:Shortcut := "Task"
				oBar:SetProperty("Def",14/*exBarShowPercentCaption*/,.T.)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/06/2017")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","08/03/2017","08/09/2017")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","08/04/2017","08/13/2017")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","08/05/2017","08/16/2017")
			oItems:SetProperty("ItemBarEx",.T.,12/*exBarPercent*/,0.5)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1941:
How can I set the same duration for all bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/06/2017")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","08/03/2017","08/09/2017")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","08/04/2017","08/13/2017")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","08/05/2017","08/16/2017")
			oItems:SetProperty("ItemBarEx",.T.,513/*exBarDuration*/,4)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1940:
How do I move all bars to end at the same date-time

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/06/2017")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","08/03/2017","08/09/2017")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","08/04/2017","08/13/2017")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","08/05/2017","08/16/2017")
			oItems:SetProperty("ItemBarEx",.T.,545/*exBarMoveEnd*/,"#8/15/2017#")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1939:
How do I move all bars to start at the same date-time

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/06/2017")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","08/03/2017","08/09/2017")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","08/04/2017","08/13/2017")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","08/05/2017","08/16/2017")
			oItems:SetProperty("ItemBarEx",.T.,544/*exBarMoveStart*/,"#8/2/2017#")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1938:
How do I apply a new color for some bars, while others should be shown with a different color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 3/*exOverlaidBarsStack*/
				oBar:OverlaidGroup := "Task,Task-Diff"
				oBar:SetProperty("Def",3/*exBarCaption*/,"<font ;6><%=%0%>")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
			oBar1 := oChart:Bars():CallMethod("Copy","Task","Task-Diff")
				oBar1:Height := 4
				oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oBar1:SetProperty("Def",3/*exBarCaption*/,"<font ;6><%=%0%>")
				oBar1:SetProperty("Def",4/*exBarHAlignCaption*/,16)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/06/2017")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","08/03/2017","08/09/2017")
			h := oItems:AddItem("Task 3")
			oItems:AddBar(h,"Task","08/04/2017","08/13/2017","")
			oItems:AddBar(h,"Task-Diff","08/05/2017","08/14/2017","P")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","08/05/2017","08/16/2017")
			oItems:SetProperty("ItemBarEx",.T.,33/*exBarColor*/,"cellcaption(0) like `*2` ? 0x0000FF : 0x00FF00")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1937:
How do I hide some bars, and show others

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:SingleSel := .F.
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
			oBar := oChart:Bars:Item("Task")
				oBar:OverlaidType := 3/*exOverlaidBarsStack*/
				oBar:OverlaidGroup := "Task,Task-Diff"
				oBar:SetProperty("Def",3/*exBarCaption*/,"<font ;6><%=%0%>")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
			oBar1 := oChart:Bars():CallMethod("Copy","Task","Task-Diff")
				oBar1:Height := 4
				oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oBar1:SetProperty("Def",3/*exBarCaption*/,"<font ;6><%=%0%>")
				oBar1:SetProperty("Def",4/*exBarHAlignCaption*/,16)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/06/2017")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","08/03/2017","08/09/2017")
			oItems:SetProperty("SelectItem",h,.T.)
			h := oItems:AddItem("Task 3")
			oItems:AddBar(h,"Task","08/04/2017","08/13/2017","")
			oItems:AddBar(h,"Task-Diff","08/05/2017","08/14/2017","P")
			oItems:SetProperty("SelectItem",h,.T.)
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","08/05/2017","08/16/2017")
			oItems:SetProperty("ItemBarEx","-1",19/*exBarTransparent*/,"itembar(0) = `Task` ? 0 : 100")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1936:
I like how ItemBarEx works, the question is how can I remove the bars based on the same criteria

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/06/2017")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","08/03/2017","08/09/2017")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","08/04/2017","08/13/2017")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","08/05/2017","08/16/2017")
			DevOut( "Bars before remove: " )
			DevOut( Transform(oItems:ItemBar(0,"<*>",256/*exBarsCount*/),"") )
			oItems:SetProperty("ItemBarEx","cellcaption(0) like `*2 *3`",9/*exBarKey*/,"`toberemove` + value ")
			oItems:RemoveBar(0,"<toberemove*>")
			DevOut( "Bars after remove: " )
			DevOut( Transform(oItems:ItemBar(0,"<*>",256/*exBarsCount*/),"") )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1935:
Is it possible to automatically color the bar being checked

PROCEDURE OnCellStateChanged(oG2antt,Item,ColIndex)

RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oColumn
	LOCAL oConditionalFormat
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:CellStateChanged := {|Item,ColIndex| OnCellStateChanged(oG2antt,Item,ColIndex)} /*Fired after cell's state has been changed.*/

		oG2antt:BeginUpdate()
		oG2antt:SelBackMode := 1/*exTransparent*/
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,256)
			oChart:FirstVisibleDate := "01/01/2017"
		oConditionalFormat := oG2antt:ConditionalFormats():Add("%CS0","check")
			oConditionalFormat:Bold := .T.
			oConditionalFormat:ApplyToBars := "Task"
			oConditionalFormat:SetProperty("BarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
		oColumn := oG2antt:Columns():Add("Items")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:Width := 256
		oG2antt:Columns():Add(oG2antt:ConditionalFormats:Item("check"):Expression()):FormatColumn := oG2antt:ConditionalFormats:Item("check"):Expression()
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2017","01/12/2017")
			h := oItems:AddItem("Item 2")
			oItems:AddBar(h,"Task","01/03/2017","01/13/2017")
			oItems:SetProperty("CellState",h,0,1)
			h := oItems:AddItem("Item 3")
			oItems:AddBar(h,"Task","01/04/2017","01/14/2017")
			oItems:SetProperty("CellState",h,0,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1934:
How do I automatically bold items being checked

PROCEDURE OnCellStateChanged(oG2antt,Item,ColIndex)

RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oConditionalFormat
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:CellStateChanged := {|Item,ColIndex| OnCellStateChanged(oG2antt,Item,ColIndex)} /*Fired after cell's state has been changed.*/

		oG2antt:BeginUpdate()
		oG2antt:SelBackMode := 1/*exTransparent*/
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oConditionalFormat := oG2antt:ConditionalFormats():Add("%CS0","check")
			oConditionalFormat:Bold := .T.
		oG2antt:Columns():Add("Items"):SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
		oG2antt:Columns():Add(oG2antt:ConditionalFormats:Item("check"):Expression()):FormatColumn := oG2antt:ConditionalFormats:Item("check"):Expression()
		oItems := oG2antt:Items()
			oItems:AddItem("Item 1")
			oItems:SetProperty("CellState",oItems:AddItem("Item 2"),0,1)
			oItems:AddItem("Item 3")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1933:
Can I display the radio-button with a solid color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:SetProperty("RadioImage",.F.,32699122)
		oG2antt:SetProperty("RadioImage",.T.,16777216)
		oG2antt:Columns():Add("Check"):SetProperty("Def",1/*exCellHasRadioButton*/,.T.)
		oItems := oG2antt:Items()
			oItems:AddItem("Radio 1")
			oItems:SetProperty("CellState",oItems:AddItem("Radio 2"),0,1)
			oItems:AddItem("Radio 1")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1932:
Can I display the check-box with a solid color

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:SetProperty("CheckImage",0/*Unchecked*/,32699122)
		oG2antt:SetProperty("CheckImage",1/*Checked*/,16777216)
		oG2antt:Columns():Add("Check"):SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
		oItems := oG2antt:Items()
			oItems:AddItem("Check 1")
			oItems:SetProperty("CellState",oItems:AddItem("Check 2"),0,1)
			oItems:AddItem("Check 3")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1931:
How can I use the CellState with ConditionalFormat/ComputedField/FormatColumn

PROCEDURE OnCellStateChanged(oG2antt,Item,ColIndex)

RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:CellStateChanged := {|Item,ColIndex| OnCellStateChanged(oG2antt,Item,ColIndex)} /*Fired after cell's state has been changed.*/

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := 4/*exGroupLinesInsideLeaf*/
		oG2antt:SelBackMode := 1/*exTransparent*/
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumn := oG2antt:Columns():Add("Items")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oColumn1 := oG2antt:Columns():Add("Format")
			oColumn1:FormatColumn := "%CS0"
			oColumn1:Caption := oColumn1:FormatColumn()
			oColumn1:SetProperty("Def",5/*exCellForeColor*/,8421504)
			oColumn1:SetProperty("Def",8/*exHeaderForeColor*/,oColumn1:Def(5/*exCellForeColor*/))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Item 1")
			oItems:SetProperty("CellState",oItems:InsertItem(h,,"Item 2"),0,1)
			oItems:SetProperty("CellState",oItems:InsertItem(h,,"Item 3"),0,1)
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1930:
How can I use the CellData with ConditionalFormat/ComputedField/FormatColumn

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:Columns():Add("Items")
		oColumn := oG2antt:Columns():Add("Format")
			oColumn:FormatColumn := "%CD0"
			oColumn:Caption := oColumn:FormatColumn()
			oColumn:SetProperty("Def",5/*exCellForeColor*/,8421504)
			oColumn:SetProperty("Def",8/*exHeaderForeColor*/,oColumn:Def(5/*exCellForeColor*/))
		oItems := oG2antt:Items()
			oItems:SetProperty("CellData",oItems:AddItem("Item 1"),0,1234)
			oItems:SetProperty("CellData",oItems:AddItem("Item 2"),0,"this is just an user data")
			oItems:SetProperty("CellData",oItems:AddItem("Item 3"),0,"01/01/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1929:
How can I use the CellValue/CellCaption with ConditionalFormat/ComputedField/FormatColumn

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn,oColumn1,oColumn2
	LOCAL oEditor
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumn := oG2antt:Columns():Add("Items")
			oEditor := oColumn:Editor()
				oEditor:EditType := 3/*DropDownListType*/
				oEditor:AddItem(1,"Item 1")
				oEditor:AddItem(2,"Item 2")
				oEditor:AddItem(3,"Item 3")
		oColumn1 := oG2antt:Columns():Add("Format")
			oColumn1:FormatColumn := "%0"
			oColumn1:Caption := oColumn1:FormatColumn()
			oColumn1:SetProperty("Def",5/*exCellForeColor*/,8421504)
			oColumn1:SetProperty("Def",8/*exHeaderForeColor*/,oColumn1:Def(5/*exCellForeColor*/))
			oColumn1:AllowSizing := .F.
		oColumn2 := oG2antt:Columns():Add("Format")
			oColumn2:FormatColumn := "%C0"
			oColumn2:Caption := oColumn2:FormatColumn()
			oColumn2:SetProperty("Def",5/*exCellForeColor*/,8421504)
			oColumn2:SetProperty("Def",8/*exHeaderForeColor*/,oColumn2:Def(5/*exCellForeColor*/))
			oColumn2:AllowSizing := .F.
		oItems := oG2antt:Items()
			oItems:AddItem(1)
			oItems:SetProperty("CellValue",oItems:AddItem(0),0,2)
			oItems:AddItem(2)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1928:
How can I use the ShowNonworkingHours property (hide the non-working hours)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oChart:UnitScale := 65536/*exHour*/
			oChart:NonworkingHours := 16253183
			oChart:ShowNonworkingHours := .F.
			oChart:ShowNonworkingUnits := .F.
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1927:
How can I use the ShowNonworkingDates property (hide the non-working days)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
			oChart:ShowNonworkingDates := .F.
			oChart:ShowNonworkingUnits := .F.
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1926:
How can I show/hide bars once the user checks or un-checks a column

PROCEDURE OnCellStateChanged(oG2antt,Item,ColIndex)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemBarEx",.T.,19/*exBarTransparent*/,"cellstate(0) = 1 ? 0 : 100")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:CellStateChanged := {|Item,ColIndex| OnCellStateChanged(oG2antt,Item,ColIndex)} /*Fired after cell's state has been changed.*/

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars:Item("Summary")
				oBar:StartShape := 0/*exShapeIconEmpty*/
				oBar:EndShape := 0/*exShapeIconEmpty*/
				oBar:Shape := 20/*exShapeThinDown*/
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(hChild,"Task","08/02/2017","08/08/2017")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(hChild,"Task","08/03/2017","08/10/2017")
			oItems:SetProperty("CellState",hChild,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(hChild,"Task","08/04/2017","08/12/2017")
			oItems:AddBar(h,"Summary","08/01/2017","08/01/2017","sum")
			oItems:DefineSummaryBars(h,"sum",-3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBarEx",.T.,19/*exBarTransparent*/,"cellstate(0) = 1 ? 0 : 100")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1925:
How can I change the color for all Task bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars:Item("Summary")
				oBar:StartShape := 0/*exShapeIconEmpty*/
				oBar:EndShape := 0/*exShapeIconEmpty*/
				oBar:Shape := 20/*exShapeThinDown*/
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(hChild,"Task","08/02/2017","08/08/2017")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(hChild,"Task","08/03/2017","08/10/2017")
			oItems:SetProperty("CellState",hChild,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(hChild,"Task","08/04/2017","08/12/2017")
			oItems:SetProperty("CellState",hChild,1)
			oItems:AddBar(h,"Summary","08/01/2017","08/01/2017","sum")
			oItems:DefineSummaryBars(h,"sum",-3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBarEx","itembar(0) = `Task`",33/*exBarColor*/,65280)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1924:
Is it possible to automatically select bars only when user selects a new item

PROCEDURE OnSelectionChanged(oG2antt)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemBarEx",.T.,257/*exBarSelected*/,"itemisselected")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:SelectionChanged := {|| OnSelectionChanged(oG2antt)} /*Fired after a new item has been selected.*/

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Columns():Add("Tasks")
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:AllowSelectObjects := 0/*exNoSelectObjects*/
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars:Item("Summary")
				oBar:StartShape := 0/*exShapeIconEmpty*/
				oBar:EndShape := 0/*exShapeIconEmpty*/
				oBar:Shape := 20/*exShapeThinDown*/
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(hChild,"Task","08/02/2017","08/08/2017")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(hChild,"Task","08/03/2017","08/10/2017")
			oItems:SetProperty("CellState",hChild,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(hChild,"Task","08/04/2017","08/12/2017")
			oItems:SetProperty("CellState",hChild,1)
			oItems:AddBar(h,"Summary","08/01/2017","08/01/2017","sum")
			oItems:DefineSummaryBars(h,"sum",-3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1923:
Is it possible to automatically select bars only when the user clicks the column's checkbox

PROCEDURE OnCellStateChanged(oG2antt,Item,ColIndex)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemBarEx",.T.,257/*exBarSelected*/,"cellstate(0) = 1")
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:CellStateChanged := {|Item,ColIndex| OnCellStateChanged(oG2antt,Item,ColIndex)} /*Fired after cell's state has been changed.*/

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:AllowSelectObjects := 0/*exNoSelectObjects*/
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars:Item("Summary")
				oBar:StartShape := 0/*exShapeIconEmpty*/
				oBar:EndShape := 0/*exShapeIconEmpty*/
				oBar:Shape := 20/*exShapeThinDown*/
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(hChild,"Task","08/02/2017","08/08/2017")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(hChild,"Task","08/03/2017","08/10/2017")
			oItems:SetProperty("CellState",hChild,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(hChild,"Task","08/04/2017","08/12/2017")
			oItems:SetProperty("CellState",hChild,1)
			oItems:AddBar(h,"Summary","08/01/2017","08/01/2017","sum")
			oItems:DefineSummaryBars(h,"sum",-3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1922:
How do I select all bars on leaf items

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars:Item("Summary")
				oBar:StartShape := 0/*exShapeIconEmpty*/
				oBar:EndShape := 0/*exShapeIconEmpty*/
				oBar:Shape := 20/*exShapeThinDown*/
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(hChild,"Task","08/02/2017","08/08/2017")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(hChild,"Task","08/03/2017","08/10/2017")
			oItems:SetProperty("CellState",hChild,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(hChild,"Task","08/04/2017","08/12/2017")
			oItems:SetProperty("CellState",hChild,1)
			oItems:AddBar(h,"Summary","08/01/2017","08/01/2017","sum")
			oItems:DefineSummaryBars(h,"sum",-3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBarEx","itemlevel = 1",257/*exBarSelected*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1921:
How can I change the caption for all checked Task bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars:Item("Summary")
				oBar:StartShape := 0/*exShapeIconEmpty*/
				oBar:EndShape := 0/*exShapeIconEmpty*/
				oBar:Shape := 20/*exShapeThinDown*/
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(hChild,"Task","08/02/2017","08/08/2017")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(hChild,"Task","08/03/2017","08/10/2017")
			oItems:SetProperty("CellState",hChild,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(hChild,"Task","08/04/2017","08/12/2017")
			oItems:SetProperty("CellState",hChild,1)
			oItems:AddBar(h,"Summary","08/01/2017","08/01/2017","sum")
			oItems:DefineSummaryBars(h,"sum",-3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBarEx","(cellstate(0) = 1) and (itembar(0) = `Task`)",3/*exBarCaption*/,"`new caption`")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1920:
How can I change the caption for all Task bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars:Item("Summary")
				oBar:StartShape := 0/*exShapeIconEmpty*/
				oBar:EndShape := 0/*exShapeIconEmpty*/
				oBar:Shape := 20/*exShapeThinDown*/
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(hChild,"Task","08/02/2017","08/08/2017")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(hChild,"Task","08/03/2017","08/10/2017")
			oItems:SetProperty("CellState",hChild,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(hChild,"Task","08/04/2017","08/12/2017")
			oItems:SetProperty("CellState",hChild,1)
			oItems:AddBar(h,"Summary","08/01/2017","08/01/2017","sum")
			oItems:DefineSummaryBars(h,"sum",-3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBarEx","(itembar(0) = `Task`)",3/*exBarCaption*/,"`new caption`")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1919:
How can I change the caption for all bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars:Item("Summary")
				oBar:StartShape := 0/*exShapeIconEmpty*/
				oBar:EndShape := 0/*exShapeIconEmpty*/
				oBar:Shape := 20/*exShapeThinDown*/
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(hChild,"Task","08/02/2017","08/08/2017")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(hChild,"Task","08/03/2017","08/10/2017")
			oItems:SetProperty("CellState",hChild,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(hChild,"Task","08/04/2017","08/12/2017")
			oItems:SetProperty("CellState",hChild,1)
			oItems:AddBar(h,"Summary","08/01/2017","08/01/2017","sum")
			oItems:DefineSummaryBars(h,"sum",-3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBarEx",.T.,3/*exBarCaption*/,"`new caption`")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1918:
How can I move all Task bars to end at the same date time

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars:Item("Summary")
				oBar:StartShape := 0/*exShapeIconEmpty*/
				oBar:EndShape := 0/*exShapeIconEmpty*/
				oBar:Shape := 20/*exShapeThinDown*/
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(hChild,"Task","08/02/2017","08/08/2017")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(hChild,"Task","08/03/2017","08/10/2017")
			oItems:SetProperty("CellState",hChild,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(hChild,"Task","08/04/2017","08/12/2017")
			oItems:SetProperty("CellState",hChild,1)
			oItems:AddBar(h,"Summary","08/01/2017","08/01/2017","sum")
			oItems:DefineSummaryBars(h,"sum",-3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBarEx","(itembar(0) = `Task`)",514/*exBarMove*/,"#8/14/2017# - itembar(2)")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1917:
How can I move all Task bars to start at the same date time

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars:Item("Summary")
				oBar:StartShape := 0/*exShapeIconEmpty*/
				oBar:EndShape := 0/*exShapeIconEmpty*/
				oBar:Shape := 20/*exShapeThinDown*/
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(hChild,"Task","08/02/2017","08/08/2017")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(hChild,"Task","08/03/2017","08/10/2017")
			oItems:SetProperty("CellState",hChild,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(hChild,"Task","08/04/2017","08/12/2017")
			oItems:SetProperty("CellState",hChild,1)
			oItems:AddBar(h,"Summary","08/01/2017","08/01/2017","sum")
			oItems:DefineSummaryBars(h,"sum",-3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBarEx","(itembar(0) = `Task`)",514/*exBarMove*/,"#8/3/2017# - itembar(1)")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1916:
How can I change the color for checked Task bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars:Item("Summary")
				oBar:StartShape := 0/*exShapeIconEmpty*/
				oBar:EndShape := 0/*exShapeIconEmpty*/
				oBar:Shape := 20/*exShapeThinDown*/
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(hChild,"Task","08/02/2017","08/08/2017")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(hChild,"Task","08/03/2017","08/10/2017")
			oItems:SetProperty("CellState",hChild,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(hChild,"Task","08/04/2017","08/12/2017")
			oItems:SetProperty("CellState",hChild,1)
			oItems:AddBar(h,"Summary","08/01/2017","08/01/2017","sum")
			oItems:DefineSummaryBars(h,"sum",-3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBarEx","cellstate(0) = 1 and itembar(0) = `Task`",33/*exBarColor*/,255)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1915:
How do I resize all Task bars programatically

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars:Item("Summary")
				oBar:StartShape := 0/*exShapeIconEmpty*/
				oBar:EndShape := 0/*exShapeIconEmpty*/
				oBar:Shape := 20/*exShapeThinDown*/
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(hChild,"Task","08/02/2017","08/08/2017")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(hChild,"Task","08/03/2017","08/10/2017")
			oItems:SetProperty("CellState",hChild,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(hChild,"Task","08/04/2017","08/12/2017")
			oItems:SetProperty("CellState",hChild,1)
			oItems:AddBar(h,"Summary","08/01/2017","08/01/2017","sum")
			oItems:DefineSummaryBars(h,"sum",-3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBarEx","itembar(0) = `Task`",2/*exBarEnd*/,"value + 2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1914:
How do I move just the checked Task bars in the chart

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars:Item("Summary")
				oBar:StartShape := 0/*exShapeIconEmpty*/
				oBar:EndShape := 0/*exShapeIconEmpty*/
				oBar:Shape := 20/*exShapeThinDown*/
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(hChild,"Task","08/02/2017","08/08/2017")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(hChild,"Task","08/03/2017","08/10/2017")
			oItems:SetProperty("CellState",hChild,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(hChild,"Task","08/04/2017","08/12/2017")
			oItems:SetProperty("CellState",hChild,1)
			oItems:AddBar(h,"Summary","08/01/2017","08/01/2017","sum")
			oItems:DefineSummaryBars(h,"sum",-3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBarEx","cellstate(0) = 1 and itembar(0) = `Task`",514/*exBarMove*/,-2)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1913:
How do I move all Task bars in the chart

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars:Item("Summary")
				oBar:StartShape := 0/*exShapeIconEmpty*/
				oBar:EndShape := 0/*exShapeIconEmpty*/
				oBar:Shape := 20/*exShapeThinDown*/
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(hChild,"Task","08/02/2017","08/08/2017")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(hChild,"Task","08/03/2017","08/10/2017")
			oItems:SetProperty("CellState",hChild,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(hChild,"Task","08/04/2017","08/12/2017")
			oItems:SetProperty("CellState",hChild,1)
			oItems:AddBar(h,"Summary","08/01/2017","08/01/2017","sum")
			oItems:DefineSummaryBars(h,"sum",-3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBarEx","itembar(0) = `Task`",514/*exBarMove*/,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1912:
How do I count all Task bars in the chart
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Columns():Add("Tasks")
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars:Item("Summary")
				oBar:StartShape := 0/*exShapeIconEmpty*/
				oBar:EndShape := 0/*exShapeIconEmpty*/
				oBar:Shape := 20/*exShapeThinDown*/
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(hChild,"Task","08/02/2017","08/08/2017")
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(hChild,"Task","08/03/2017","08/10/2017")
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(hChild,"Task","08/04/2017","08/12/2017")
			oItems:AddBar(h,"Summary","08/01/2017","08/01/2017","sum")
			oItems:DefineSummaryBars(h,"sum",-3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
			DevOut( Transform(oItems:ItemBarEx("itembar(0) = `Task`",256/*exBarsCount*/),"") )
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1911:
How do I select bars whose items are checked

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar
	LOCAL oChart
	LOCAL oColumn
	LOCAL oItems
	LOCAL h,hChild

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oBar := oChart:Bars:Item("Summary")
				oBar:StartShape := 0/*exShapeIconEmpty*/
				oBar:EndShape := 0/*exShapeIconEmpty*/
				oBar:Shape := 20/*exShapeThinDown*/
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:AddBar(hChild,"Task","08/02/2017","08/08/2017")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:AddBar(hChild,"Task","08/03/2017","08/10/2017")
			oItems:SetProperty("CellState",hChild,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:AddBar(hChild,"Task","08/04/2017","08/12/2017")
			oItems:SetProperty("CellState",hChild,1)
			oItems:AddBar(h,"Summary","08/01/2017","08/01/2017","sum")
			oItems:DefineSummaryBars(h,"sum",-3,"")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("ItemBarEx","cellstate(0) = 1",257/*exBarSelected*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1910:
How can I select all bars, where a specified column matches a specified criteria

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():SetProperty("PaneWidth",.F.,48)
		oG2antt:Chart():SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K1","K1")
			oItems:AddBar(h,"Task","01/05/2001","01/07/2001","K2","K2")
			oItems:AddBar(h,"Task","01/08/2001","01/10/2001","P","P")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/04/2001","Q","Q")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","01/02/2001","01/04/2001","M","M")
			oItems:SetProperty("ItemBarEx","cellcaption(0) = `Task 1`",257/*exBarSelected*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1909:
How can I select/unselect all bars

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Task")
		oG2antt:Chart():FirstVisibleDate := "01/01/2001"
		oG2antt:Chart():SetProperty("PaneWidth",.F.,48)
		oG2antt:Chart():SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K1","K1")
			oItems:AddBar(h,"Task","01/05/2001","01/07/2001","K2","K2")
			oItems:AddBar(h,"Task","01/08/2001","01/10/2001","P","P")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","01/02/2001","01/04/2001","Q","Q")
			oItems:AddBar(oItems:AddItem("Task 4"),"Task","01/02/2001","01/04/2001","M","M")
			oItems:SetProperty("ItemBarEx",.T.,257/*exBarSelected*/,.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1908:
Is it possible to set the background color of the chart for one item and one day
#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Items")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:FirstVisibleDate := "01/01/2001"
		oItems := oG2antt:Items()
			oItems:AddItem("Item")
			h := oItems:AddItem("Item")
			oItems:AddBar(h,"","01/02/2001","01/03/2001","Back"," ")
			oItems:SetProperty("ItemBar",h,"Back",7/*exBarBackColor*/,255)
			oItems:SetProperty("ItemBar",h,"Back",29/*exBarSelectable*/,.F.)
			oItems:AddItem("Item")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1907:
It is possible to search for an item ( inside the Editor ), case insensitive

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oEditor
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oEditor := oG2antt:Columns():Add("DropDownList"):Editor()
			oEditor:EditType := 3/*DropDownListType*/
			oEditor:AddItem(1,"One")
			oEditor:AddItem(2,"Two")
			oEditor:AddItem(3,"Three")
		oItems := oG2antt:Items()
			oItems:AddItem(oG2antt:Columns:Item(0):Editor():FindItem(">ONE"))
			oItems:AddItem(oG2antt:Columns:Item(0):Editor():FindItem(">ThRee"))
			oItems:AddItem(oG2antt:Columns:Item(0):Editor():FindItem("ONE"))
			oItems:AddItem(oG2antt:Columns:Item(0):Editor():FindItem(">tWo"))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1906:
The text after the BR-tag is in same line as the text before the BR-tag (entire column)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DrawGridLines := 1/*exHLines*/
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oColumn := oG2antt:Columns():Add("Default")
			oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
			oColumn:SetProperty("Def",16/*exCellSingleLine*/,.F.)
		oItems := oG2antt:Items()
			oItems:AddItem("This is the first line.<br>This is the second line.")
			oItems:AddItem("This is the first line.<br>This is the second line.")
			oItems:AddItem("This is the first line.<br>This is the second line.")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1905:
The text after the BR-tag is in same line as the text before the BR-tag (individual)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oItems
	LOCAL h

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DrawGridLines := 1/*exHLines*/
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:Columns():Add("Default")
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValueFormat",oItems:AddItem("This is the first line.<br>This is the second line."),0,1/*exHTML*/)
			h := oItems:AddItem("<b>This is the first line.<br>This is the second line.</b>")
			oItems:SetProperty("CellValueFormat",h,0,1/*exHTML*/)
			oItems:SetProperty("CellSingleLine",h,0,.F.)
			oItems:SetProperty("CellValueFormat",oItems:AddItem("This is the first line.<br>This is the second line."),0,1/*exHTML*/)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1904:
How do I prevent showing the control's BackColorAlternate property on empty / non-items part of the control

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart
	LOCAL oItems

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oChart := oG2antt:Chart()
			oChart:DrawGridLines := -1/*exAllLines*/
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:FirstVisibleDate := "01/01/2001"
		oG2antt:SetProperty("BackColorAlternate",0x7ff0f0f0)
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/12/2001")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","01/03/2001","01/13/2001")
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","01/02/2001","01/12/2001")
			oItems:AddBar(oItems:AddItem("Item 4"),"Task","01/03/2001","01/13/2001")
			oItems:AddBar(oItems:AddItem("Item 5"),"Task","01/02/2001","01/12/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1903:
Can I disable an item once the user selects a new value into a different item

PROCEDURE OnChange(oG2antt,Item,ColIndex,NewValue)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("EnableItem",oItems:ItemByIndex(1),.F.)
RETURN

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oEditor
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:Change := {|Item,ColIndex,NewValue| OnChange(oG2antt,Item,ColIndex,NewValue)} /*Occurs when the user changes the cell's content.*/

		oG2antt:FreezeEvents(.T.)
		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oG2antt:Columns():Add("Q")
		oG2antt:Columns():Add("A")
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("What's your gender?")
			oEditor := oItems:CellEditor(h1,1)
				oEditor:EditType := 3/*DropDownListType*/
				oEditor:AddItem(1,"Male")
				oEditor:AddItem(0,"Female")
			oItems:SetProperty("CellValue",h1,1,1)
			h2 := oItems:AddItem("What's pet name?")
			oItems:SetProperty("CellValue",h2,1,"This is my pet favorite long long long name, that shoul break the line in multiple pieces")
			oItems:SetProperty("CellSingleLine",h2,1,.F.)
		oG2antt:EndUpdate()
		oG2antt:FreezeEvents(.F.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1902:
How can I get a row expanded / enlarged to fit the cell's text (entire column)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oColumn
	LOCAL oEditor
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oG2antt:Columns():Add("Q")
		oColumn := oG2antt:Columns():Add("A")
			oColumn:SetProperty("Def",16/*exCellSingleLine*/,.F.)
			oEditor := oColumn:Editor()
				oEditor:EditType := 5/*MemoType*/
				oEditor:Appearance := 8/*SingleApp*/
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("What's name?")
			oItems:SetProperty("CellValue",h1,1,"This is my pet favorite long long long name, that shoul break the line in multiple pieces")
			h2 := oItems:AddItem("What's your pet name?")
			oItems:SetProperty("CellValue",h2,1,"This is my pet favorite long long long name, that shoul break the line in multiple pieces")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1901:
How can I get a row expanded / enlarged to fit the cell's text (individual cell)

#include "AppEvent.ch"
#include "ActiveX.ch"

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oEditor
	LOCAL oItems
	LOCAL h1,h2

	oForm := XbpDialog():new( AppDesktop() )
	oForm:drawingArea:clipChildren := .T.
	oForm:create( ,,{100,100}, {640,480},, .F. )
	oForm:close  := {|| PostAppEvent( xbeP_Quit )}

	oG2antt := XbpActiveXControl():new( oForm:drawingArea )
	oG2antt:CLSID  := "Exontrol.G2antt.1" /*{CD481F4D-2D25-4759-803F-752C568F53B7}*/
	oG2antt:create(,, {10,60},{610,370} )

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oG2antt:Columns():Add("Q")
		oG2antt:Columns():Add("A")
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("What's name?")
			oItems:SetProperty("CellValue",h1,1,"This is my pet favorite long long long name, that shoul break the line in multiple pieces")
			h2 := oItems:AddItem("What's your pet name?")
			oEditor := oItems:CellEditor(h2,1)
				oEditor:EditType := 5/*MemoType*/
				oEditor:Appearance := 8/*SingleApp*/
			oItems:SetProperty("CellValue",h2,1,"This is my pet favorite long long long name, that shoul break the line in multiple pieces")
			oItems:SetProperty("CellSingleLine",h2,1,.F.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN