2357
Specify the size of the Columns panel

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

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

	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 := 24
		oG2antt:HeaderAppearance := 4/*Etched*/
		oColumns := oG2antt:Columns()
			oColumns:Add("City")
			oColumns:Add("Start"):Visible := .F.
			oColumns:Add("End"):Visible := .F.
		oG2antt:ColumnsFloatBarRect := ",,96"
		oG2antt:ColumnsFloatBarVisible := 34/*exColumnsFloatBarVisibleAsChild+exColumnsFloatBarVisibleIncludeCheckColumns*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2356
Show a vertical line between pivot and Columns panel (EBN color)

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

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

	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:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABRsIQAAYAQGKIYBkAKBQAGaAoDDUNQxQwAAxwfBMKgBBCLIxhEYobgmGIXRpFICQTIcBhaGIZRiAKCRTDmHwyRCNIwCLD8QxtDqBY4gOZZXhal4cJTgMaBYi+Pw3DZHcbvBRkewzHQAKgnSjoDhEMg1CTVVYTDKdOSzDyEX7sIAACpOIZQVJVEY1VT8cyxIyEZimSypWqiYJ0Ty6cQwTAIgI")
		oG2antt:SetProperty("Background",87/*exColumnsFloatBackColor*/,0x1000000)
		oG2antt:HeaderHeight := 24
		oG2antt:HeaderAppearance := 4/*Etched*/
		oColumns := oG2antt:Columns()
			oColumns:Add("City")
			oColumns:Add("Start"):Visible := .F.
			oColumns:Add("End"):Visible := .F.
		oG2antt:ColumnsFloatBarVisible := 34/*exColumnsFloatBarVisibleAsChild+exColumnsFloatBarVisibleIncludeCheckColumns*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2355
Change the background of the Columns panel (EBN color)

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

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

	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:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABNoCg6AADACAxRDAMgBQKAAzQFAYahqGKGAAGOD4JhUAIIRZGMIjFDcEwxC6NIpAWLoJDCH4mSTHYxgJIMWwzDiBZgkCA4fiGEYnThCIxzTJ0aw1CKbYRAKCUKoUAJFsSnQAJIgOO4lULPMIhDDQKQTIKBahoehqIhaEQyDSJNb2DCIahhMSEbKtCooDhGFZUWzLVxTJJNawHJqJJDuOTpSjKH4+RjWFKUXR9b4BJSNAgqeCQTiSWZEVxRUS0XbGCyZLSQY7uAAMKgOVoDYzdGLwHTtOwrMa1QAsDSbKqWZ5uRpHcQ5aAGN5DPbMbqwOaqLznAaLQLtG4RTikVRPTDYaj437+OaHGyNbI6HTNPpTlWDJWjYXI8l8C4fg6GYAAEEISgGJJGHQOocgyIwYnqKhYAAIQTH2MYRjQJBRAmZptmEAYIjGU5dk8UgOFgBJUgCTQIBYBoBmCCAmAqApghgDJUDmYQFCCZoEk2OBUm+" +;
		"BZPCgZgagaYZIHYHoHmGWBcm8NwiEiFJVgmYgji4Kg6GKSI2C6C5jAiRgygwIojiycINkyeJmAYPJjkiTg+g+ZAIkCdIQkyWQWDuDxkBkJhKguZAzlIRQzGQc5ODWFJlEkVhWhWZYJFYTYTmUE4yF6F5mAmBhihiZhJhYX4WmQaAUnWGpOlmNhuhuZwJkYcocmcSY4naHZlkmKhrDuJ5JnYfofmgCgGgKIJnlmXJ2h4TQKBosRokoNoOiOaQKDSd4kmiChMncPBpgoZoaiaaZKHaHonmmE5iiKJRpDicomimaoKiaKoqmqSoeiIPgogqPotiyaxKlYPA+GuCqbBMa5KnaPovmwCwGj6LgP24RIhiyCwmkqMpsksNpKD6LQLBqOIzi0SxWlaHZtAOahPssM5Wi+IYtlsXpijKbZ5lyTo5mAE4UlqOpjHOQpEjubyanKPJvEuNgVj2TY1CCao+k2G52AyP5wAwBp9DYZZ1CCaxsAABAEICA")
		oG2antt:SetProperty("Background",87/*exColumnsFloatBackColor*/,0x1000000)
		oG2antt:HeaderHeight := 24
		oG2antt:HeaderAppearance := 4/*Etched*/
		oColumns := oG2antt:Columns()
			oColumns:Add("City")
			oColumns:Add("Start"):Visible := .F.
			oColumns:Add("End"):Visible := .F.
		oG2antt:ColumnsFloatBarVisible := 34/*exColumnsFloatBarVisibleAsChild+exColumnsFloatBarVisibleIncludeCheckColumns*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2354
Change the background of the Columns panel (solid color)

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

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

	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 := 24
		oG2antt:HeaderAppearance := 4/*Etched*/
		oColumns := oG2antt:Columns()
			oColumns:Add("City")
			oColumns:Add("Start"):Visible := .F.
			oColumns:Add("End"):Visible := .F.
		oG2antt:ColumnsFloatBarVisible := 34/*exColumnsFloatBarVisibleAsChild+exColumnsFloatBarVisibleIncludeCheckColumns*/
		oG2antt:SetProperty("Background",87/*exColumnsFloatBackColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2353
Change the visual appearance of the Columns panel

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

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

	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:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABNoCg6AADACAxRDAMgBQKAAzQFAYahqGKGAAGOD4JhUAIIRZGMIjFDcEwxC6NIpAWLoJDCH4mSTHYxgJIMWwzDiBZgkCA4fiGEYnThCIxzTJ0aw1CKbYRAKCUKoUAJFsSnQAJIgOO4lULPMIhDDQKQTIKBahoehqIhaEQyDSJNb2DCIahhMSEbKtCooDhGFZUWzLVxTJJNawHJqJJDuOTpSjKH4+RjWFKUXR9b4BJSNAgqeCQTiSWZEVxRUS0XbGCyZLSQY7uAAMKgOVoDYzdGLwHTtOwrMa1QAsDSbKqWZ5uRpHcQ5aAGN5DPbMbqwOaqLznAaLQLtG4RTikVRPTDYaj437+OaHGyNbI6HTNPpTlWDJWjYXI8l8C4fg6GYAAEEISgGJJGHQOocgyIwYnqKhYAAIQTH2MYRjQJBRAmZptmEAYIjGU5dk8UgOFgBJUgCTQIBYBoBmCCAmAqApghgDJUDmYQFCCZoEk2OBUm+" +;
		"BZPCgZgagaYZIHYHoHmGWBcm8NwiEiFJVgmYgji4Kg6GKSI2C6C5jAiRgygwIojiycINkyeJmAYPJjkiTg+g+ZAIkCdIQkyWQWDuDxkBkJhKguZAzlIRQzGQc5ODWFJlEkVhWhWZYJFYTYTmUE4yF6F5mAmBhihiZhJhYX4WmQaAUnWGpOlmNhuhuZwJkYcocmcSY4naHZlkmKhrDuJ5JnYfofmgCgGgKIJnlmXJ2h4TQKBosRokoNoOiOaQKDSd4kmiChMncPBpgoZoaiaaZKHaHonmmE5iiKJRpDicomimaoKiaKoqmqSoeiIPgogqPotiyaxKlYPA+GuCqbBMa5KnaPovmwCwGj6LgP24RIhiyCwmkqMpsksNpKD6LQLBqOIzi0SxWlaHZtAOahPssM5Wi+IYtlsXpijKbZ5lyTo5mAE4UlqOpjHOQpEjubyanKPJvEuNgVj2TY1CCao+k2G52AyP5wAwBp9DYZZ1CCaxsAABAEICA")
		oG2antt:SetProperty("Background",92/*exColumnsFloatAppearance*/,0x1000000)
		oG2antt:SetProperty("Background",93/*exColumnsFloatCaptionBackColor*/,AutomationTranslateColor( GraMakeRGBColor  ( { 246,246,246 } )  , .F. ))
		oG2antt:SetProperty("BackColorHeader",0x1000000)
		oG2antt:HeaderHeight := 24
		oG2antt:HeaderAppearance := 4/*Etched*/
		oColumns := oG2antt:Columns()
			oColumns:Add("City")
			oColumns:Add("Start"):Visible := .F.
			oColumns:Add("End"):Visible := .F.
		oG2antt:SetProperty("Description",26/*exColumnsFloatBar*/,"Show/Hide")
		oG2antt:ColumnsFloatBarVisible := 2/*exColumnsFloatBarVisibleIncludeCheckColumns*/
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2352
Defines the symbol used to indicate repeated captions, providing a clear visual cue for identical entries (ditto mark)

#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:HeaderAppearance := 4/*Etched*/
		oG2antt:HeaderHeight := 24
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oG2antt:Columns():Add("Country"):ShowIdem := "<fgcolor gray>〃"
		oItems := oG2antt:Items()
			oItems:AddItem("Spain")
			oItems:AddItem("Spain")
			oItems:AddItem("Spain")
			oItems:AddItem("Spain")
			oItems:AddItem("Germany")
			oItems:AddItem("Germany")
			oItems:AddItem("Germany")
			oItems:AddItem("Germany")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2351
Defines the symbol used to indicate repeated captions, providing a clear visual cue for identical entries (space)

#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:HeaderAppearance := 4/*Etched*/
		oG2antt:HeaderHeight := 24
		oG2antt:DrawGridLines := -2/*exRowLines*/
		oG2antt:Columns():Add("Country"):ShowIdem := " "
		oItems := oG2antt:Items()
			oItems:AddItem("Spain")
			oItems:AddItem("Spain")
			oItems:AddItem("Spain")
			oItems:AddItem("Spain")
			oItems:AddItem("Germany")
			oItems:AddItem("Germany")
			oItems:AddItem("Germany")
			oItems:AddItem("Germany")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2350
Displays a glitch funnel for drop-down filter buttons (empty or active)

#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

	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 := -1
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABa8IQAAYAQGKIYBkAKBQAGaAoDDUNQxQwAAxwfBMKgBBCLIxhEYobgmGIXRpFMbxCKQahLEiTIhGUYJHgmK4tRiAUgxVDkBxrECZYqjcBZOiwLQ2TxDM7DNKUCBnIoABhGOaYDh+IQNQjUFKwTRFGRxK4EIRKAyTDLQdRyGSMMbjdQpBCbMiMRqhESKRq2UwYRYCFS1NalaztO6BUAvK67YrWez/YBfF+SfwGeqDYReWAPfgWERnQrGMLxbD8KwZAKTRjkGJ4XhuB41TbQMqufL9ByXHKSSDpGjaXjeO5VVjYNAvS69UzXNq3bhtQAOXCMEwCgI=")
			oAppearance:Add(2,"CP:1 -2 0 0 0")
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/
		oG2antt:ShowFocusRect := .F.
		oG2antt:SetProperty("Background",0/*exHeaderFilterBarButton*/,0x2000000)
		oG2antt:SetProperty("Background",41/*exHeaderFilterBarActive*/,0x2000001)
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:SetProperty("BackColorHeader",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oG2antt:HeaderHeight := 24
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oColumn := oG2antt:Columns():Add("1st col")
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:Filter := "Item B"
			oColumn:FilterType := 240/*exFilter*/
		oG2antt:Columns():Add("2nd col")
		oItems := oG2antt:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

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

#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:ScrollBySingleLine := .T.
		oG2antt:HeaderAppearance := 1/*Flat*/
		oG2antt:Columns():Add("Type")
		oG2antt:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:AllowLinkBars := .F.
			oChart:ResizeUnitScale := 65536/*exHour*/
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars():CallMethod("Copy","Task","T1")
				oBar:OverlaidType := 4/*exOverlaidBarsCascade*/
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%9%>")
			oBar1 := oChart:Bars():CallMethod("Copy","Task","T2")
				oBar1:OverlaidType := 515/*exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
				oBar1:SetProperty("Def",3/*exBarCaption*/,"<%=%9%>")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Cascade")
			oItems:AddBar(h,"T1","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h,"T1","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h,"T1","01/04/2001","01/07/2001","A3")
			oItems:AddBar(h,"T1","01/02/2001","01/07/2001","A4")
			oItems:AddBar(h,"T1","01/08/2001","01/12/2001","A5")
			oItems:AddBar(h,"T1","01/08/2001","01/12/2001","A6")
			oItems:AddBar(h,"T1","01/08/2001","01/12/2001","A7")
			oItems:AddBar(h,"T1","01/08/2001","01/12/2001","A8")
			oItems:AddBar(h,"T1","01/08/2001","01/12/2001","A9")
			oItems:AddBar(h,"T1","01/08/2001","01/12/2001","AA")
			h := oItems:AddItem("Stack-AutoArrange")
			oItems:AddBar(h,"T2","01/02/2001","01/04/2001","A1")
			oItems:AddBar(h,"T2","01/03/2001","01/05/2001","A2")
			oItems:AddBar(h,"T2","01/04/2001","01/07/2001","A3")
			oItems:AddBar(h,"T2","01/02/2001","01/07/2001","A4")
			oItems:AddBar(h,"T2","01/08/2001","01/12/2001","A5")
			oItems:AddBar(h,"T2","01/08/2001","01/12/2001","A6")
			oItems:AddBar(h,"T2","01/08/2001","01/12/2001","A7")
			oItems:AddBar(h,"T2","01/08/2001","01/12/2001","A8")
			oItems:AddBar(h,"T2","01/08/2001","01/12/2001","A9")
			oItems:AddBar(h,"T2","01/08/2001","01/12/2001","AA")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2348
Horizontally(left) align the multi-line caption of the bar

#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("Task")
		oG2antt:HeaderAppearance := 4/*Etched*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			oItems:SetProperty("SelectableItem",oItems:AddItem(),.F.)
			h := oItems:AddItem("Task 1")
			oItems:SetProperty("ItemHeight",h,42)
			oItems:AddBar(h,"Task","01/02/2001","01/07/2001","K1","This is a bit of 1'st line<br>2'nd line<br>3'rd line")
			oItems:SetProperty("ItemBar",h,"K1",4/*exBarHAlignCaption*/,0)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2347
Defines the colors, to display overlapping links

#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 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:BeginUpdate()
		oG2antt:Columns():Add("Name")
		oG2antt:AntiAliasing := .T.
		oG2antt:OverlapLinksColors := "black,gray,lightgray"
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:ShowLinks := 642/*exChangeColorOnOverlap+exPreventOverlapMixt+exShowDefaultLinks*/
			oChart:NonworkingDays := 0
			oChart:LinksStyle := 0/*exLinkSolid*/
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h1 := oItems:AddItem("Item 1")
			oItems:AddBar(h1,"Task","01/03/2001","01/06/2001","A")
			oItems:AddBar(h1,"Task","01/08/2001","01/11/2001","B")
			oItems:AddBar(h1,"Task","01/13/2001","01/16/2001","C")
			oItems:AddBar(h1,"Task","01/18/2001","01/21/2001","D")
			oItems:AddLink("Link1",h1,"D",h1,"A")
			oItems:AddLink("Link2",h1,"C",h1,"B")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2346
The exPreventOverlapMixt option can be combined with the exChangeColorOnOverlap flag, allowing overlapping links to alternately adjust their width while also changing colors

#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 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:BeginUpdate()
		oG2antt:Columns():Add("Name")
		oG2antt:AntiAliasing := .T.
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:ShowLinks := 642/*exChangeColorOnOverlap+exPreventOverlapMixt+exShowDefaultLinks*/
			oChart:NonworkingDays := 0
			oChart:LinksStyle := 0/*exLinkSolid*/
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h1 := oItems:AddItem("Item 1")
			oItems:AddBar(h1,"Task","01/03/2001","01/06/2001","A")
			oItems:AddBar(h1,"Task","01/08/2001","01/11/2001","B")
			oItems:AddBar(h1,"Task","01/13/2001","01/16/2001","C")
			oItems:AddBar(h1,"Task","01/18/2001","01/21/2001","D")
			oItems:AddLink("Link1",h1,"D",h1,"A")
			oItems:AddLink("Link2",h1,"C",h1,"B")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2345
The exChangeColorOnOverlap flag changes the color for links in areas where they overlap with other links, enhancing clarity and distinction between them

#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 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:BeginUpdate()
		oG2antt:AntiAliasing := .T.
		oG2antt:Columns():Add("Name")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:ShowLinks := 514/*exChangeColorOnOverlap+exShowDefaultLinks*/
			oChart:NonworkingDays := 0
			oChart:LinksStyle := 0/*exLinkSolid*/
		oItems := oG2antt:Items()
			oItems:AddItem("")
			h1 := oItems:AddItem("Item 1")
			oItems:AddBar(h1,"Task","01/03/2001","01/06/2001","A")
			oItems:AddBar(h1,"Task","01/08/2001","01/11/2001","B")
			oItems:AddBar(h1,"Task","01/13/2001","01/16/2001","C")
			oItems:AddBar(h1,"Task","01/18/2001","01/21/2001","D")
			oItems:AddLink("Link1",h1,"D",h1,"A")
			oItems:AddLink("Link2",h1,"C",h1,"B")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2344
How can I assign a multiple-lines caption to an bar

#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("Task")
		oG2antt:HeaderAppearance := 4/*Etched*/
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			oItems:SetProperty("SelectableItem",oItems:AddItem(),.F.)
			h := oItems:AddItem("Task 1")
			oItems:SetProperty("ItemHeight",h,42)
			oItems:AddBar(h,"Task","01/02/2001","01/07/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",3/*exBarCaption*/,"This is a bit of 1'st line<br>2'nd line<br>3'rd line")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2343
The text on the chart overlap the rest of the bars, while using OverlaidType property on exOverlaidBarsStack

#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()
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:FirstVisibleDate := "01/03/2002"
			oChart:LevelCount := 2
			oChart:FirstWeekDay := 1/*exMonday*/
			oChart:Bars():Add("Text"):SetProperty("Def",4/*exBarHAlignCaption*/,0)
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,0)
				oBar:OverlaidType := 4611/*exOverlaidBarsIncludeCaption+exOverlaidBarsStackAutoArrange+exOverlaidBarsStack*/
				oBar:OverlaidGroup := "Text,Task"
		oG2antt:Columns():Add("Task")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Default")
			oItems:AddBar(h,"Text","01/04/2002","01/04/2002","","This is another text")
			oItems:AddBar(h,"Task","01/06/2002","01/08/2002","A","This is a bit of text")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2342
We are running our application on an Azure server using RDP, with the server language set to English. However, my client has their national language set to Swedish, but the tooltip is displaying dates in the English format (mm/dd/yyyy) instead of the Swedish format (yyyy-mm-dd) (method 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
	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("Def")
		oChart := oG2antt:Chart()
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2010"
			oChart:Bars:Item("Task"):SetProperty("Def",6/*exBarToolTip*/,"<%=`Start: ` + (date(%1) format `yyyy-MM-dd` )%>")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A")
			oItems:AddBar(h,"Task","01/05/2010","01/08/2010","B","B")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2341
We are running our application on an Azure server using RDP, with the server language set to English. However, my client has their national language set to Swedish, but the tooltip is displaying dates in the English format (mm/dd/yyyy) instead of the Swedish format (yyyy-mm-dd) (method 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
	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("Def")
		oChart := oG2antt:Chart()
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2010"
			oChart:Bars:Item("Task"):SetProperty("Def",6/*exBarToolTip*/,"<%=`Start: ` + year(%1) + `-` + (month(%1) lpad `00`) + `-` + (day(%1) lpad `00`)%>")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A")
			oItems:AddBar(h,"Task","01/05/2010","01/08/2010","B","B")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2340
How can I replace or add an icon at runtime

#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:ReplaceIcon("gAAAABgYACEHgUJFEEAAWhUJCEJEEJggEhMCYEXjUbjkJQECj8gj8hAEjkshYEpk8kf8ClsulsvAExmcvf83js5nU7nkCeEcn8boMaocXosCB9Hn09pkzcEuoL/fE+OkYB0gB9YhIHrddgVcr9aktZADAD8+P8CgIA==")
		oG2antt:ReplaceIcon("C:\images\favicon.ico",0)
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,128)
			oChart:LevelCount := 2
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task 1")
			oItems:AddBar(h,"Task","01/02/2001","01/06/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",3/*exBarCaption*/,"<img>1</img>")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2339
How can I define the sensitivity for link selection when the user clicks or selects a link
PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	DevOut( Transform(oG2antt:Chart:LinkFromPoint(-1,-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
	LOCAL h1,h2,h3

	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("Task")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "12/29/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
			oChart:LinksWidth := 1026
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			oItems:AddItem()
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/08/2001","01/10/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:AddItem()
			h3 := oItems:AddItem("Task 3")
			oItems:AddBar(h3,"Task","01/14/2001","01/16/2001","K3")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2338
How can I let the user to create task-bars for leaf0-items only, when AllowCreateBar is exCreateBarAuto
PROCEDURE OnCreateBar(oG2antt,Item,DateStart,DateEnd)
	LOCAL oItems
	oItems := oG2antt:Items()
		DevOut( "Call RemoveBar if the ChildCount property returns a non-zero value" )
		DevOut( Transform(oItems:ChildCount(Item),"") )
		oItems:RemoveBar(Item,"newbar")
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
	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:CreateBar := {|Item,DateStart,DateEnd| OnCreateBar(oG2antt,Item,DateStart,DateEnd)} /*Fired when the user creates a new bar.*/

		oG2antt:BeginUpdate()
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oG2antt:HeaderVisible := 1/*exHeaderVisibleExtendLevels*/
		oG2antt:HeaderAppearance := 4/*Etched*/
		oChart := oG2antt:Chart()
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,128)
		oG2antt:Columns():Add("Task")
		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
2337
How can I convert the exBarStart/exBarEnd property to a string (by default it returns as VARIANT/VT_DATE type, method 3)

PROCEDURE OnBarResizing(oG2antt,Item,Key)
	DevOut( "Start" )
	DevOut( Transform(Key,"") )
	DevOut( Transform(oG2antt:Items:ItemBar(Item,Key,547/*exBarStartStr*/),"") )
	DevOut( "End" )
	DevOut( Transform(Key,"") )
	DevOut( Transform(oG2antt:Items:ItemBar(Item,Key,548/*exBarEndStr*/),"") )
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()
		oG2antt:Columns():Add("Tasks")
		oG2antt:Debug := .T.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:ResizeUnitScale := 1048576/*exMinute*/
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","09/21/2006","09/24/2006","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","09/22/2006","09/25/2006","K2")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","09/23/2006","09/26/2006","K3")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2336
How can I convert the exBarStart/exBarEnd property to a string (by default it returns as VARIANT/VT_DATE type, method 2)

PROCEDURE OnBarResizing(oG2antt,Item,Key)
	DevOut( "Start" )
	DevOut( Transform(Key,"") )
	DevOut( Transform(oG2antt:FormatABC("dateF(value)",oG2antt:Items:ItemBar(Item,Key,1/*exBarStart*/)),"") )
	DevOut( "End" )
	DevOut( Transform(Key,"") )
	DevOut( Transform(oG2antt:FormatABC("dateF(value)",oG2antt:Items:ItemBar(Item,Key,2/*exBarEnd*/)),"") )
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()
		oG2antt:Columns():Add("Tasks")
		oG2antt:Debug := .T.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:ResizeUnitScale := 1048576/*exMinute*/
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","09/21/2006","09/24/2006","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","09/22/2006","09/25/2006","K2")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","09/23/2006","09/26/2006","K3")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2335
How can I convert the exBarStart/exBarEnd property to a string (by default it returns as VARIANT/VT_DATE type, method 1)

PROCEDURE OnBarResizing(oG2antt,Item,Key)
	DevOut( "Start" )
	DevOut( Transform(Key,"") )
	DevOut( Transform(oG2antt:FormatABC("date(value) format `MM/dd/yyyy HH:mm:ss`",oG2antt:Items:ItemBar(Item,Key,1/*exBarStart*/)),"") )
	DevOut( "End" )
	DevOut( Transform(Key,"") )
	DevOut( Transform(oG2antt:FormatABC("date(value) format `MM/dd/yyyy HH:mm:ss`",oG2antt:Items:ItemBar(Item,Key,2/*exBarEnd*/)),"") )
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()
		oG2antt:Columns():Add("Tasks")
		oG2antt:Debug := .T.
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "09/20/2006"
			oChart:LevelCount := 2
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:ResizeUnitScale := 1048576/*exMinute*/
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Task 1"),"Task","09/21/2006","09/24/2006","K1")
			oItems:AddBar(oItems:AddItem("Task 2"),"Task","09/22/2006","09/25/2006","K2")
			oItems:AddBar(oItems:AddItem("Task 3"),"Task","09/23/2006","09/26/2006","K3")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2334
Add/Remove/Updates the item-bar's resources

PROCEDURE OnClick(oG2antt)
	LOCAL oItems
	LOCAL h
	oItems := oG2antt:Items()
		h := oItems:SelectedItem(0)
		oItems:SetProperty("ItemBar",h,oItems:FirstItemBar(h),49/*exBarResources*/,"+R4[10%]")
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

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

		oG2antt:BeginUpdate()
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:HeaderHeight := 24
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%49%>")
		oG2antt:Columns():Add("Machines")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Machine 1")
			oItems:AddBar(h,"Task","01/06/2001","01/12/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",49/*exBarResources*/,"R1,R2")
			h := oItems:AddItem("Machine 2")
			oItems:AddBar(h,"Task","01/04/2001","01/14/2001","K2")
			oItems:SetProperty("ItemBar",h,"K2",49/*exBarResources*/,"R2[75%],R3")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2333
Distributes resources to a bar

#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:HeaderAppearance := 4/*Etched*/
		oG2antt:HeaderHeight := 24
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,96)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2001"
			oBar := oChart:Bars:Item("Task")
				oBar:SetProperty("Def",4/*exBarHAlignCaption*/,18)
				oBar:SetProperty("Def",3/*exBarCaption*/,"<%=%49%>")
		oG2antt:Columns():Add("Machines")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Machine 1")
			oItems:AddBar(h,"Task","01/06/2001","01/12/2001","K1")
			oItems:SetProperty("ItemBar",h,"K1",49/*exBarResources*/,"R1,R2")
			h := oItems:AddItem("Machine 2")
			oItems:AddBar(h,"Task","01/04/2001","01/14/2001","K2")
			oItems:SetProperty("ItemBar",h,"K2",49/*exBarResources*/,"R2[75%],R3")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2332
How can I display additional information about a time zone when the user clicks on it (expandable)

#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} )

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/20/2009"
			oChart:MarkTimeZone("TZ","01/01/2010","01/03/2010",65280,"1;;<c>TimeZone<b><off -4><a ;exp=just more info about>*</a></b>;1")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2331
How can I have a tooltip for a marked TimeZone

PROCEDURE OnMouseMove(oG2antt,Button,Shift,X,Y)
	oG2antt:ShowToolTip(oG2antt:Chart:TimeZoneFromPoint(-1,-1),"",,"+8")
RETURN

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

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2009"
			oChart:MarkTimeZone("Top","01/01/2010","01/05/2010",16711680,"1;;<fgcolor=FFFFFF>Top;1")
			oChart:MarkTimeZone("Partial","01/08/2010","01/12/2010",16711680,"50;;<fgcolor=FFFFFF>Partial;1")
			oChart:MarkTimeZone("Default","01/15/2010","01/19/2010",16711680,";;<fgcolor=FFFFFF>Default;1")

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2330
Can I set a filter that automatically adds a * before and after the word, so the user can just search for 'cat' and it becomes '*cat*' automatically

#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
	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:HeaderAppearance := 4/*Etched*/
		oG2antt:HeaderHeight := 24
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oG2antt:Columns():Add("Items")
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .T.
			oColumn:SetProperty("Def",21/*exFilterPatternTemplate*/,"*<%filter%>*")
			oColumn:FilterType := 3/*exPattern*/
			oColumn:Filter := "1"
		oItems := oG2antt:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
		oG2antt:ApplyFilter()
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2329
The fine dotted lines in the control appear much thicker than the standard ones we've been using. How can we fix this

#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()
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:HeaderHeight := 24
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/
		oChart := oG2antt:Chart()
			oChart:GridLineStyle := 512/*exGridLinesGeometric*/
			oChart:DrawGridLines := -1/*exAllLines*/
		oG2antt:ColumnAutoResize := .F.
		oG2antt:Columns():Add("Column 1")
		oG2antt:Columns():Add("Column 2")
		oG2antt:Columns():Add("Column 3")
		oG2antt:Columns():Add("Column 4")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2328
Load data as a tree using a parent-id relationship

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

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

	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 := .F.
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:HeaderHeight := 24
		oG2antt:DrawGridLines := 2/*exVLines*/
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		rs := CreateObject("ADODB.Recordset")
			rs:Open("Select * FROM Employees WHERE 1=0","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.mdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:DataSource := rs
		oG2antt:Columns:Item(0):Width := 128
		rs := CreateObject("ADODB.Recordset")
			rs:Open("Employees","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExG2antt\Sample\Access\misc.mdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oG2antt:PutItems(rs:GetRows(),";0;17")
		oG2antt:Items():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
2327
Is there a way to change the contents of the drop down editor based on a value in another column

PROCEDURE OnAddItem(oG2antt,Item)
	oG2antt:Items():SetProperty("CellEditorVisible",Item,0,1/*exEditorVisible*/)
	oG2antt:Items():SetProperty("CellEditorVisible",Item,1,1/*exEditorVisible*/)
RETURN

PROCEDURE OnEditOpen(oG2antt)
	LOCAL oEditor
	LOCAL oItems
	LOCAL c,v
	oItems := oG2antt:Items()
		v := oItems:CellValue(oItems:FocusItem(),0)
		c := oItems:CellCaption(oItems:FocusItem(),0)
	oEditor := oG2antt:Columns:Item(1):Editor()
		oEditor:ClearItems()
		oEditor:AddItem(v,Transform(c,""))
RETURN

#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 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:EditOpen := {|| OnEditOpen(oG2antt)} /*Occurs when the edit operation starts.*/

		oG2antt:BeginUpdate()
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:HeaderHeight := 24
		oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/
		oColumn := oG2antt:Columns():Add("DropDownList")
			oEditor := oColumn:Editor()
				oEditor:EditType := 3/*DropDownListType*/
				oEditor:AddItem(1,"First")
				oEditor:AddItem(2,"Second")
				oEditor:AddItem(3,"Third")
		oG2antt:DrawGridLines := -1/*exAllLines*/
		oG2antt:Columns():Add("DropDownList-Related"):Editor():EditType := 3/*DropDownListType*/
		oItems := oG2antt:Items()
			oItems:SetProperty("CellValue",oItems:AddItem(1),1,-1)
			oItems:SetProperty("CellValue",oItems:AddItem(2),1,-1)
			oItems:SetProperty("CellValue",oItems:AddItem(3),1,-1)
			oItems:SetProperty("LockedItemCount",2/*exBottom*/,1)
			h := oItems:LockedItem(2/*exBottom*/,0)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemDividerLineAlignment",h,2/*DividerTop*/)
			oItems:SetProperty("CellEditorVisible",h,0,0/*exEditorHidden*/)
			oItems:SetProperty("CellSingleLine",h,0,0/*exCaptionWordWrap*/)
			oItems:SetProperty("CellValueFormat",h,0,1/*exHTML*/)
			oItems:SetProperty("CellValue",h,0,"The drop down editor in the second column is filled during the <b>EditOpen event</b>, and the values are based on the selection on the first column.")
		oG2antt:EndUpdate()

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

PROCEDURE OnChange(oG2antt,Item,ColIndex,NewValue)
	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 oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oConditionalFormat,oConditionalFormat1,oConditionalFormat2
	LOCAL oConditionalFormats
	LOCAL oItems
	LOCAL g1,g2,h,r

	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:HeaderAppearance := 4/*Etched*/
		oG2antt:HeaderHeight := 24
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oConditionalFormats := oG2antt:ConditionalFormats()
			oConditionalFormat := oConditionalFormats:Add("%CE1")
				oConditionalFormat:Bold := .T.
				oConditionalFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 245,245,245 } )  , .F. ))
				oConditionalFormat:ApplyTo := 1/*0x1+*/
			oConditionalFormat1 := oConditionalFormats:Add("%CE2")
				oConditionalFormat1:Bold := .T.
				oConditionalFormat1:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 245,245,245 } )  , .F. ))
				oConditionalFormat1:ApplyTo := 2/*0x2+*/
			oConditionalFormat2 := oConditionalFormats:Add("%CE3")
				oConditionalFormat2:Bold := .T.
				oConditionalFormat2:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 245,245,245 } )  , .F. ))
				oConditionalFormat2:ApplyTo := 3/*0x3+*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Description")
			oColumn := oColumns:Add("Qty")
				oColumn:Editor():EditType := 4/*SpinType*/
				oColumn:SetProperty("Def",20/*exTotalColumn*/,"sum(current,rec,%1)")
			oColumn1 := oColumns:Add("Price")
				oColumn1:SetProperty("Def",20/*exTotalColumn*/,"avg(current,rec,%2)")
				oColumn1:Editor():EditType := 4/*SpinType*/
			oColumn2 := oColumns:Add("Amount")
				oColumn2:ComputedField := "%1 * %2"
				oColumn2:SetProperty("Def",20/*exTotalColumn*/,"sum(current,rec,%3)")
		oItems := oG2antt:Items()
			r := oItems:AddItem("Root")
			g1 := oItems:InsertItem(r,,"Group 1")
			h := oItems:InsertItem(g1,,"Item 1")
			oItems:SetProperty("CellValue",h,1,1)
			oItems:SetProperty("CellValue",h,2,10)
			h := oItems:InsertItem(g1,,"Item 2")
			oItems:SetProperty("CellValue",h,1,2)
			oItems:SetProperty("CellValue",h,2,11)
			g2 := oItems:InsertItem(r,,"Group 2")
			h := oItems:InsertItem(g2,,"Item 1")
			oItems:SetProperty("CellValue",h,1,3)
			oItems:SetProperty("CellValue",h,2,12)
			h := oItems:InsertItem(g2,,"Item 2")
			oItems:SetProperty("CellValue",h,1,4)
			oItems:SetProperty("CellValue",h,2,13)
			oItems:SetProperty("ExpandItem",0,.T.)
		oG2antt:EndUpdate()
		oG2antt:FreezeEvents(.F.)

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

PROCEDURE OnChange(oG2antt,Item,ColIndex,NewValue)
	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 oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oConditionalFormat,oConditionalFormat1,oConditionalFormat2
	LOCAL oConditionalFormats
	LOCAL oItems
	LOCAL g1,g2,h,r

	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:HeaderAppearance := 4/*Etched*/
		oG2antt:HeaderHeight := 24
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oConditionalFormats := oG2antt:ConditionalFormats()
			oConditionalFormat := oConditionalFormats:Add("%CT1")
				oConditionalFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
				oConditionalFormat:ApplyTo := 1/*0x1+*/
			oConditionalFormat1 := oConditionalFormats:Add("%CT2")
				oConditionalFormat1:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
				oConditionalFormat1:ApplyTo := 2/*0x2+*/
			oConditionalFormat2 := oConditionalFormats:Add("%CT3")
				oConditionalFormat2:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
				oConditionalFormat2:ApplyTo := 3/*0x3+*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Description")
			oColumn := oColumns:Add("Qty")
				oColumn:Editor():EditType := 4/*SpinType*/
				oColumn:SetProperty("Def",20/*exTotalColumn*/,"sum(current,rec,%1)")
			oColumn1 := oColumns:Add("Price")
				oColumn1:SetProperty("Def",20/*exTotalColumn*/,"avg(current,rec,%2)")
				oColumn1:Editor():EditType := 4/*SpinType*/
			oColumn2 := oColumns:Add("Amount")
				oColumn2:ComputedField := "%1 * %2"
				oColumn2:SetProperty("Def",20/*exTotalColumn*/,"sum(current,rec,%3)")
		oItems := oG2antt:Items()
			r := oItems:AddItem("Root")
			g1 := oItems:InsertItem(r,,"Group 1")
			h := oItems:InsertItem(g1,,"Item 1")
			oItems:SetProperty("CellValue",h,1,1)
			oItems:SetProperty("CellValue",h,2,10)
			h := oItems:InsertItem(g1,,"Item 2")
			oItems:SetProperty("CellValue",h,1,2)
			oItems:SetProperty("CellValue",h,2,11)
			g2 := oItems:InsertItem(r,,"Group 2")
			h := oItems:InsertItem(g2,,"Item 1")
			oItems:SetProperty("CellValue",h,1,3)
			oItems:SetProperty("CellValue",h,2,12)
			h := oItems:InsertItem(g2,,"Item 2")
			oItems:SetProperty("CellValue",h,1,4)
			oItems:SetProperty("CellValue",h,2,13)
			oItems:SetProperty("ExpandItem",0,.T.)
		oG2antt:EndUpdate()
		oG2antt:FreezeEvents(.F.)

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

#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
	LOCAL h,hR

	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:ConditionalFormats():Add("%CC0=0"):SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:HeaderHeight := 24
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Item"):Width := 16
			oColumns:Add("Desc")
		oItems := oG2antt:Items()
			hR := oItems:AddItem("Root")
			oItems:SetProperty("CellValue",hR,1,"The root directory /")
			oItems:SetProperty("ExpandItem",hR,.T.)
			h := oItems:InsertItem(hR,,"Home")
			oItems:SetProperty("CellValue",h,1,"The home directory with user directories Alice and Bob")
			oItems:InsertItem(h,,"Alice")
			oItems:InsertItem(h,,"Bob")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:InsertItem(hR,,"Etc")
			oItems:SetProperty("CellValue",h,1,"The etc directory with one configuration file")
			h := oItems:InsertItem(h,,"nginx.conf")
			oItems:SetProperty("CellValue",oItems:InsertItem(hR,,"Var"),1,"The var directory")
		oG2antt:EndUpdate()

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

#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
	LOCAL h,hR

	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:ConditionalFormats():Add("%CC0"):SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:HeaderHeight := 24
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Item"):Width := 16
			oColumns:Add("Desc")
		oItems := oG2antt:Items()
			hR := oItems:AddItem("Root")
			oItems:SetProperty("CellValue",hR,1,"The root directory /")
			oItems:SetProperty("ExpandItem",hR,.T.)
			h := oItems:InsertItem(hR,,"Home")
			oItems:SetProperty("CellValue",h,1,"The home directory with user directories Alice and Bob")
			oItems:InsertItem(h,,"Alice")
			oItems:InsertItem(h,,"Bob")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:InsertItem(hR,,"Etc")
			oItems:SetProperty("CellValue",h,1,"The etc directory with one configuration file")
			h := oItems:InsertItem(h,,"nginx.conf")
			oItems:SetProperty("CellValue",oItems:InsertItem(hR,,"Var"),1,"The var directory")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2322
Highlight the item being expanded or collapsed

#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
	LOCAL h,hR

	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:ConditionalFormats():Add("%CX0"):Bold := .T.
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:HeaderHeight := 24
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Item"):Width := 16
			oColumns:Add("Desc")
		oItems := oG2antt:Items()
			hR := oItems:AddItem("Root")
			oItems:SetProperty("CellValue",hR,1,"The root directory /")
			oItems:SetProperty("ExpandItem",hR,.T.)
			h := oItems:InsertItem(hR,,"Home")
			oItems:SetProperty("CellValue",h,1,"The home directory with user directories Alice and Bob")
			oItems:InsertItem(h,,"Alice")
			oItems:InsertItem(h,,"Bob")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:InsertItem(hR,,"Etc")
			oItems:SetProperty("CellValue",h,1,"The etc directory with one configuration file")
			h := oItems:InsertItem(h,,"nginx.conf")
			oItems:SetProperty("CellValue",oItems:InsertItem(hR,,"Var"),1,"The var directory")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2321
I am using exTotalColumn. Is there an option to exclude specific cells to display the total

PROCEDURE OnChange(oG2antt,Item,ColIndex,NewValue)
	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 oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oItems
	LOCAL g1,g2,h,r

	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:HeaderAppearance := 4/*Etched*/
		oG2antt:HeaderHeight := 24
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Description")
			oColumn := oColumns:Add("Qty")
				oColumn:Editor():EditType := 4/*SpinType*/
				oColumn:SetProperty("Def",20/*exTotalColumn*/,"sum(current,rec,%1)")
			oColumn1 := oColumns:Add("Price")
				oColumn1:SetProperty("Def",20/*exTotalColumn*/,"avg(current,rec,%2)")
				oColumn1:Editor():EditType := 4/*SpinType*/
			oColumn2 := oColumns:Add("Amount")
				oColumn2:ComputedField := "%1 * %2"
				oColumn2:SetProperty("Def",20/*exTotalColumn*/,"sum(current,rec,%3)")
		oItems := oG2antt:Items()
			r := oItems:AddItem("Root")
			g1 := oItems:InsertItem(r,,"Group 1")
			oItems:SetProperty("FormatCell",g1,2,"`<average missing>`")
			oItems:SetProperty("CellEditorVisible",g1,2,0/*exEditorHidden*/)
			oItems:SetProperty("CellBold",g1,2,.T.)
			oItems:SetProperty("CellForeColor",g1,2,AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
			h := oItems:InsertItem(g1,,"Item 1")
			oItems:SetProperty("CellValue",h,1,1)
			oItems:SetProperty("CellValue",h,2,10)
			h := oItems:InsertItem(g1,,"Item 2")
			oItems:SetProperty("CellValue",h,1,2)
			oItems:SetProperty("CellValue",h,2,11)
			g2 := oItems:InsertItem(r,,"Group 2")
			h := oItems:InsertItem(g2,,"Item 1")
			oItems:SetProperty("CellValue",h,1,3)
			oItems:SetProperty("CellValue",h,2,12)
			h := oItems:InsertItem(g2,,"Item 2")
			oItems:SetProperty("CellValue",h,1,4)
			oItems:SetProperty("CellValue",h,2,13)
			oItems:SetProperty("ExpandItem",0,.T.)
		oG2antt:EndUpdate()
		oG2antt:FreezeEvents(.F.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2320
How can I add a total column

PROCEDURE OnChange(oG2antt,Item,ColIndex,NewValue)
	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 oColumn,oColumn1,oColumn2
	LOCAL oColumns
	LOCAL oItems
	LOCAL g1,g2,h,r

	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:HeaderAppearance := 4/*Etched*/
		oG2antt:HeaderHeight := 24
		oG2antt:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumns := oG2antt:Columns()
			oColumns:Add("Description")
			oColumn := oColumns:Add("Qty")
				oColumn:Editor():EditType := 4/*SpinType*/
				oColumn:SetProperty("Def",20/*exTotalColumn*/,"sum(current,rec,%1)")
			oColumn1 := oColumns:Add("Price")
				oColumn1:SetProperty("Def",20/*exTotalColumn*/,"avg(current,rec,%2)")
				oColumn1:Editor():EditType := 4/*SpinType*/
			oColumn2 := oColumns:Add("Amount")
				oColumn2:ComputedField := "%1 * %2"
				oColumn2:SetProperty("Def",20/*exTotalColumn*/,"sum(current,rec,%3)")
		oItems := oG2antt:Items()
			r := oItems:AddItem("Root")
			g1 := oItems:InsertItem(r,,"Group 1")
			h := oItems:InsertItem(g1,,"Item 1")
			oItems:SetProperty("CellValue",h,1,1)
			oItems:SetProperty("CellValue",h,2,10)
			h := oItems:InsertItem(g1,,"Item 2")
			oItems:SetProperty("CellValue",h,1,2)
			oItems:SetProperty("CellValue",h,2,11)
			g2 := oItems:InsertItem(r,,"Group 2")
			h := oItems:InsertItem(g2,,"Item 1")
			oItems:SetProperty("CellValue",h,1,3)
			oItems:SetProperty("CellValue",h,2,12)
			h := oItems:InsertItem(g2,,"Item 2")
			oItems:SetProperty("CellValue",h,1,4)
			oItems:SetProperty("CellValue",h,2,13)
			oItems:SetProperty("ExpandItem",0,.T.)
		oG2antt:EndUpdate()
		oG2antt:FreezeEvents(.F.)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2319
Is it possible when I move the horizontal scroll bar, that the whole chart scrolls live during move the horizontal scroll bar. Not it scrolls just when I release the left mouse, not during change the horizontal scroll position
#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} )

		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,0)
			oChart:LevelCount := 2
			oChart:ToolTip := ""

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2318
The exLinkStyle is not valid (the style of the link is still solid) if the link's width is greater than 1. What can be done
#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 h1,h2,h3

	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")
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "01/01/2001"
			oChart:SetProperty("PaneWidth",.F.,128)
		oG2antt:AntiAliasing := .T.
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Task 1")
			oItems:AddBar(h1,"Task","01/02/2001","01/04/2001","K1")
			h2 := oItems:AddItem("Task 2")
			oItems:AddBar(h2,"Task","01/05/2001","01/07/2001","K2")
			oItems:AddLink("L1",h1,"K1",h2,"K2")
			oItems:SetProperty("Link","L1",9/*exLinkStyle*/,2)
			oItems:SetProperty("Link","L1",10/*exLinkWidth*/,2)
			h3 := oItems:AddItem("Task 4")
			oItems:AddBar(h3,"Task","01/08/2001","01/10/2001","K3")
			oItems:AddLink("L2",h2,"K2",h3,"K3")
			oItems:SetProperty("Link","L2",9/*exLinkStyle*/,1)
			oItems:SetProperty("Link","L2",10/*exLinkWidth*/,2)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2317
How can I change the tooltip's margins (method 2)

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

		oG2antt:BeginUpdate()
		oG2antt:ToolTipMargin := "16,8"
		oG2antt:Columns():Add("Def")
		oChart := oG2antt:Chart()
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2010"
			oChart:Bars:Item("Task"):SetProperty("Def",6/*exBarToolTip*/,"...")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A")
			oItems:AddBar(h,"Task","01/05/2010","01/08/2010","B","B")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2316
Are there any properties to set text margins at tooltip, like Margins="5,5" (method 1). Margins is used to get some space between text and the tooltips border

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

		oG2antt:BeginUpdate()
		oG2antt:ToolTipMargin := "16,8"
		oG2antt:Columns():Add("Def")
		oChart := oG2antt:Chart()
			oChart:AllowCreateBar := 0/*exNoCreateBar*/
			oChart:SetProperty("PaneWidth",.F.,64)
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "01/01/2010"
			oChart:Bars:Item("Task"):SetProperty("Def",6/*exBarToolTip*/,"...")
		oItems := oG2antt:Items()
			h := oItems:AddItem("Task")
			oItems:AddBar(h,"Task","01/02/2010","01/05/2010","A","A")
			oItems:AddBar(h,"Task","01/05/2010","01/08/2010","B","B")
		oG2antt:EndUpdate()

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

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

	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 := 24
		oG2antt:HeaderHeight := 20
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:AntiAliasing := .T.
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
			oChart:UnitScale := 65536/*exHour*/
			oChart:FirstVisibleDate := "01/10/2024"
			oLevel := oChart:Level(1)
				oLevel:DrawTickLines := 0/*exLevelNoLine*/
				oLevel:DrawTickLinesFrom(0,1/*exLevelDotLine*/)
			oChart:AllowResizeChart := -1/*0xfffffef9+exAllowChangeUnitScale+exAllowResizeChartMiddle+exAllowResizeChartHeader*/
			oChart:ShowLinks := 1/*exShowExtendedLinks*/
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("T1"),"Task","01/10/2024 10:00:00","01/10/2024 10:20:00","T1")
			oItems:AddBar(oItems:AddItem("T2"),"Task","01/10/2024 09:00:00","01/10/2024 12:00:00","T2")
			oItems:AddBar(oItems:AddItem("T3"),"Task","01/10/2024 08:00:00","01/10/2024 08:30:00","T3")
			oItems:AddBar(oItems:AddItem("T4"),"Task","01/10/2024 08:00:00","01/10/2024 08:30:00","T4")
			oItems:AddLink("L13",oItems:ItemByIndex(0),"T1",oItems:ItemByIndex(2),"T3")
			oItems:AddLink("L14",oItems:ItemByIndex(0),"T1",oItems:ItemByIndex(3),"T4")
			oItems:AddLink("L24",oItems:ItemByIndex(1),"T2",oItems:ItemByIndex(3),"T4")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2314
According to the documentation of the ShowExtendedLinksEnum value exShowExtendedLinks (1) it is possible to distinctly visualise links (rather than showing them one over another) when two or more links start or end on the same bar

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

	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 := 24
		oG2antt:HeaderHeight := 20
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:AntiAliasing := .T.
		oG2antt:Columns():Add("Task")
		oChart := oG2antt:Chart()
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:LevelCount := 2
			oChart:UnitScale := 65536/*exHour*/
			oChart:FirstVisibleDate := "01/10/2024"
			oLevel := oChart:Level(1)
				oLevel:DrawTickLines := 0/*exLevelNoLine*/
				oLevel:DrawTickLinesFrom(0,1/*exLevelDotLine*/)
			oChart:AllowResizeChart := -1/*0xfffffef9+exAllowChangeUnitScale+exAllowResizeChartMiddle+exAllowResizeChartHeader*/
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("T1"),"Task","01/10/2024 10:00:00","01/10/2024 10:20:00","T1")
			oItems:AddBar(oItems:AddItem("T2"),"Task","01/10/2024 09:00:00","01/10/2024 12:00:00","T2")
			oItems:AddBar(oItems:AddItem("T3"),"Task","01/10/2024 08:00:00","01/10/2024 08:30:00","T3")
			oItems:AddBar(oItems:AddItem("T4"),"Task","01/10/2024 08:00:00","01/10/2024 08:30:00","T4")
			oItems:AddLink("L1",oItems:ItemByIndex(0),"T1",oItems:ItemByIndex(2),"T3")
			oItems:AddLink("L2",oItems:ItemByIndex(1),"T2",oItems:ItemByIndex(3),"T4")
			oItems:SetProperty("Link","L2",15/*exLinkShowRound*/,4)
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2313
How to use arrows key left/right to move the cursor left/right inside the text
#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("Edit"):Editor()
			oEditor:EditType := 1/*EditType*/
			oEditor:SetProperty("Option",20/*exLeftArrow*/,.F.)
			oEditor:SetProperty("Option",21/*exRightArrow*/,.F.)
		oItems := oG2antt:Items()
			oItems:AddItem("000")
			oItems:AddItem("111")
			oItems:AddItem("222")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2312
How can I force the cursor to jump to the end of the editor once the user clicks the 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

	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",oG2antt:BackColor())
		oG2antt:SetProperty("SelForeColor",oG2antt:ForeColor())
		oEditor := oG2antt:Columns():Add("Edit"):Editor()
			oEditor:EditType := 1/*EditType*/
			oEditor:SetProperty("Option",48/*exEditSelStart*/,-1)
		oItems := oG2antt:Items()
			oItems:AddItem("000")
			oItems:AddItem("111")
			oItems:AddItem("222")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2311
How can I show the overview with a different color except or outside the selection

#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:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABVIDg6AADACAxRDAMgBQKAAzAJBIYhiGgcYCgMZBSDeCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADE2YAoJDUN4nDKMMDybBkRxtDCPIDnGQoDiGI4nSbKIzSCKMQhrEKZZrnaLJFgOTY8ABLEBvfSgASof6MKBlKhKGoiUo2SCFEaBTBNHxDL6raqqWJ5HDINQlWzbcjjKKFYRbOqTZDkGj4XqKTo3YBAdZSXJsXwTGKkji3ZgMOR3HaQaTjOgINpuDZdRzkUYZUDFSwSDqQIRtCpbJqzFZDZbLNbYBYME47AayID0CbdCgmaalSZHNxbVa0BzpXrFLw1TLoDy8AJ+ABseKzfo9PxdIygZRzKJ8aofE+YxynIfJcC8QgbCmL5eiEPIKH6RABlibJpicW4/FcAx/HOYRGmud4+CcHxdmiDhkGEIIIEkQJSGMHQHFGSBlFEUITEmewAAQIQ2AYRpDGQJAoEIXhXCkCB5kmSAdmg" +;
		"VZPmgZJ8gaT4oHSeIHk8aIEnWCJiEiFgmgmYoIiYJIIE8aB8niB0pmyfIGE+ZYmDQPpjgOUg6DqY5DgYPg2mQAxqEKEJkEkFhGhGZIJA4QA2mOY4GDwOsumCe4NAACJKDoPQOFkZJThaSoZHSGYXmYCYGGKGJmEmFhmCsJoDFYag5iaSISDIAAjAkPJLhyS4JlYbA5iSeZmHqHpnkmdh+hOZx5lSOAzGgSQ+DAAAimkNIkiKTh6DSbIjmkChGhKJJpEoVoWiSaJThyKImmSWI4ACCwNkqBhgDsahKhaJopmqComiqKpqkqEhghKYpAAIJIQmYA46jaLZrgqZo6i6a5KnaPotiZRQkiyIg6lIXw7myCwmkqMpsksNpOjObQLCKQYQiwOpOEKGAPAsZpajabZLHaXo3m4C4GlmNJNisVpFjWZZzkaao6m6S42m6O5vAuRpyjqLhLhidYxgmE5KnqPpvkudp+j+cAMAcAo+i8WIOkSPZuguZwDkKcJMDafp" +;
		"BE8XAengPJxEwVwWkWcYMGcGpGnGTBTBCRIwhkXwikichMhcJpJnKDIPB+NYNimAgqkucwMkcMoInKO4fC2F5ikyZw6k6c5MncPpPnOLJXAiTZJhOXxGlGdINCcSpSnSTQ3E6UY0CuYgulSdRNFcVpVnWDRnFSVBwh0axeledgNFsXJRA+HYXGaWZ2g2JxqlqdpNjcZZYmYCJDHKXJ3E2K4doux3gbE8OEF4ygtjuH6L8eAHAHgFGCO8bY2QZgZDiBwJ4FRijxE4G8DoxBxj6B6EINwTADjvBaMseYHBng1GaPMTg7wepxA4J4Rx8RjgfCYFMeoEQ6BpGqPUTob2MD2A6IQLoNAKiHAuG0WYAAJCVBCCETAHR3DMFWPgDwD29j4E8CoV4sw7imAIIcJASggAHBeBIJw5grikCmHoSYNxWjrH2BMAoNgqAZE8O0GYEg5DgAIG8DgxwjhXGaCYZIcgnxBGSDILgmwTjKHkJMNwqgjCREoGEC4RRMifHqJc" +;
		"YokQ6BgEYJEUIaQOhlHIIESAECAg=")
		oG2antt:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oG2antt:SetProperty("Background",199/*exOverviewSelResize*/,AutomationTranslateColor( GraMakeRGBColor  ( { 1,0,0 } )  , .F. ))
		oG2antt:SetProperty("Background",200/*exOverviewSelOut*/,AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oG2antt:Chart():SetProperty("OverviewSelBackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oG2antt:SetProperty("Background",201/*exOverviewSelUnit*/,0x1000000)
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "06/21/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:OverviewVisible := 31746/*0x400+exOverviewShowSelMargins+exOverviewShowMargins+exOverviewShowDateTimeScaleBottom+exOverviewShowAllVisible*/
			oChart:OverviewHeight := 64
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
			oChart:SetProperty("Label",65536/*exHour*/,"")
			oChart:SetProperty("Label",1048576/*exMinute*/,"")
			oChart:SetProperty("Label",16777216/*exSecond*/,"")
			oChart:AllowOverviewZoom := 1/*exAlwaysZoom*/
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/11/2001")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","07/02/2001","07/11/2001")
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","11/02/2001","11/11/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2310
Resize the chart using the overview's selection left and right margins (blue)

#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:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oG2antt:SetProperty("Background",199/*exOverviewSelResize*/,AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "06/21/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:OverviewVisible := 31746/*0x400+exOverviewShowSelMargins+exOverviewShowMargins+exOverviewShowDateTimeScaleBottom+exOverviewShowAllVisible*/
			oChart:OverviewHeight := 64
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/11/2001")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","07/02/2001","07/11/2001")
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","11/02/2001","11/11/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2309
Resize the chart using the overview's selection left and right margins (black)

#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:SetProperty("BackColorLevelHeader",oG2antt:BackColor())
		oG2antt:SetProperty("Background",199/*exOverviewSelResize*/,AutomationTranslateColor( GraMakeRGBColor  ( { 1,0,0 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:FirstVisibleDate := "06/21/2001"
			oChart:SetProperty("PaneWidth",.F.,48)
			oChart:OverviewVisible := 31746/*0x400+exOverviewShowSelMargins+exOverviewShowMargins+exOverviewShowDateTimeScaleBottom+exOverviewShowAllVisible*/
			oChart:OverviewHeight := 64
			oChart:LevelCount := 2
			oChart:UnitScale := 4096/*exDay*/
		oG2antt:Columns():Add("Column")
		oItems := oG2antt:Items()
			oItems:AddBar(oItems:AddItem("Item 1"),"Task","01/02/2001","01/11/2001")
			oItems:AddBar(oItems:AddItem("Item 2"),"Task","07/02/2001","07/11/2001")
			oItems:AddBar(oItems:AddItem("Item 3"),"Task","11/02/2001","11/11/2001")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2308
Disable temporarily the column's sort, resize and drag and drop

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

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

	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:OnResizeControl := 1/*exResizeChart*/
		oG2antt:SortBarVisible := .T.
		oG2antt:SortBarCaption := "<fgcolor 808080><c>the header and the sort-bar are disabled (no drag and drop is allowed)"
		oG2antt:AllowGroupBy := .T.
		oG2antt:HeaderEnabled := .F.
		oG2antt:HeaderAppearance := 4/*Etched*/
		oG2antt:Columns():Add("Index"):FormatColumn := "1 index ``"
		oG2antt:Columns():Add("Pos"):FormatColumn := "1 apos ``"
		oG2antt:Columns():Add("Edit"):Editor():EditType := 1/*EditType*/
		oG2antt:GridLineStyle := 512/*exGridLinesGeometric*/
		oG2antt:DrawGridLines := 2/*exVLines*/
		oG2antt:SetProperty("GridLineColor",AutomationTranslateColor( GraMakeRGBColor  ( { 224,224,224 } )  , .F. ))
		oChart := oG2antt:Chart()
			oChart:AllowCreateBar := 1/*exCreateBarAuto*/
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,196)
			oChart:GridLineStyle := 512/*exGridLinesGeometric*/
			oChart:DrawGridLines := -1/*exAllLines*/
			oLevel := oChart:Level(1)
				oLevel:DrawGridLines := .T.
				oLevel:SetProperty("GridLineColor",oG2antt:GridLineColor())
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2307
Adds a Finish-Start(FS) link (method 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 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:Columns():Add("Name")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Item 1")
			oItems:AddBar(h1,"Task","01/03/2001","01/06/2001")
			h2 := oItems:AddItem("Item 2")
			oItems:AddBar(h2,"Task","01/03/2001","01/06/2001")
			oItems:AddLink("Link1",h1,"",h2,"")
			oItems:SchedulePDM(0,"")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2306
Adds a Start-Start(SS) link (method 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 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:Columns():Add("Name")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Item 1")
			oItems:AddBar(h1,"Task","01/03/2001","01/06/2001")
			h2 := oItems:AddItem("Item 2")
			oItems:AddBar(h2,"Task","01/03/2001","01/06/2001")
			oItems:AddLink("Link1",h1,"",h2,"")
			oItems:SetProperty("Link","Link1",6/*exLinkStartPos*/,0)
			oItems:SetProperty("Link","Link1",7/*exLinkEndPos*/,0)
			oItems:SchedulePDM(0,"")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2305
Adds a Finish-Finish(FF) link (method 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 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:Columns():Add("Name")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Item 1")
			oItems:AddBar(h1,"Task","01/03/2001","01/06/2001")
			h2 := oItems:AddItem("Item 2")
			oItems:AddBar(h2,"Task","01/03/2001","01/06/2001")
			oItems:AddLink("Link1",h1,"",h2,"")
			oItems:SetProperty("Link","Link1",6/*exLinkStartPos*/,2)
			oItems:SetProperty("Link","Link1",7/*exLinkEndPos*/,2)
			oItems:SchedulePDM(0,"")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2304
Adds a Start-Finish(SF) link (method 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 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:Columns():Add("Name")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Item 1")
			oItems:AddBar(h1,"Task","01/03/2001","01/06/2001")
			h2 := oItems:AddItem("Item 2")
			oItems:AddBar(h2,"Task","01/03/2001","01/06/2001")
			oItems:AddLink("Link1",h1,"",h2,"")
			oItems:SetProperty("Link","Link1",6/*exLinkStartPos*/,0)
			oItems:SetProperty("Link","Link1",7/*exLinkEndPos*/,2)
			oItems:SchedulePDM(0,"")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2303
Adds a Finish-Start(FS) link (method 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
	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:Columns():Add("Name")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Item 1")
			oItems:AddBar(h1,"Task","01/03/2001","01/06/2001")
			h2 := oItems:AddItem("Item 2")
			oItems:AddBar(h2,"Task","01/03/2001","01/06/2001")
			oItems:SetProperty("ItemBar",h2,"",270/*exBarPredecessor*/,"1FS")
			oItems:SchedulePDM(0,"")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2302
Adds a Start-Start(SS) link (method 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
	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:Columns():Add("Name")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Item 1")
			oItems:AddBar(h1,"Task","01/03/2001","01/06/2001")
			h2 := oItems:AddItem("Item 2")
			oItems:AddBar(h2,"Task","01/03/2001","01/06/2001")
			oItems:SetProperty("ItemBar",h2,"",270/*exBarPredecessor*/,"1SS")
			oItems:SchedulePDM(0,"")
		oG2antt:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
2301
Adds a Finish-Finish(FF) link (method 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
	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:Columns():Add("Name")
		oChart := oG2antt:Chart()
			oChart:LevelCount := 2
			oChart:FirstVisibleDate := "12/28/2000"
			oChart:SetProperty("PaneWidth",.F.,64)
		oItems := oG2antt:Items()
			h1 := oItems:AddItem("Item 1")
			oItems:AddBar(h1,"Task","01/03/2001","01/06/2001")
			h2 := oItems:AddItem("Item 2")
			oItems:AddBar(h2,"Task","01/03/2001","01/06/2001")
			oItems:SetProperty("ItemBar",h2,"",270/*exBarPredecessor*/,"1FF")
			oItems:SchedulePDM(0,"")
		oG2antt:EndUpdate()

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