2027:
How can I add a summary bar once the user group by a column

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	LOCAL l
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemDividerLine",Item,0/*EmptyLine*/)
		oItems:AddBar(Item,"Summary","12/02/2017","12/02/2017")
		oItems:DefineSummaryBars(Item,"",-3,"")
		l := oItems:GroupItem(Item)
		oItems:SetProperty("CellSingleLine",Item,l,.F.)
		oItems:SetProperty("CellBold",Item,l,.T.)
		oItems:SetProperty("ItemBackColor",Item,AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
	oG2antt:Chart():SetProperty("ItemBackColor",Item,AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
RETURN

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/10/2017")
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
	LOCAL oColumns
	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:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oG2antt:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABOUGACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADCMQwAFBIbhrE4ZBjHGQRUgyI43RhHUBzVIUBxDEaTZLlEYJBgeHYhDJPcaUVDcWQHGyeZwjSgpKoWSJIU5NcggPDgEwTKCmKlTAKoSzJMyEmwWRAdVTZLSEaxierKPhyWT/XgAF4PfDFKRXFqXY5mKZJFqKOI8TxINgxPQMGyrBqraLqKwQGrGCQKSBhUZ3dS2JR3OSlYRuQAMVgOXoDZhPWZXbDtSzPE63NgtOR5DiGWalABoeoxRa9cz3ViCJSrGTqIoINIzZLHFQbPpdAYdP6BeIjXhhZxBBuLZXmEOh9CcNoni2N4MjWVodh+DpfBeLJinsWR9AyYwVAkGBhEAFphGiRogDEGBamkFgtjcZgHiMbgehYaQhAIEIREAaQYkcQZUHIGRUGQDBOEaBAhDYDxGkMZAkCg" +;
		"eoagYZAYEYAYIAWGhemICIFj8WIiCiFR5gkIhogmBoKGKJx2C6C5hniMgggqYwog0UoNGMZJiDiCZRgOLY0ECUAQICA==")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,342)
			oBar := oChart:Bars:Item("Summary")
				oBar:StartShape := 0/*exShapeIconEmpty*/
				oBar:EndShape := 0/*exShapeIconEmpty*/
				oBar:Shape := 1/*exShapeSolid*/
				oBar:SetProperty("Color",0x1000000)
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%513%>")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
		oColumns := oG2antt:Columns()
			oColumns:Add("C1")
			oColumns:Add("C2")
			oColumns:Add("C3")
			oColumn := oColumns:Add("Pos")
				oColumn:FormatColumn := "1 pos ``"
				oColumn:AllowGroupBy := .F.
				oColumn:Position := 0
				oColumn:Width := 48
				oColumn:AllowSizing := .F.
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oG2antt:AllowGroupBy := .T.
		oG2antt:HasLines := 0/*exNoLine*/
		oG2antt:LinesAtRoot := 0/*exNoLinesAtRoot*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellValue",h,1,"SubItem B.1")
			oItems:SetProperty("CellValue",h,2,"SubItem B.2")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellValue",h,1,"SubItem B.1")
			oItems:SetProperty("CellValue",h,2,"SubItem B.2")
		oColumn1 := oG2antt:Columns:Item(0)
			oColumn1:SortOrder := 1/*SortAscending*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2026:
Is it possible to display no +/- button for grouped items

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	LOCAL l
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemDividerLine",Item,0/*EmptyLine*/)
		oItems:AddBar(Item,"Progress","12/02/2017","12/02/2017")
		oItems:DefineSummaryBars(Item,"",-3,"")
		l := oItems:GroupItem(Item)
		oItems:SetProperty("CellSingleLine",Item,l,.F.)
		oItems:SetProperty("CellBold",Item,l,.T.)
		oItems:SetProperty("ItemBackColor",Item,AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
	oG2antt:Chart():SetProperty("ItemBackColor",Item,AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
RETURN

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/10/2017")
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,oColumn1
	LOCAL oColumns
	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:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,342)
		oColumns := oG2antt:Columns()
			oColumns:Add("C1")
			oColumns:Add("C2")
			oColumns:Add("C3")
			oColumn := oColumns:Add("Pos")
				oColumn:FormatColumn := "1 pos ``"
				oColumn:AllowGroupBy := .F.
				oColumn:Position := 0
				oColumn:Width := 48
				oColumn:AllowSizing := .F.
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oG2antt:AllowGroupBy := .T.
		oG2antt:HasLines := 0/*exNoLine*/
		oG2antt:LinesAtRoot := 0/*exNoLinesAtRoot*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellValue",h,1,"SubItem B.1")
			oItems:SetProperty("CellValue",h,2,"SubItem B.2")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellValue",h,1,"SubItem B.1")
			oItems:SetProperty("CellValue",h,2,"SubItem B.2")
		oColumn1 := oG2antt:Columns:Item(0)
			oColumn1:SortOrder := 1/*SortAscending*/
			oColumn1:Alignment := 1/*CenterAlignment*/
			oColumn1:SetProperty("Def",4/*exCellBackColor*/,15790320)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2025:
How can I change the label, caption or the formula of the grouped items

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:AddBar(Item,"Progress","12/02/2017","12/02/2017")
		oItems:DefineSummaryBars(Item,"",-3,"")
RETURN

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/10/2017")
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,oColumn1
	LOCAL oColumns
	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:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,342)
		oColumns := oG2antt:Columns()
			oColumn := oColumns:Add("C1")
				oColumn:GroupByFormatCell := "upper(value)"
			oColumns:Add("C2")
			oColumns:Add("C3")
			oColumn1 := oColumns:Add("Pos")
				oColumn1:FormatColumn := "1 pos ``"
				oColumn1:AllowGroupBy := .F.
				oColumn1:Position := 0
				oColumn1:Width := 48
				oColumn1:AllowSizing := .F.
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oG2antt:AllowGroupBy := .T.
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellValue",h,1,"SubItem B.1")
			oItems:SetProperty("CellValue",h,2,"SubItem B.2")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellValue",h,1,"SubItem B.1")
			oItems:SetProperty("CellValue",h,2,"SubItem B.2")
		oG2antt:Columns:Item(0):SortOrder := 1/*SortAscending*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2024:
How can I change the aspect of grouped items

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	LOCAL l
	oItems := oG2antt:Items()
		oItems:SetProperty("ItemDividerLine",Item,0/*EmptyLine*/)
		oItems:AddBar(Item,"Progress","12/02/2017","12/02/2017")
		oItems:DefineSummaryBars(Item,"",-3,"")
		l := oItems:GroupItem(Item)
		oItems:SetProperty("CellSingleLine",Item,l,.F.)
		oItems:SetProperty("CellBold",Item,l,.T.)
		oItems:SetProperty("ItemBackColor",Item,AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
	oG2antt:Chart():SetProperty("ItemBackColor",Item,AutomationTranslateColor( GraMakeRGBColor  ( { 190,190,190 } )  , .F. ))
RETURN

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/10/2017")
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 oColumns
	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:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,342)
		oColumns := oG2antt:Columns()
			oColumns:Add("C1")
			oColumns:Add("C2")
			oColumns:Add("C3")
			oColumn := oColumns:Add("Pos")
				oColumn:FormatColumn := "1 pos ``"
				oColumn:AllowGroupBy := .F.
				oColumn:Position := 0
				oColumn:Width := 48
				oColumn:AllowSizing := .F.
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oG2antt:AllowGroupBy := .T.
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellValue",h,1,"SubItem B.1")
			oItems:SetProperty("CellValue",h,2,"SubItem B.2")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellValue",h,1,"SubItem B.1")
			oItems:SetProperty("CellValue",h,2,"SubItem B.2")
		oG2antt:Columns:Item(0):SortOrder := 1/*SortAscending*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2023:
How can I collapse all items when the user performs a grouping

PROCEDURE OnAddGroupItem(oG2antt,Item)
	LOCAL oItems
	oItems := oG2antt:Items()
		oItems:SetProperty("ExpandItem",Item,.F.)
		oItems:SetProperty("ItemDividerLine",Item,0/*EmptyLine*/)
		oItems:AddBar(Item,"Progress","12/02/2017","12/02/2017")
		oItems:DefineSummaryBars(Item,"",-3,"")
RETURN

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/10/2017")
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 oColumns
	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:AddGroupItem := {|Item| OnAddGroupItem(oG2antt,Item)} /*Occurs after a new Group Item has been inserted to Items collection.*/
		oG2antt:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,342)
		oColumns := oG2antt:Columns()
			oColumns:Add("C1")
			oColumns:Add("C2")
			oColumns:Add("C3")
			oColumn := oColumns:Add("Pos")
				oColumn:FormatColumn := "1 pos ``"
				oColumn:AllowGroupBy := .F.
				oColumn:Position := 0
				oColumn:Width := 48
				oColumn:AllowSizing := .F.
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "Drag a <b>column</b> header here to group by that column."
		oG2antt:AllowGroupBy := .T.
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellValue",h,1,"SubItem B.1")
			oItems:SetProperty("CellValue",h,2,"SubItem B.2")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellValue",h,1,"SubItem B.1")
			oItems:SetProperty("CellValue",h,2,"SubItem B.2")
		oG2antt:Columns:Item(0):SortOrder := 1/*SortAscending*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2022:
Is it possible to select columns that user can drop to the sort bar, when using the Group By feature

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/10/2017")
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 oColumns
	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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,342)
		oColumns := oG2antt:Columns()
			oColumns:Add("C1")
			oColumns:Add("C2")
			oColumns:Add("C3")
			oColumn := oColumns:Add("Pos")
				oColumn:FormatColumn := "1 pos ``"
				oColumn:AllowGroupBy := .F.
				oColumn:Position := 0
				oColumn:Width := 48
				oColumn:AllowSizing := .F.
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "<fgcolor=FF0000>Try to drag the Pos column here."
		oG2antt:AllowGroupBy := .T.
		oItems := oG2antt:Items()
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item A")
			oItems:SetProperty("CellValue",h,1,"SubItem A.1")
			oItems:SetProperty("CellValue",h,2,"SubItem A.2")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellValue",h,1,"SubItem B.1")
			oItems:SetProperty("CellValue",h,2,"SubItem B.2")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellValue",h,1,"SubItem B.1")
			oItems:SetProperty("CellValue",h,2,"SubItem B.2")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2021:
How can I filter for the type of the bars I have in my chart

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oBar,oBar1,oBar2
	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()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "11/28/2017"
			oChart:SetProperty("PaneWidth",.F.,0)
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%0%>")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
			oBar1 := oChart:Bars():CallMethod("Copy","Task","GTask")
				oBar1:SetProperty("Def",3/*exBarCaption*/,"<%=%0%>")
				oBar1:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar1:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
			oBar2 := oChart:Bars():CallMethod("Copy","Task","RTask")
				oBar2:SetProperty("Def",3/*exBarCaption*/,"<%=%0%>")
				oBar2:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar2:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			oChart:ColumnsFormatLevel := "0"
		oG2antt:OnResizeControl := 129/*exDisableSplitter+exResizeChart*/
		oColumn := oG2antt:Columns():Add("Default")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn1 := oG2antt:Columns():Add("Type")
			oColumn1:SetProperty("Def",19/*exCellValueToItemBarKey*/,"")
			oColumn1:SetProperty("Def",18/*exCellValueToItemBarProperty*/,0)
			oColumn1:Visible := .F.
			oColumn1:DisplayFilterButton := .T.
			oColumn1:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","12/04/2017","12/12/2017")
			oItems:AddBar(oItems:AddItem("Item 2"),"GTask","12/04/2017","12/12/2017")
			oItems:AddBar(oItems:AddItem("Item 3"),"RTask","12/04/2017","12/12/2017")
			oItems:AddBar(oItems:AddItem("Item 4"),"Task","12/04/2017","12/12/2017")
			oItems:AddBar(oItems:AddItem("Item 5"),"GTask","12/04/2017","12/12/2017")
			oItems:AddBar(oItems:AddItem("Item 6"),"RTask","12/04/2017","12/12/2017")
		oG2antt:FilterBarFont := oG2antt:Font()
		oG2antt:SetProperty("Description",11/*exFilterBarAnd*/,Transform(oG2antt:FormatABC("`<fgcolor=808080> ` + value + ` </fgcolor>`",oG2antt:Description(11/*exFilterBarAnd*/)),""))
		oG2antt:FilterBarCaption := "(( ( all replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace `[<s>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` )  + `<r><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcount + ` item(s)`) )))"
		oG2antt:FilterBarPromptVisible := 2579/*exFilterBarCompact+exFilterBarShowCloseIfRequired+exFilterBarSingleLine+exFilterBarVisible+exFilterBarPromptVisible*/
		oColumn2 := oG2antt:Columns:Item(1)
			oColumn2:FilterType := 240/*exFilter*/
			oColumn2:Filter := "GTask|RTask"
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2020:
How can I display the control's filter bar in the Items section only, as it was displayed before

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,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()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oColumn := oG2antt:Columns():Add("Col-1")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn1 := oG2antt:Columns():Add("Col-2")
			oColumn1:DisplayFilterButton := .T.
			oColumn1:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn2 := oG2antt:Columns():Add("Pos")
			oColumn2:AllowSizing := .F.
			oColumn2:AllowSort := .F.
			oColumn2:Width := 32
			oColumn2:FormatColumn := "1 apos ``"
			oColumn2:Position := 0
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("Item A"),1,"Sub-Item A")
			oItems:SetProperty("CellValue",oItems:AddItem("Item B"),1,"Sub-Item B")
			oItems:SetProperty("CellValue",oItems:AddItem("Item C"),1,"Sub-Item C")
		oG2antt:FilterBarPromptVisible := 4096/*exFilterBarShort*/
		oColumn3 := oG2antt:Columns:Item(1)
			oColumn3:FilterType := 3/*exPattern*/
			oColumn3:Filter := "*B"
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2019:
FilterBarCaption ALL Keyword ( sample 2, result )

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL i
	i := oG2antt:FormatABC("value + 1",oG2antt:Items:ItemToIndex(Item))
	oG2antt:Items():SetProperty("CellImage",Item,3,i)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,oColumn1,oColumn2,oColumn3,oColumn4,oColumn5
	LOCAL oEditor
	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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oColumn := oG2antt:Columns():Add("Col-1")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn1 := oG2antt:Columns():Add("Col-2")
			oColumn1:DisplayFilterButton := .T.
			oColumn1:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn2 := oG2antt:Columns():Add("Check")
			oEditor := oColumn2:Editor()
				oEditor:EditType := 19/*CheckValueType*/
				oEditor:SetProperty("Option",17/*exCheckValue2*/,1)
			oColumn2:DisplayFilterButton := .T.
			oColumn2:DisplayFilterPattern := .F.
			oColumn2:FilterType := 6/*exCheck*/
		oColumn3 := oG2antt:Columns():Add("Image")
			oColumn3:DisplayFilterButton := .T.
			oColumn3:FilterType := 10/*exImage*/
			oColumn3:FilterList := 9472/*exShowExclude+exShowFocusItem+exShowCheckBox*/
		oColumn4 := oG2antt:Columns():Add("Pos")
			oColumn4:AllowSizing := .F.
			oColumn4:AllowSort := .F.
			oColumn4:Width := 32
			oColumn4:FormatColumn := "1 apos ``"
			oColumn4:Position := 0
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("Item A"),1,"Sub-Item A")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellValue",h,1,"Sub-Item B")
			oItems:SetProperty("CellState",h,2,1)
			oItems:SetProperty("CellValue",oItems:AddItem("Item C"),1,"Sub-Item C")
		oG2antt:FilterBarFont := oG2antt:Font()
		oG2antt:SetProperty("Description",11/*exFilterBarAnd*/,Transform(oG2antt:FormatABC("`<fgcolor=808080> ` + value + ` </fgcolor>`",oG2antt:Description(11/*exFilterBarAnd*/)),""))
		oG2antt:FilterBarCaption := "(( ( all replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace `[<s>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` )  + `<r><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcount + ` item(s)`) )))"
		oG2antt:FilterBarPromptVisible := 3/*exFilterBarVisible+exFilterBarPromptVisible*/
		oColumn5 := oG2antt:Columns:Item(0)
			oColumn5:FilterType := 240/*exFilter*/
			oColumn5:Filter := "Item A|Item B"
		oG2antt:Columns:Item(2):Filter := Transform(1,"")
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2018:
FilterBarCaption ALL Keyword ( sample 1 )

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL i
	i := oG2antt:FormatABC("value + 1",oG2antt:Items:ItemToIndex(Item))
	oG2antt:Items():SetProperty("CellImage",Item,3,i)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,oColumn1,oColumn2,oColumn3,oColumn4,oColumn5
	LOCAL oEditor
	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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oColumn := oG2antt:Columns():Add("Col-1")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn1 := oG2antt:Columns():Add("Col-2")
			oColumn1:DisplayFilterButton := .T.
			oColumn1:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn2 := oG2antt:Columns():Add("Check")
			oEditor := oColumn2:Editor()
				oEditor:EditType := 19/*CheckValueType*/
				oEditor:SetProperty("Option",17/*exCheckValue2*/,1)
			oColumn2:DisplayFilterButton := .T.
			oColumn2:DisplayFilterPattern := .F.
			oColumn2:FilterType := 6/*exCheck*/
		oColumn3 := oG2antt:Columns():Add("Image")
			oColumn3:DisplayFilterButton := .T.
			oColumn3:FilterType := 10/*exImage*/
			oColumn3:FilterList := 9472/*exShowExclude+exShowFocusItem+exShowCheckBox*/
		oColumn4 := oG2antt:Columns():Add("Pos")
			oColumn4:AllowSizing := .F.
			oColumn4:AllowSort := .F.
			oColumn4:Width := 32
			oColumn4:FormatColumn := "1 apos ``"
			oColumn4:Position := 0
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("Item A"),1,"Sub-Item A")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellValue",h,1,"Sub-Item B")
			oItems:SetProperty("CellState",h,2,1)
			oItems:SetProperty("CellValue",oItems:AddItem("Item C"),1,"Sub-Item C")
		oG2antt:FilterBarFont := oG2antt:Font()
		oG2antt:SetProperty("Description",11/*exFilterBarAnd*/,Transform(oG2antt:FormatABC("`<fgcolor=808080> ` + value + ` </fgcolor>`",oG2antt:Description(11/*exFilterBarAnd*/)),""))
		oG2antt:FilterBarCaption := "all"
		oG2antt:FilterBarPromptVisible := 3/*exFilterBarVisible+exFilterBarPromptVisible*/
		oColumn5 := oG2antt:Columns:Item(0)
			oColumn5:FilterType := 240/*exFilter*/
			oColumn5:Filter := "Item A|Item B"
		oG2antt:Columns:Item(2):Filter := Transform(1,"")
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2017:
FilterBarCaption ALLUI Keyword ( sample 2, result )

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL i
	i := oG2antt:FormatABC("value + 1",oG2antt:Items:ItemToIndex(Item))
	oG2antt:Items():SetProperty("CellImage",Item,3,i)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,oColumn1,oColumn2,oColumn3,oColumn4,oColumn5
	LOCAL oEditor
	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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oColumn := oG2antt:Columns():Add("Col-1")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn1 := oG2antt:Columns():Add("Col-2")
			oColumn1:DisplayFilterButton := .T.
			oColumn1:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn2 := oG2antt:Columns():Add("Check")
			oEditor := oColumn2:Editor()
				oEditor:EditType := 19/*CheckValueType*/
				oEditor:SetProperty("Option",17/*exCheckValue2*/,1)
			oColumn2:DisplayFilterButton := .T.
			oColumn2:DisplayFilterPattern := .F.
			oColumn2:FilterType := 6/*exCheck*/
		oColumn3 := oG2antt:Columns():Add("Image")
			oColumn3:DisplayFilterButton := .T.
			oColumn3:FilterType := 10/*exImage*/
			oColumn3:FilterList := 9472/*exShowExclude+exShowFocusItem+exShowCheckBox*/
		oColumn4 := oG2antt:Columns():Add("Pos")
			oColumn4:AllowSizing := .F.
			oColumn4:AllowSort := .F.
			oColumn4:Width := 32
			oColumn4:FormatColumn := "1 apos ``"
			oColumn4:Position := 0
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("Item A"),1,"Sub-Item A")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellValue",h,1,"Sub-Item B")
			oItems:SetProperty("CellState",h,2,1)
			oItems:SetProperty("CellValue",oItems:AddItem("Item C"),1,"Sub-Item C")
		oG2antt:FilterBarFont := oG2antt:Font()
		oG2antt:SetProperty("Description",11/*exFilterBarAnd*/,Transform(oG2antt:FormatABC("`<fgcolor=808080> ` + value + ` </fgcolor>`",oG2antt:Description(11/*exFilterBarAnd*/)),""))
		oG2antt:FilterBarCaption := "(( ( allui replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace `[<s>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` )  + `<r><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcount + ` item(s)`) )))"
		oG2antt:FilterBarPromptVisible := 3/*exFilterBarVisible+exFilterBarPromptVisible*/
		oColumn5 := oG2antt:Columns:Item(0)
			oColumn5:FilterType := 240/*exFilter*/
			oColumn5:Filter := "Item A|Item B"
		oG2antt:Columns:Item(2):Filter := Transform(1,"")
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2016:
FilterBarCaption ALLUI Keyword ( sample 1 )

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL i
	i := oG2antt:FormatABC("value + 1",oG2antt:Items:ItemToIndex(Item))
	oG2antt:Items():SetProperty("CellImage",Item,3,i)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,oColumn1,oColumn2,oColumn3,oColumn4,oColumn5
	LOCAL oEditor
	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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oColumn := oG2antt:Columns():Add("Col-1")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn1 := oG2antt:Columns():Add("Col-2")
			oColumn1:DisplayFilterButton := .T.
			oColumn1:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn2 := oG2antt:Columns():Add("Check")
			oEditor := oColumn2:Editor()
				oEditor:EditType := 19/*CheckValueType*/
				oEditor:SetProperty("Option",17/*exCheckValue2*/,1)
			oColumn2:DisplayFilterButton := .T.
			oColumn2:DisplayFilterPattern := .F.
			oColumn2:FilterType := 6/*exCheck*/
		oColumn3 := oG2antt:Columns():Add("Image")
			oColumn3:DisplayFilterButton := .T.
			oColumn3:FilterType := 10/*exImage*/
			oColumn3:FilterList := 9472/*exShowExclude+exShowFocusItem+exShowCheckBox*/
		oColumn4 := oG2antt:Columns():Add("Pos")
			oColumn4:AllowSizing := .F.
			oColumn4:AllowSort := .F.
			oColumn4:Width := 32
			oColumn4:FormatColumn := "1 apos ``"
			oColumn4:Position := 0
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("Item A"),1,"Sub-Item A")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellValue",h,1,"Sub-Item B")
			oItems:SetProperty("CellState",h,2,1)
			oItems:SetProperty("CellValue",oItems:AddItem("Item C"),1,"Sub-Item C")
		oG2antt:FilterBarFont := oG2antt:Font()
		oG2antt:SetProperty("Description",11/*exFilterBarAnd*/,Transform(oG2antt:FormatABC("`<fgcolor=808080> ` + value + ` </fgcolor>`",oG2antt:Description(11/*exFilterBarAnd*/)),""))
		oG2antt:FilterBarCaption := "allui"
		oG2antt:FilterBarPromptVisible := 3/*exFilterBarVisible+exFilterBarPromptVisible*/
		oColumn5 := oG2antt:Columns:Item(0)
			oColumn5:FilterType := 240/*exFilter*/
			oColumn5:Filter := "Item A|Item B"
		oG2antt:Columns:Item(2):Filter := Transform(1,"")
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2015:
FilterBarCaption AVAILABLE Keyword ( sample 2, result )

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL i
	i := oG2antt:FormatABC("value + 1",oG2antt:Items:ItemToIndex(Item))
	oG2antt:Items():SetProperty("CellImage",Item,3,i)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,oColumn1,oColumn2,oColumn3,oColumn4,oColumn5
	LOCAL oEditor
	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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oColumn := oG2antt:Columns():Add("Col-1")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn1 := oG2antt:Columns():Add("Col-2")
			oColumn1:DisplayFilterButton := .T.
			oColumn1:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn2 := oG2antt:Columns():Add("Check")
			oEditor := oColumn2:Editor()
				oEditor:EditType := 19/*CheckValueType*/
				oEditor:SetProperty("Option",17/*exCheckValue2*/,1)
			oColumn2:DisplayFilterButton := .T.
			oColumn2:DisplayFilterPattern := .F.
			oColumn2:FilterType := 6/*exCheck*/
		oColumn3 := oG2antt:Columns():Add("Image")
			oColumn3:DisplayFilterButton := .T.
			oColumn3:FilterType := 10/*exImage*/
			oColumn3:FilterList := 9472/*exShowExclude+exShowFocusItem+exShowCheckBox*/
		oColumn4 := oG2antt:Columns():Add("Pos")
			oColumn4:AllowSizing := .F.
			oColumn4:AllowSort := .F.
			oColumn4:Width := 32
			oColumn4:FormatColumn := "1 apos ``"
			oColumn4:Position := 0
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("Item A"),1,"Sub-Item A")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellValue",h,1,"Sub-Item B")
			oItems:SetProperty("CellState",h,2,1)
			oItems:SetProperty("CellValue",oItems:AddItem("Item C"),1,"Sub-Item C")
		oG2antt:FilterBarFont := oG2antt:Font()
		oG2antt:SetProperty("Description",11/*exFilterBarAnd*/,Transform(oG2antt:FormatABC("`<fgcolor=808080> ` + value + ` </fgcolor>`",oG2antt:Description(11/*exFilterBarAnd*/)),""))
		oG2antt:FilterBarCaption := "(( ( value replace `[` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `]` with ` </b></bgcolor></fgcolor>` ) + ` ` + ( available replace `[` with `<bgcolor=C0C0C0><fgcolor=FFFFFF><b> ` replace `]` with ` </b></bgcolor></fgcolor>` replace `<s>` with `` replace `</s>` with `` ) + `<fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcount + ` item(s)`) )))"
		oG2antt:FilterBarPromptVisible := 3/*exFilterBarVisible+exFilterBarPromptVisible*/
		oColumn5 := oG2antt:Columns:Item(0)
			oColumn5:FilterType := 240/*exFilter*/
			oColumn5:Filter := "Item A|Item B"
		oG2antt:Columns:Item(2):Filter := Transform(1,"")
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2014:
FilterBarCaption AVAILABLE Keyword ( sample 1 )

PROCEDURE OnAddItem(oG2antt,Item)
	LOCAL i
	i := oG2antt:FormatABC("value + 1",oG2antt:Items:ItemToIndex(Item))
	oG2antt:Items():SetProperty("CellImage",Item,3,i)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,oColumn1,oColumn2,oColumn3,oColumn4,oColumn5
	LOCAL oEditor
	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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oColumn := oG2antt:Columns():Add("Col-1")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn1 := oG2antt:Columns():Add("Col-2")
			oColumn1:DisplayFilterButton := .T.
			oColumn1:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn2 := oG2antt:Columns():Add("Check")
			oEditor := oColumn2:Editor()
				oEditor:EditType := 19/*CheckValueType*/
				oEditor:SetProperty("Option",17/*exCheckValue2*/,1)
			oColumn2:DisplayFilterButton := .T.
			oColumn2:DisplayFilterPattern := .F.
			oColumn2:FilterType := 6/*exCheck*/
		oColumn3 := oG2antt:Columns():Add("Image")
			oColumn3:DisplayFilterButton := .T.
			oColumn3:FilterType := 10/*exImage*/
			oColumn3:FilterList := 9472/*exShowExclude+exShowFocusItem+exShowCheckBox*/
		oColumn4 := oG2antt:Columns():Add("Pos")
			oColumn4:AllowSizing := .F.
			oColumn4:AllowSort := .F.
			oColumn4:Width := 32
			oColumn4:FormatColumn := "1 apos ``"
			oColumn4:Position := 0
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("Item A"),1,"Sub-Item A")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellValue",h,1,"Sub-Item B")
			oItems:SetProperty("CellState",h,2,1)
			oItems:SetProperty("CellValue",oItems:AddItem("Item C"),1,"Sub-Item C")
		oG2antt:FilterBarFont := oG2antt:Font()
		oG2antt:SetProperty("Description",11/*exFilterBarAnd*/,Transform(oG2antt:FormatABC("`<fgcolor=808080> ` + value + ` </fgcolor>`",oG2antt:Description(11/*exFilterBarAnd*/)),""))
		oG2antt:FilterBarCaption := "value + ` ` + available"
		oG2antt:FilterBarPromptVisible := 3/*exFilterBarVisible+exFilterBarPromptVisible*/
		oColumn5 := oG2antt:Columns:Item(0)
			oColumn5:FilterType := 240/*exFilter*/
			oColumn5:Filter := "Item A|Item B"
		oG2antt:Columns:Item(2):Filter := Transform(1,"")
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2013:
Is it possible to somehow highlight the column's name different than its filter value in the control's filter bar ( sample 3, results )

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,oColumn1,oColumn2,oColumn3,oColumn4
	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()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oColumn := oG2antt:Columns():Add("Col-1")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn1 := oG2antt:Columns():Add("Col-2")
			oColumn1:DisplayFilterButton := .T.
			oColumn1:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn2 := oG2antt:Columns():Add("Pos")
			oColumn2:AllowSizing := .F.
			oColumn2:AllowSort := .F.
			oColumn2:Width := 32
			oColumn2:FormatColumn := "1 apos ``"
			oColumn2:Position := 0
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("Item A"),1,"Sub-Item A")
			oItems:SetProperty("CellValue",oItems:AddItem("Item B"),1,"Sub-Item B")
			oItems:SetProperty("CellValue",oItems:AddItem("Item C"),1,"Sub-Item C")
		oG2antt:FilterBarFont := oG2antt:Font()
		oG2antt:SetProperty("Description",11/*exFilterBarAnd*/,Transform(oG2antt:FormatABC("`<fgcolor=808080>` + value + `</fgcolor>`",oG2antt:Description(11/*exFilterBarAnd*/)),""))
		oG2antt:FilterBarCaption := "(`<b>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<fgcolor=808080>`+ itemcount + ` item(s)`) )) replace `[` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `]` with ` </b></bgcolor></fgcolor>`"
		oG2antt:FilterBarPromptVisible := 256/*exFilterBarToggle*/
		oColumn3 := oG2antt:Columns:Item(0)
			oColumn3:FilterType := 240/*exFilter*/
			oColumn3:Filter := "Item A|Item B"
		oColumn4 := oG2antt:Columns:Item(1)
			oColumn4:FilterType := 3/*exPattern*/
			oColumn4:Filter := "*B"
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2012:
Is it possible to somehow highlight the column's name different than its filter value in the control's filter bar ( sample 2 )

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,oColumn1,oColumn2,oColumn3,oColumn4
	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()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oColumn := oG2antt:Columns():Add("Col-1")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn1 := oG2antt:Columns():Add("Col-2")
			oColumn1:DisplayFilterButton := .T.
			oColumn1:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn2 := oG2antt:Columns():Add("Pos")
			oColumn2:AllowSizing := .F.
			oColumn2:AllowSort := .F.
			oColumn2:Width := 32
			oColumn2:FormatColumn := "1 apos ``"
			oColumn2:Position := 0
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("Item A"),1,"Sub-Item A")
			oItems:SetProperty("CellValue",oItems:AddItem("Item B"),1,"Sub-Item B")
			oItems:SetProperty("CellValue",oItems:AddItem("Item C"),1,"Sub-Item C")
		oG2antt:FilterBarFont := oG2antt:Font()
		oG2antt:SetProperty("Description",11/*exFilterBarAnd*/,Transform(oG2antt:FormatABC("`<fgcolor=808080>` + value + `</fgcolor>`",oG2antt:Description(11/*exFilterBarAnd*/)),""))
		oG2antt:FilterBarCaption := "value replace `[` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `]` with ` </b></bgcolor></fgcolor>`"
		oG2antt:FilterBarPromptVisible := 256/*exFilterBarToggle*/
		oColumn3 := oG2antt:Columns:Item(0)
			oColumn3:FilterType := 240/*exFilter*/
			oColumn3:Filter := "Item A|Item B"
		oColumn4 := oG2antt:Columns:Item(1)
			oColumn4:FilterType := 3/*exPattern*/
			oColumn4:Filter := "*B"
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2011:
Is it possible to somehow highlight the column's name different than its filter value in the control's filter bar ( sample 1 )

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,oColumn1,oColumn2,oColumn3,oColumn4
	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()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oColumn := oG2antt:Columns():Add("Col-1")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn1 := oG2antt:Columns():Add("Col-2")
			oColumn1:DisplayFilterButton := .T.
			oColumn1:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn2 := oG2antt:Columns():Add("Pos")
			oColumn2:AllowSizing := .F.
			oColumn2:AllowSort := .F.
			oColumn2:Width := 32
			oColumn2:FormatColumn := "1 apos ``"
			oColumn2:Position := 0
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem("Item A"),1,"Sub-Item A")
			oItems:SetProperty("CellValue",oItems:AddItem("Item B"),1,"Sub-Item B")
			oItems:SetProperty("CellValue",oItems:AddItem("Item C"),1,"Sub-Item C")
		oG2antt:SetProperty("Description",11/*exFilterBarAnd*/,Transform(oG2antt:FormatABC("`<fgcolor=808080>` + value + `</fgcolor>`",oG2antt:Description(11/*exFilterBarAnd*/)),""))
		oG2antt:FilterBarCaption := "value replace `[` with `<fgcolor=808080>[` replace `]` with `]</fgcolor>`"
		oG2antt:FilterBarPromptVisible := 256/*exFilterBarToggle*/
		oColumn3 := oG2antt:Columns:Item(0)
			oColumn3:FilterType := 240/*exFilter*/
			oColumn3:Filter := "Item A|Item B"
		oColumn4 := oG2antt:Columns:Item(1)
			oColumn4:FilterType := 3/*exPattern*/
			oColumn4:Filter := "*B"
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2010:
Is it possible to automatically displays the control's filter label to the right

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oColumn := oG2antt:Columns():Add("Item")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn1 := oG2antt:Columns():Add("Pos")
			oColumn1:AllowSizing := .F.
			oColumn1:AllowSort := .F.
			oColumn1:Width := 32
			oColumn1:FormatColumn := "1 apos ``"
			oColumn1:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarCaption := "`<r>` + value"
		oG2antt:FilterBarPromptVisible := 1280/*exFilterBarShowCloseOnRight+exFilterBarToggle*/
		oColumn2 := oG2antt:Columns:Item(0)
			oColumn2:FilterType := 240/*exFilter*/
			oColumn2:Filter := "Item B"
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2009:
How can I get the number of results/items being shown in the control's filter bar (sample 4)

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oColumn := oG2antt:Columns():Add("Item")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn1 := oG2antt:Columns():Add("Pos")
			oColumn1:AllowSizing := .F.
			oColumn1:AllowSort := .F.
			oColumn1:Width := 32
			oColumn1:FormatColumn := "1 apos ``"
			oColumn1:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarFont := oG2antt:Font()
		oG2antt:FilterBarPrompt := Transform(oG2antt:FormatABC("`<b>` + value",oG2antt:FilterBarPrompt()),"")
		oG2antt:FilterBarCaption := "`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<fgcolor=808080>`+ itemcount + ` item(s)`) )"
		oG2antt:FilterBarPromptVisible := 3591/*exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2008:
How can I get the number of results being shown in the control's filter bar (sample 3)

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarFont := oG2antt:Font()
		oG2antt:FilterBarCaption := "`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `<br>` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : ``)"
		oG2antt:FilterBarPromptVisible := 2055/*exFilterBarCompact+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oColumn1 := oG2antt:Columns:Item(0)
			oColumn1:FilterType := 240/*exFilter*/
			oColumn1:Filter := "Item A|Item B"
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2007:
How can I get the number of results being shown in the control's filter bar (sample 2, compact)

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarFont := oG2antt:Font()
		oG2antt:FilterBarCaption := "`<b><r>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? `<off -4> ` + abs(matchitemcount + 1) + ` result(s)` : ``)"
		oG2antt:FilterBarPromptVisible := 2071/*exFilterBarCompact+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oColumn1 := oG2antt:Columns:Item(0)
			oColumn1:FilterType := 240/*exFilter*/
			oColumn1:Filter := "Item A|Item B"
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2006:
How can I get the number of results being shown in the control's filter bar (sample 1)

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarFont := oG2antt:Font()
		oG2antt:FilterBarCaption := "`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? abs(matchitemcount + 1) + ` result(s)` : ``)"
		oG2antt:FilterBarPromptVisible := 7/*exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oColumn1 := oG2antt:Columns:Item(0)
			oColumn1:FilterType := 240/*exFilter*/
			oColumn1:Filter := "Item A|Item B"
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

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

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
RETURN

PROCEDURE OnAfterExpandItem(oG2antt,Item)
	oG2antt:Refresh()
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,oColumn1,oColumn2
	LOCAL oEditor
	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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/
		oG2antt:AfterExpandItem := {|Item| OnAfterExpandItem(oG2antt,Item)} /*Fired after an item is expanded (collapsed).*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Check")
			oEditor := oColumn:Editor()
				oEditor:EditType := 19/*CheckValueType*/
				oEditor:SetProperty("Option",17/*exCheckValue2*/,1)
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterType := 6/*exCheck*/
		oColumn1 := oG2antt:Columns():Add("Pos")
			oColumn1:AllowSizing := .F.
			oColumn1:AllowSort := .F.
			oColumn1:Width := 32
			oColumn1:FormatColumn := "1 apos ``"
			oColumn1:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellState",oItems:InsertItem(h,,"Sub-Item B1"),1,1)
			oItems:InsertItem(h,,"Sub-Item B2")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:AddItem("Item C")
		oG2antt:FilterInclude := 1/*exItemsWithChilds*/
		oG2antt:FilterBarFont := oG2antt:Font()
		oG2antt:FilterBarCaption := "`<fgcolor=0000FF><i>value/current</i></fgcolor>: <fgcolor=808080>` + value + `</fgcolor>` + `<br><fgcolor=0000FF><i>available</i></fgcolor>: ` + available + `<br><fgcolor=0000FF><i>allui</i></fgcolor>: ` + allui + `<br><fgcolor=0000FF><i>all</i></fgcolor>: ` + all + `<br><fgcolor=0000FF><i>itemcount</i></fgcolor>: <fgcolor=808080>` + itemcount + `</fgcolor>`+ `<br><fgcolor=0000FF><i>visibleitemcount</i></fgcolor>: <fgcolor=808080>` + visibleitemcount + `</fgcolor>`+ `<br><fgcolor=0000FF><i>matchitemcount</" +;
		"i></fgcolor>: <fgcolor=808080>` + matchitemcount + `</fgcolor>`+ `<br><fgcolor=0000FF><i>promptpattern</i></fgcolor>: <fgcolor=808080>` + promptpattern + `</fgcolor>`"
		oG2antt:FilterBarPromptPattern := "B"
		oG2antt:FilterBarPromptVisible := 7/*exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oColumn2 := oG2antt:Columns:Item(0)
			oColumn2:FilterType := 240/*exFilter*/
			oColumn2:Filter := "Item A|Item B"
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2004:
I am using filter prompt feature, and also column's filter, just wondering if possible to compact displaying the filter bar so it won't show on multiple lines

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarFont := oG2antt:Font()
		oG2antt:FilterBarCaption := "`<r><i><fgcolor=808080><upline><solidline><sha ;;0>` + value"
		oG2antt:FilterBarPromptPattern := "B"
		oG2antt:FilterBarPromptVisible := 2067/*exFilterBarCompact+exFilterBarSingleLine+exFilterBarVisible+exFilterBarPromptVisible*/
		oColumn1 := oG2antt:Columns:Item(0)
			oColumn1:FilterType := 240/*exFilter*/
			oColumn1:Filter := "Item A|Item B"
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2003:
Just wondering if it is possible to show the filter bar's close button on the right ( sample 2 )

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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 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()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarPromptVisible := 1281/*exFilterBarShowCloseOnRight+exFilterBarToggle+exFilterBarPromptVisible*/
		oG2antt:FilterBarPrompt := Transform(oG2antt:FormatABC("`<r>` + value",oG2antt:FilterBarPrompt()),"")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2002:
Just wondering if it is possible to show the filter bar's close button on the right ( sample 1 )

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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 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()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:RightToLeft := .T.
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarPromptVisible := 257/*exFilterBarToggle+exFilterBarPromptVisible*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2001:
How can I change the visual appearance of the filter bar's close button (EBN)

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
RETURN

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oAppearance
	LOCAL oChart
	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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABHQDg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJ5BhIAAyDSJMjSRJUEhqGCWYDleYYYAKHIMQLOg7IJjyI4/SJAYCydKAWhxIaZKJHCZoEDaTAADCNVAQp6MEIJVbVEI0e79OgBLp/Z7kECIJJAaRjHQdJxGLA8EhtCQhCZteK6SgMKJYXhWQYRXI1JwvMBrWrdQjiOYELQtMKmSZNLYGG4dR5SVJbcYhSYsRRFMoyDIOXYDLKsdYqSpXIThObEGgaPqJYjsUjCMKnR7HVIURrBPC9TBPE69ZgmC6ucKPX51ShKFaBWDZcwFAS+UBuYCAILiEAQGZ1XT8OROicbgJgSTJRlCaZeDsHY7QGR4xkSYp3CaExZAQMgalQYAwjCAAfBANxcA2TgKAUOpDCGFhKg0RpXCwCwDHQHQHEyAIkCkOhbFOGA8A8DohBgRg9AccZcn8EpEjMLI2C2" +;
		"DYxAgQgvAIUIVkoAAPBQDJlECTZ3CCYwDACQwUA8A5MCAWAWDiQi4l8aQOEgLJuBgBgDmYFAzEoIoIl0WALgKYJbBABADAAHgHg8VAMmqCQQDMXABAATYwTmNwBDATJXAiAgjHmNQ5lgQ5QEQEQMmcWg/GwD5ylyNw2gMcJcjsBgBgOQQDDhRpVAMMwnDBFw1B0Ax8D0DxOmmJJIGQTY5hGMAwkwM4CAYLZAmAOJnAqAojiIGg6iieYkmeAYOHaKJDCyCwjH6AoggsQpQliAJLhgaJ0CESBTnyDwjk+cg4g4P5IHIHJ+BWRRzlYWAxiOUxihsY4KjKLJRGqC44FCegkkkM58iAKAPnIWIWD8SRSFSfQnkmewUhYP4GiGKJ7G0TIbCSUoggqUo0lAQ4LnEcBcD8Coiiif4nE+eAAn2HpOkcFJqi4T5SkyMw/kqQown8IBIBOdA+A+DJrBqVxXEqYo4lCApLhGHBnD8S4ymyfxmg+cwQkQP5egOUZIWoEA" +;
		"kjIeIPBMBJBD+TBjBifwvkuc58hQJQPmFrYykkchclSApKjGOBuD+TRDFCfw3mmIxNi8FxFlOXhVC4aYDFyPgvg2YBcBcLZGCGCJ0DSLRzGSWQ/lmY5+mEP5gmMDBZRSMRsFsOxMhMJJ/DsTpTnwaQaE+N5ojuNhdEYNI5C4TZJO1GRDmCaxnA2Yx4n8IpIjOTBQBQC5TgyYw7gUYRYikC0BYRwsDQBoB8eA6Q2hsE0BUXgywZtYCyHMKwnxSAhAQHkIQhRrBaDsCwA4ERiB2EWAIYIXhhiVEgAEUYwwYjyASLge4FhHgRDkM8OQih0jWPkGgBBAQ")
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarPromptVisible := 257/*exFilterBarToggle+exFilterBarPromptVisible*/
		oG2antt:SetProperty("Background",1/*exFooterFilterBarButton*/,0x1000000)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2000:
How can I change the visual appearance of the filter bar's close button (solid)

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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 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()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarPromptVisible := 1/*exFilterBarPromptVisible*/
		oG2antt:SetProperty("Background",1/*exFooterFilterBarButton*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1999:
Is it possible to prevent definitely showing the filter bar's close button

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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 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()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarPromptVisible := 1/*exFilterBarPromptVisible*/
		oG2antt:SetProperty("Background",1/*exFooterFilterBarButton*/,-1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1998:
Is it possible to show the close button only if there is a filter applied

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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 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()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarPromptVisible := 513/*exFilterBarShowCloseIfRequired+exFilterBarPromptVisible*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1997:
The control's filter bar is not closed once I click the close button (toggle)

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
			oItems:SetProperty("LockedItemCount",2/*exBottom*/,1)
			h := oItems:LockedItem(2/*exBottom*/,0)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("CellValue",h,0,"<c><fgcolor=808080>Press the CTRL + F to turn on/off the control's filter bar. ALT + Up/Down moves the focus.")
			oItems:SetProperty("CellValueFormat",h,0,1/*exHTML*/)
		oG2antt:FilterBarCaption := "`<r><fgcolor=808080>` + value"
		oG2antt:FilterBarPromptPattern := "B"
		oG2antt:FilterBarPromptVisible := 2323/*exFilterBarCompact+exFilterBarToggle+exFilterBarSingleLine+exFilterBarVisible+exFilterBarPromptVisible*/
		oColumn1 := oG2antt:Columns:Item(0)
			oColumn1:FilterType := 240/*exFilter*/
			oColumn1:Filter := "Item B"
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1996:
How can I display the control's filter on a single line

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarCaption := "len(value) ? `filter for: <fgcolor 808080>` + value  : `<fgcolor 808080>no filter`"
		oG2antt:FilterBarPromptVisible := 18/*exFilterBarSingleLine+exFilterBarVisible*/
		oColumn1 := oG2antt:Columns:Item(0)
			oColumn1:FilterType := 240/*exFilter*/
			oColumn1:Filter := "Item A|Item B"
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1995:
How can I display the control's filter on a single line (prompt-combined)

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarCaption := "`<r>` + value"
		oG2antt:FilterBarPromptVisible := 2067/*exFilterBarCompact+exFilterBarSingleLine+exFilterBarVisible+exFilterBarPromptVisible*/
		oColumn1 := oG2antt:Columns:Item(0)
			oColumn1:FilterType := 240/*exFilter*/
			oColumn1:Filter := "Item A|Item B"
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1994:
How can I get the number of results after a filter is applied

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
RETURN

PROCEDURE OnClick(oG2antt)
	oG2antt:ClearFilter()
RETURN

PROCEDURE OnFilterChange(oG2antt)
	DevOut( "Items.MatchItemCount" )
	DevOut( Transform(oG2antt:Items:MatchItemCount(),"") )
	DevOut( Transform(oG2antt:FormatABC("value < 0 ? `filter applied: ` + abs(value + 1) + ` result(s)` : `no filter`",oG2antt:Items:MatchItemCount()),"") )
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 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:Click := {|| OnClick(oG2antt)} /*Occurs when the user presses and then releases the left mouse button over the tree control.*/
		oG2antt:FilterChange := {|| OnFilterChange(oG2antt)} /*Occurs when the filter was changed.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarPromptVisible := 1/*exFilterBarPromptVisible*/
		oG2antt:FilterBarPromptPattern := "Item"
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1993:
How can I programmatically clear the control's filter
PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
RETURN

PROCEDURE OnClick(oG2antt)
	oG2antt:ClearFilter()
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 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:Click := {|| OnClick(oG2antt)} /*Occurs when the user presses and then releases the left mouse button over the tree control.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarPromptVisible := 1/*exFilterBarPromptVisible*/
		oG2antt:FilterBarPromptPattern := "B"
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1992:
Is it possible to prevent closing the control's filter bar, so it is always shown (prompt-combined)

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarPromptPattern := "B"
		oG2antt:FilterBarPromptVisible := 3/*exFilterBarVisible+exFilterBarPromptVisible*/
		oColumn1 := oG2antt:Columns:Item(0)
			oColumn1:FilterType := 240/*exFilter*/
			oColumn1:Filter := "Item B"
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1991:
Is it possible to prevent closing the control's filter bar, so it is always shown (prompt)

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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 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()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarPromptVisible := 1/*exFilterBarPromptVisible*/
		oG2antt:FilterBarPromptPattern := "B"
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1990:
Is it possible to prevent closing the control's filter bar, so it is always shown

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():AddBar(Item,"Task","12/04/2017","12/14/2017")
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,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:AddItem := {|Item| OnAddItem(oG2antt,Item)} /*Occurs after a new Item has been inserted to Items collection.*/

		oG2antt:BeginUpdate()
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/02/2017"
			oChart:SetProperty("PaneWidth",.F.,256)
		oG2antt:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oG2antt:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:FilterBarCaption := "len(value) = 0 ? `<fgcolor=808080>no filter` : value"
		oG2antt:FilterBarPromptVisible := 2/*exFilterBarVisible*/
		oColumn1 := oG2antt:Columns:Item(0)
			oColumn1:FilterType := 240/*exFilter*/
			oColumn1:Filter := "Item B"
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1989:
What are the options to align the percent caption

#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

	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("Clip")
		oG2antt:ScrollBySingleLine := .T.
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oChart := oG2antt:Chart()
			oChart:AllowResizeChart := 6/*exAllowResizeChartMiddle+exAllowResizeChartHeader*/
			oChart:DrawGridLines := -2/*exRowLines*/
			oChart:FirstVisibleDate := "12/26/2000"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,256)
			oBar := oChart:Bars():Add("Task%Progress")
				oBar:Shortcut := "Task"
				oBar:Pattern := 32/*exPatternBox*/
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 164,164,164 } )  , .F. ))
				oBar:SetProperty("StartColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
				oBar:SetProperty("EndColor",oBar:StartColor())
				oBar:OverlaidType := 4611/*exOverlaidBarsIncludeCaption+exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
				oBar:Height := 15
				oBar:SetProperty("Def",12/*exBarPercent*/,0.5)
				oBar:SetProperty("Def",14/*exBarShowPercentCaption*/,.T.)
				oBar:SetProperty("Def",13/*exBarPercentCaptionFormat*/,"<sha ;;0>%p%")
		oItems := oG2antt:Items()
			h := oItems:AddItem("no clip, (0-2)")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",15/*exBarAlignPercentCaption*/,2)
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K2")
			oItems:SetProperty("ItemBar",h,"K2",15/*exBarAlignPercentCaption*/,1)
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K3")
			oItems:SetProperty("ItemBar",h,"K3",15/*exBarAlignPercentCaption*/,0)
			h := oItems:AddItem("clip, inside (3-5)")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",15/*exBarAlignPercentCaption*/,5)
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K2")
			oItems:SetProperty("ItemBar",h,"K2",15/*exBarAlignPercentCaption*/,4)
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K3")
			oItems:SetProperty("ItemBar",h,"K3",15/*exBarAlignPercentCaption*/,3)
			h := oItems:AddItem("hide on min width, clip if not fit, inside (6-8)")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",15/*exBarAlignPercentCaption*/,8)
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K2")
			oItems:SetProperty("ItemBar",h,"K2",15/*exBarAlignPercentCaption*/,7)
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K3")
			oItems:SetProperty("ItemBar",h,"K3",15/*exBarAlignPercentCaption*/,6)
			h := oItems:AddItem("hide if not fit, no clip, inside (9-11)")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",15/*exBarAlignPercentCaption*/,11)
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K2")
			oItems:SetProperty("ItemBar",h,"K2",15/*exBarAlignPercentCaption*/,10)
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K3")
			oItems:SetProperty("ItemBar",h,"K3",15/*exBarAlignPercentCaption*/,9)
			h := oItems:AddItem("no clip, inside, outside (12-14)")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",15/*exBarAlignPercentCaption*/,14)
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K2")
			oItems:SetProperty("ItemBar",h,"K2",4/*exBarHAlignCaption*/,13)
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K3")
			oItems:SetProperty("ItemBar",h,"K3",15/*exBarAlignPercentCaption*/,12)
			h := oItems:AddItem("no clip, outside (16-18)")
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",15/*exBarAlignPercentCaption*/,18)
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K2")
			oItems:SetProperty("ItemBar",h,"K2",15/*exBarAlignPercentCaption*/,17)
			oItems:AddBar(h,"Task","01/02/2001","01/04/2001","K3")
			oItems:SetProperty("ItemBar",h,"K3",15/*exBarAlignPercentCaption*/,16)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1988:
Is it possible to determine whether a bar is in the current display area

PROCEDURE OnBarResizing(oG2antt,Item,Key)
	oG2antt:Refresh()
RETURN

PROCEDURE OnDateChange(oG2antt)
	oG2antt:Refresh()
RETURN

PROCEDURE OnFormatColumn(oG2antt,Item,ColIndex,Value)
	LOCAL e,l,r,s
	s := oG2antt:Items:ItemBar(Item,"A",1/*exBarStart*/)
	e := oG2antt:Items:ItemBar(Item,"A",2/*exBarEnd*/)
	l := oG2antt:FormatABC("A < B",e,oG2antt:Chart:FirstVisibleDate())
	r := oG2antt:FormatABC("A > B",s,oG2antt:Chart:DateFromPoint(1,-1))
	Value := oG2antt:FormatABC("( A or B ) ? `<fgcolor=C0C0C0>hidden` : `<b>visible`",l,r)
RETURN

PROCEDURE OnLayoutChanged(oG2antt)
	oG2antt:Refresh()
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 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:DateChange := {|| OnDateChange(oG2antt)} /*Occurs when the first visible date is changed.*/
		oG2antt:FormatColumn := {|Item,ColIndex,Value| OnFormatColumn(oG2antt,Item,ColIndex,Value)} /*Fired when a cell requires to format its caption.*/
		oG2antt:LayoutChanged := {|| OnLayoutChanged(oG2antt)} /*Occurs when column's position or column's size is changed.*/

		oG2antt:BeginUpdate()
		oG2antt:SelBackMode := 1/*exTransparent*/
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Visible")
			oColumn:FireFormatColumn := .T.
			oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
		oChart := oG2antt:Chart()
			oChart:OverviewVisible := -1/*exOverviewShowAll*/
			oChart:OverviewHeight := 64
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oG2antt:SetProperty("SelBackColor",oG2antt:BackColor())
		oG2antt:SetProperty("SelForeColor",oG2antt:ForeColor())
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/08/2017","A")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","08/03/2018","08/10/2018","A")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","08/04/2019","08/12/2019","A")
			oItems:SetProperty("SelectItem",oItems:FocusItem(),.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1987:
How can I ensure that the bar fits the control's client area

PROCEDURE OnSelectionChanged(oG2antt)
	LOCAL h,k,s
	h := oG2antt:Items:FocusItem()
	k := oG2antt:Items:FirstItemBar(h)
	s := oG2antt:FormatABC("(A+B)/2",oG2antt:Items:ItemBar(h,k,1/*exBarStart*/),oG2antt:Items:ItemBar(h,k,2/*exBarEnd*/))
	oG2antt:Chart():ScrollTo(s,1)
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:SelectionChanged := {|| OnSelectionChanged(oG2antt)} /*Fired after a new item has been selected.*/

		oG2antt:BeginUpdate()
		oG2antt:SelBackMode := 1/*exTransparent*/
		oG2antt:Columns():Add("Tasks")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:SetProperty("SelBackColor",oG2antt:SelBackColor())
			oChart:SetProperty("SelBarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","08/02/2017","08/08/2017")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","08/03/2018","08/10/2018")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","08/04/2019","08/12/2019")
			oItems:SetProperty("SelectItem",oItems:FocusItem(),.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1986:
Is it possible to change the caption from a column without to remove the column and add it with the new caption
#include "AppEvent.ch"
#include "ActiveX.ch"

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

	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:Columns():Add("ColumnName"):Caption := "NewName"
		oG2antt:Columns():Add("ColumnName"):HTMLCaption := "<b>New</b>Name"

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1985:
How can I display the bar's duration in days, minutes, and so so on

#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 oColumns
	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()
		oColumns := oG2antt:Columns()
			oColumns:Add("Tasks"):AllowSizing := .F.
			oColumn := oColumns:Add("Duration")
				oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,513)
				oColumn:SetProperty("Def",19/*exCellValueToItemBarKey*/,"A")
				oColumn:FormatColumn := "trim((1:=int((0:=value)/365) ? =:1 + ` year(s) ` : ``)  + (1:=int((0:=(=:0 - (=:1*365)))/31) ? =:1 + ` month(s) ` : ``) + (1:=int((0:=(=:0 - (=:1*31)))/7) ? =:1 + ` week(s) ` : ``) + (1:=int((0:=(=:0 - (=:1*7)))/1) ? =:1 + ` day(s) ` : ``) + (1:=int((0:=(=:0 - =:1 + 1/24/60/60/2))*24) ? =:1 + ` hour(s) ` : ``) + (1:=int((0:=(=:0*24 - =:1))*60) ? =:1 + ` min(s) ` : ``) + (1:=int((0:=(=:0*60 - =:1))*60) ? =:1 + ` sec(s)` : ``))"
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/30/2001"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,196)
			oChart:Bars():Add("Task:Split"):Shortcut := "Task"
			oChart:OverviewVisible := -1/*exOverviewShowAll*/
			oChart:OverviewHeight := 64
			oChart:ResizeUnitScale := 16777216/*exSecond*/
			oChart:AllowResizeChart := 262/*exAllowChangeUnitScale+exAllowResizeChartMiddle+exAllowResizeChartHeader*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","12/31/2001","01/07/2002","A")
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/01/2002","02/14/2002","A")
			h := oItems:AddItem("Task 3")
			oItems:AddBar(h,"Task","01/02/2002 10:00:00","01/02/2002 12:00:00","A")
			h := oItems:AddItem("Task 4")
			oItems:AddBar(h,"Task","01/03/2002","01/04/2002 08:30:30","A")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1984:
How can I change the background color for checked items (EBN color, frame)

PROCEDURE OnCellStateChanged(oG2antt,Item,ColIndex)
	oG2antt:Refresh()
RETURN

#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
	LOCAL oChart
	LOCAL oColumn
	LOCAL oConditionalFormat
	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*/
		oG2antt:SelBackMode := 1/*exTransparent*/
		oG2antt:DefaultItemHeight := 22
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oAppearance := oG2antt:VisualAppearance()
			oAppearance:Add(2,"gBFLBCJwBAEHhEJAAEhABUkIQAAYAQGKIcBiAKBQAGYBIJDEMQ3DjAUBjMK4ZwTC4AIQjCK4JDKHYJRpHEZgLBMJAAGIZYhhUYRUiYMkiJBGGDIDiGGI2SJAcbTVIEcx9EyUJSgSTJOjCMokTTIU4TTLYASbJafJJhWSaAiyMouDIOMg1BDNIw/Hika6jOgKUisNJXRzWIBTbDlOQ3JqnbCjOQRSrQBoNDAMAiiaKlbwJPK9RoieQXfwUAJrXJcFqXFSLVxNBKAQEBA=")
			oAppearance:Add(1,"CP:2 1 1 -1 -1")
		oConditionalFormat := oG2antt:ConditionalFormats():Add("%CS0 = 1")
			oConditionalFormat:SetProperty("BackColor",0x1000000)
			oConditionalFormat:SetProperty("ChartBackColor",oConditionalFormat:BackColor())
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		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.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1983:
How can I change the caption of the checked items (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 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*/
		oG2antt:SetProperty("SelBackColor",oG2antt:BackColor())
		oG2antt:SetProperty("SelForeColor",oG2antt:ForeColor())
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
			oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
			oColumn:FormatColumn := "%CS0 = 1 ? `<bgcolor=000000><fgcolor=FFFFFF> ` + value + ` </fgcolor></bgcolor>` : value"
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,256)
			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
1982:
How can I change the caption of the checked items (sample 1)

#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.
			oColumn:SetProperty("Def",17/*exCellValueFormat*/,1)
			oColumn:FormatColumn := "value + (%CS0 = 1 ? `<r><fgcolor=808080>(checked)` : ``)"
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,256)
			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
1981:
How can I change the font for the checked items

PROCEDURE OnCellStateChanged(oG2antt,Item,ColIndex)
	oG2antt:Refresh()
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 oConditionalFormat
	LOCAL oItems
	LOCAL h,hChild
	LOCAL f

	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*/
		oG2antt:DefaultItemHeight := 22
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oConditionalFormat := oG2antt:ConditionalFormats():Add("%CS0 = 1")
			f := CreateObject("StdFont")
				f:Name := oG2antt:Font():Name()
				f:Size := 12
			oConditionalFormat:Font := f
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "08/01/2017"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,196)
			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
1980:
How can I bold the checked items

PROCEDURE OnCellStateChanged(oG2antt,Item,ColIndex)
	oG2antt:Refresh()
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 oConditionalFormat
	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.
		oConditionalFormat := oG2antt:ConditionalFormats():Add("%CS0 = 1")
			oConditionalFormat:Bold := .T.
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		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.)
		oG2antt:EndUpdate()

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

PROCEDURE OnCellStateChanged(oG2antt,Item,ColIndex)
	oG2antt:Refresh()
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 oConditionalFormat
	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*/
		oG2antt:SelBackMode := 1/*exTransparent*/
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oConditionalFormat := oG2antt:ConditionalFormats():Add("%CS0 = 1")
			oConditionalFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,128,128 } )  , .F. ))
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		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.)
		oG2antt:EndUpdate()

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

PROCEDURE OnCellStateChanged(oG2antt,Item,ColIndex)
	oG2antt:Refresh()
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 oConditionalFormat
	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*/
		oG2antt:SelBackMode := 1/*exTransparent*/
		oColumn := oG2antt:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oConditionalFormat := oG2antt:ConditionalFormats():Add("%CS0 = 1")
			oConditionalFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,128,128 } )  , .F. ))
			oConditionalFormat:SetProperty("ChartBackColor",oConditionalFormat:BackColor())
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		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.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1977:
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 oConditionalFormat
	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.
		oConditionalFormat := oG2antt:ConditionalFormats():Add("%CS0 = 1")
			oConditionalFormat:ApplyToBars := "Task,Summary"
			oConditionalFormat:SetProperty("BarColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		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.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1976:
I have defined "NonWorkingHours" for the Gantt, and the "exBarWorkingCount" properly excludes these hours as long as the Gantt is using "exDay" or "exHour" as the level unit. However when displaying a quarter or a year, I'm changing the unit to "exWeek", but then the "NonWorkingHours" are no longer excluded from the bars "exBarWorkingCount" and displays the wrong value

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	LOCAL oChart,oChart1
	LOCAL oColumn
	LOCAL oColumns
	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()
		oColumns := oG2antt:Columns()
			oColumns:Add("Tasks"):AllowSizing := .F.
			oColumn := oColumns:Add("Working")
				oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,258)
				oColumn:SetProperty("Def",19/*exCellValueToItemBarKey*/,"A")
				oColumn:FormatColumn := "((1:=int(0:=( 24*int(value) + (value - int(value) + 1/24/60/60/2)*24))) != 0 ? =:1 + ' hour(s)' : '' ) + (=:1 ? ' ' : '' ) + ((1:=round((=:0 - =:1)*60)) != 0 ? =:1 + ' min(s)' : '')"
		oG2antt:Items():AllowCellValueToItemBar := .T.
		oChart := oG2antt:Chart()
			oChart:AllowResizeChart := 262/*exAllowChangeUnitScale+exAllowResizeChartMiddle+exAllowResizeChartHeader*/
			oChart:SetProperty("PaneWidth",.F.,196)
			oChart:Bars():Add("Task:Split"):Shortcut := "Task"
			oChart:FirstVisibleDate := "01/03/2002"
			oChart:LevelCount := 2
			oChart:Level(0):Label := "<%ddd%>"
			oChart:Level(1):Label := "<%hh%>"
			oChart:NonworkingHours := 16761855
			oChart:ShowNonworkingUnits := .F.
			oChart:OverviewVisible := -1/*exOverviewShowAll*/
			oChart:OverviewHeight := 64
			oChart:AllowOverviewZoom := 1/*exAlwaysZoom*/
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/04/2002","01/08/2002","A")
			oItems:SetProperty("ItemBar",h,"A",20/*exBarKeepWorkingCount*/,.T.)
			h := oItems:AddItem("Task 2")
			oItems:AddBar(h,"Task","01/03/2002","01/04/2002","A")
			oItems:SetProperty("ItemBar",h,"A",20/*exBarKeepWorkingCount*/,.T.)
		oChart1 := oG2antt:Chart()
			oChart1:UnitScale := 4096/*exDay*/
			oChart1:ScrollTo(oChart1:FirstVisibleDate(),1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1975:
Is it possible to customize the editor selection colour of the built in text editor, from standard blue to black

#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()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oEditor := oG2antt:Columns():Add("Edit"):Editor()
			oEditor:EditType := 8/*MaskType*/
			oEditor:Mask := ";;;rich"
		oItems := oG2antt:Items()
			oItems:AddItem("")
			oItems:AddItem("Just a text")
			oItems:AddItem("")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1974:
Is it possible to customize the editor selection colour of the built in dropdown editor, from standard blue to black

#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()
		oG2antt:SetProperty("SelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oG2antt:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oEditor := oG2antt:Columns():Add("DropDown"):Editor()
			oEditor:AddItem(1,"This is just the first item")
			oEditor:AddItem(2,"This is just the second item")
			oEditor:AddItem(3,"This is just the third item")
			oEditor:EditType := 2/*DropDownType*/
			oEditor:Mask := ";;;rich"
		oItems := oG2antt:Items()
			oItems:AddItem("")
			oItems:AddItem("Just a text")
			oItems:AddItem("")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1973:
When I display the chart in the daily view, the histogram shows correctly the data while if the chart displays the data in weekly or monthly view, the histogram shows no data or incorrectly. What can be the problem

PROCEDURE OnOverviewZoom(oG2antt)
	oG2antt:Chart():ResizeUnitScale := 4096/*exDay*/
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 h1

	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:OverviewZoom := {|| OnOverviewZoom(oG2antt)} /*Occurs once the user selects a new time scale unit in the overview zoom area.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oColumn := oG2antt:Columns():Add("Effort")
			oColumn:SetProperty("Def",18/*exCellValueToItemBarProperty*/,21)
			oColumn:Editor():EditType := 4/*SpinType*/
		oChart := oG2antt:Chart()
			oChart:AllowOverviewZoom := 1/*exAlwaysZoom*/
			oChart:OverviewZoomCaption := "|||<img>3</img>Month|Third|<img>2</img>Week|<img>1</img>Day|||"
			oChart:SetProperty("Label",0/*exYear*/,"")
			oChart:SetProperty("Label",1/*exHalfYear*/,"")
			oChart:SetProperty("Label",2/*exQuarterYear*/,"")
			oChart:SetProperty("Label",17/*exThirdMonth*/,"")
			oChart:SetProperty("Label",65536/*exHour*/,"")
			oChart:SetProperty("Label",1048576/*exMinute*/,"")
			oChart:SetProperty("Label",16777216/*exSecond*/,"")
			oChart:OverviewZoomUnit := 64
			oChart:LevelCount := 2
			oChart:NonworkingDays := 0
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:FirstVisibleDate := "06/20/2005"
			oChart:HistogramVisible := .T.
			oChart:HistogramHeight := 128
			oChart:HistogramView := 112/*exHistogramAllItems*/
			oChart:OverviewVisible := -1/*exOverviewShowAll*/
			oBar := oChart:Bars:Item("Task")
				oBar:HistogramPattern := oBar:Pattern()
				oBar:HistogramType := 0/*exHistOverload*/
				oBar:HistogramCriticalValue := 3
				oBar:HistogramItems := -7
				oBar:SetProperty("HistogramGridLinesColor",AutomationTranslateColor( GraMakeRGBColor  ( { 192,192,192 } )  , .F. ))
				oBar:SetProperty("HistogramRulerLinesColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
		oItems := oG2antt:Items()
			oItems:AllowCellValueToItemBar := .T.
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","06/21/2005","06/23/2005")
			oItems:SetProperty("CellValue",h1,1,4)
			h1 := oItems:AddItem("Task 2")
			oItems:AddBar(h1,"Task","06/24/2005","06/26/2005")
			oItems:SetProperty("CellValue",h1,1,3)
			h1 := oItems:AddItem("Task 3")
			oItems:AddBar(h1,"Task","06/27/2005","06/29/2005")
			oItems:SetProperty("CellValue",h1,1,2)
			h1 := oItems:AddItem("Task 4")
			oItems:AddBar(h1,"Task","06/30/2005","07/02/2005")
			oItems:SetProperty("CellValue",h1,1,1)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1972:
The BeforeExpandItem event is fired when clicking the drop down filter button. What we can do to prevent that
PROCEDURE OnBeforeExpandItem(oG2antt,Item,Cancel)
	DevOut( "BeforeExpandItem" )
	DevOut( Transform(Item,"") )
	DevOut( "ColumnFromPoint" )
	DevOut( Transform(oG2antt:ColumnFromPoint(-1,-1),"") )
	DevOut( "ColumnFromPoint return -1, if the user clicks the +/- glitch, else it returns the index of the column where the click occurs." )
	oG2antt:Items():InsertItem(Item,,"new child")
RETURN

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oG2antt
	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:BeforeExpandItem := {|Item,Cancel| OnBeforeExpandItem(oG2antt,Item,Cancel)} /*Fired before an item is about to be expanded (collapsed).*/

		oG2antt:BeginUpdate()
		oG2antt:Chart():SetProperty("PaneWidth",.T.,0)
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Items"):DisplayFilterButton := .T.
		oItems := oG2antt:Items()
			oItems:SetProperty("ItemHasChildren",oItems:InsertItem(,,"Group 1"),.T.)
			oItems:SetProperty("ItemHasChildren",oItems:InsertItem(,,"Group 2"),.T.)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1971:
How do I change the drop down filter icon/button (black)

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

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

	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:Add(1,"gBFLBCJwBAEHhEJAAEhABXUIQAAYAQGKIcBiAKBQAGYBIJDEMgzDDAUBjKKocQTC4AIQjCK4JDKHYJRpHEZyCA8EhqGASRAFUQBYiWE4oSpLABQaK0ZwIGyRIrkGQgQgmPYDSDNU4zVIEEglBI0TDNczhNDENgtGYaJqHIYpZBcM40TKkEZoSIITZcRrOEBiRL1S0RBhGcRUHZlWzdN64LhuK47UrWdD/XhdVzXRbjfz1Oq+bxve48Br7A5yYThdr4LhOFQ3RjIL4xbIcUwGe6VZhjOLZXjmO49T69HTtOCYBEBA")
		oG2antt:SetProperty("Background",0/*exHeaderFilterBarButton*/,0x1000000)
		oG2antt:SetProperty("Background",32/*exCursorHoverColumn*/,-1)
		oG2antt:HeaderAppearance := 0/*None2*/
		oG2antt:SetProperty("BackColorHeader",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oG2antt:SetProperty("ForeColorHeader",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oG2antt:HeaderVisible := -1/*exHeaderVisible*/
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oColumn := oG2antt:Columns():Add("Filter")
			oColumn:DisplayFilterButton := .T.
			oColumn:AllowSort := .F.
			oColumn:AllowDragging := .F.
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,196)
			oChart:LevelCount := 2
			oChart:SetProperty("BackColorLevelHeader",oG2antt:BackColorHeader())
			oChart:SetProperty("ForeColorLevelHeader",oG2antt:ForeColorHeader())
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1970:
How do I change the z-order of the bars (percent)

PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL b,i
	b := oG2antt:Chart:BarFromPoint(-1,-1)
	i := oG2antt:ItemFromPoint(-1,-1,c,hit)
	DevOut( Transform(oG2antt:Items:ItemBar(i,b,6/*exBarToolTip*/),"") )
RETURN

#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 h1

	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:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oG2antt:DefaultItemHeight := 52
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "10/10/2017"
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:NonworkingDays := 0
			oChart:SetProperty("MarkTodayColor",oChart:BackColor())
			oChart:Bars():Add("Task%Progress"):Shortcut := "Task"
			oBar := oChart:Bars():CallMethod("Copy","Task","T1")
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%17 + `<b><font ;6><off -4> (z-key `+%9+`)`%>")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar:SetProperty("Def",12/*exBarPercent*/,0.25)
				oBar:SetProperty("Def",39/*exBarPercentColor*/,oBar:Color())
				oBar:SetProperty("Def",18/*exBarOffset*/,10)
				oBar:SetProperty("Def",14/*exBarShowPercentCaption*/,.T.)
				oBar:SetProperty("Def",13/*exBarPercentCaptionFormat*/,"<font ;6><b>%p%</b>")
			oBar1 := oChart:Bars():CallMethod("Copy","Task","T2")
				oBar1:Height := 26
				oBar1:SetProperty("Def",3/*exBarCaption*/,"<%=%17 + `<b><font ;6><off -4> (z-key `+%9+`)`%>")
				oBar1:SetProperty("Def",5/*exBarVAlignCaption*/,16)
				oBar1:SetProperty("Def",12/*exBarPercent*/,0.25)
				oBar1:SetProperty("Def",39/*exBarPercentColor*/,oBar1:Color())
				oBar1:SetProperty("Def",14/*exBarShowPercentCaption*/,.T.)
				oBar1:SetProperty("Def",13/*exBarPercentCaptionFormat*/,"<font ;6><b>%p%</b>")
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task")
			oItems:AddBar(h1,"T1","10/15/2017","10/25/2017","2")
			oItems:SetProperty("ItemBar",h1,"2",17/*exBarData*/,"Bar A")
			oItems:SetProperty("ItemBar",h1,"2",6/*exBarToolTip*/,"Bar A <b>Over</b> Bar B")
			oItems:AddBar(h1,"T2","10/18/2017","10/22/2017","1")
			oItems:SetProperty("ItemBar",h1,"1",17/*exBarData*/,"Bar B")
			oItems:SetProperty("ItemBar",h1,"1",6/*exBarToolTip*/,"Bar B <b>Under</b> Bar A")
			h1 := oItems:AddItem("Task")
			oItems:AddBar(h1,"T1","10/15/2017","10/25/2017","1")
			oItems:SetProperty("ItemBar",h1,"1",17/*exBarData*/,"Bar A")
			oItems:SetProperty("ItemBar",h1,"1",6/*exBarToolTip*/,"Bar A <b>Under</b> Bar B")
			oItems:AddBar(h1,"T2","10/18/2017","10/22/2017","2")
			oItems:SetProperty("ItemBar",h1,"2",17/*exBarData*/,"Bar B")
			oItems:SetProperty("ItemBar",h1,"2",6/*exBarToolTip*/,"Bar B <b>Over</b> Bar A")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
1969:
How do I change the z-order of the bars

PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	LOCAL b,i
	b := oG2antt:Chart:BarFromPoint(-1,-1)
	i := oG2antt:ItemFromPoint(-1,-1,c,hit)
	DevOut( Transform(oG2antt:Items:ItemBar(i,b,6/*exBarToolTip*/),"") )
RETURN

#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 h1

	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:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oG2antt,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oG2antt:BeginUpdate()
		oG2antt:Columns():Add("Tasks")
		oG2antt:DefaultItemHeight := 52
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "10/10/2017"
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:NonworkingDays := 0
			oChart:SetProperty("MarkTodayColor",oChart:BackColor())
			oBar := oChart:Bars():CallMethod("Copy","Task","T1")
				oBar:SetProperty("Color",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%17 + `<b><font ;6><off -4> (z-key `+%9+`)`%>")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
			oBar1 := oChart:Bars():CallMethod("Copy","Task","T2")
				oBar1:Height := 25
				oBar1:SetProperty("Def",3/*exBarCaption*/,"<%=%17 + `<b><font ;6><off -4> (z-key `+%9+`)`%>")
				oBar1:SetProperty("Def",5/*exBarVAlignCaption*/,16)
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task")
			oItems:AddBar(h1,"T1","10/15/2017","10/25/2017","2")
			oItems:SetProperty("ItemBar",h1,"2",17/*exBarData*/,"Bar A")
			oItems:SetProperty("ItemBar",h1,"2",6/*exBarToolTip*/,"Bar A <b>Over</b> Bar B")
			oItems:AddBar(h1,"T2","10/18/2017","10/22/2017","1")
			oItems:SetProperty("ItemBar",h1,"1",17/*exBarData*/,"Bar B")
			oItems:SetProperty("ItemBar",h1,"1",6/*exBarToolTip*/,"Bar B <b>Under</b> Bar A")
			h1 := oItems:AddItem("Task")
			oItems:AddBar(h1,"T1","10/15/2017","10/25/2017","1")
			oItems:SetProperty("ItemBar",h1,"1",17/*exBarData*/,"Bar A")
			oItems:SetProperty("ItemBar",h1,"1",6/*exBarToolTip*/,"Bar A <b>Under</b> Bar B")
			oItems:AddBar(h1,"T2","10/18/2017","10/22/2017","2")
			oItems:SetProperty("ItemBar",h1,"2",17/*exBarData*/,"Bar B")
			oItems:SetProperty("ItemBar",h1,"2",6/*exBarToolTip*/,"Bar B <b>Over</b> Bar A")
		oG2antt:EndUpdate()

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