724
Highlight the match once the filter is applied

PROCEDURE OnFilterChange(oTree)
	LOCAL format
	format := oTree:FormatABC("`lower(value) replace lower('` + value + `') with '<bgcolor 000000><fgcolor FFFFFF>` + value  + `</fgcolor></bgcolor>'`",oTree:FilterBarPromptPattern())
	oTree:Columns:Item(0):FormatColumn := Transform(format,"")
	oTree:Columns:Item(1):FormatColumn := Transform(format,"")
	oTree:Columns:Item(2):FormatColumn := Transform(format,"")
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:FilterChange := {|| OnFilterChange(oTree)} /*Notifies your application that the filter is changed.*/

		oTree:BeginUpdate()
		oTree:SetProperty("SelBackColor",oTree:BackColor())
		oTree:SetProperty("SelForeColor",oTree:ForeColor())
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:HeaderAppearance := 4/*Etched*/
		oTree:HeaderHeight := 23
		oTree:SetProperty("BackColorLevelHeader",oTree:BackColor())
		oTree:FilterBarCaption := "`<b>` + value + `</b><r><fgcolor=808080>` + ( matchitemcount < 0 ? abs(matchitemcount + 1) + ` result(s)` : ``)"
		oTree:FilterBarPromptVisible := 2055/*exFilterBarCompact+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:SetProperty("FilterBarBackColor",oTree:BackColor())
		oTree:FilterBarPromptPattern := "and"
		oColumns := oTree:Columns()
			oColumn := oColumns:Add("Name")
				oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
				oColumn:FormatColumn := "lower(value)"
			oColumn1 := oColumns:Add("Title")
				oColumn1:SetProperty("Def",17/*exCellCaptionFormat*/,1)
				oColumn1:FormatColumn := "lower(value)"
			oColumn2 := oColumns:Add("City")
				oColumn2:SetProperty("Def",17/*exCellCaptionFormat*/,1)
				oColumn2:FormatColumn := "lower(value)"
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			oItems:SetProperty("SelectItem",h0,.T.)
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:AddItem("Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
			h0 := oItems:AddItem("Steven Buchanan")
			oItems:SetProperty("CellCaption",h0,1,"Sales Manager")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Robert King")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Laura Callahan")
			oItems:SetProperty("CellCaption",h0,1,"Inside Sales Coordinator")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:AddItem("Anne Dodsworth")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
		oTree:EndUpdate()

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:ColumnAutoResize := .F.
		oTree:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.mdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oTree:DataSource := rs

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
722
Re-order the cell's caption, icons and images/pictures

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Images("gBJJgBAICAADAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEahkZAIAEEbjMjlErlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrlTiFdib/sNjr9gs1nldlrlqtFtt0stlguNvulyh91ud1vVVvNuvt7wFHr9/vl3luEwOJouIq+Dw2KyGRyWTymVy2XzGZzUuiw+lmej0gkUaksljaAnmDcD/cEbf7w1+ufD/fEbeB028bYAO3enB6AB++4EoA4A4sb4vHjXJ4nG5vKAHA4ca6XBjTAD/Y2x/eB/jcB")
		oColumn := oTree:Columns():Add("ToLeft")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
		oColumn1 := oTree:Columns():Add("ToRight")
			oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn1:SetProperty("Def",34/*exCellDrawPartsOrder*/,"caption,picture,icons,icon,check")
		oTree:DefaultItemHeight := 32
		oTree:DrawGridLines := 2/*exVLines*/
		oTree:HeaderAppearance := 4/*Etched*/
		oItems := oTree:Items()
			h := oItems:AddItem("Caption")
			oItems:SetProperty("CellImage",h,0,2)
			oItems:SetProperty("CellImages",h,0,"1,2")
			oItems:SetProperty("CellPicture",h,0,oTree:ExecuteTemplate("loadpicture(`gCJKBOI4NBQaBQAhQNJJIIhShQAEEREAIA0ROZ6PT0hQKYZpIZDKBJkIgKByN5mNJsMsKPABVqXBI4KjrD7HL6GWKPJKiCIhMiySidKxbOzZZJWMLsGL2FqyLjZMonNa2CyiZDOUqsQqUEq0ZCNISFXDIFxzZ4hUrbdrefZ/fz3ZgzZ75Tz3XjvHZnZznPieb55AKgAqmRyOOzEhR7XirWaWQQMTa+QIhDbZOZAAoYUCPDAQG7FXI4JR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SQG46BnFAATDJcL3IHM6DQBsPR3O83j/AsJyGH8w4ZJY5TsN8EAdFojTwJ0AAoA4MgATIMDqAcrQPMEwTDBgVy0LYtiuK8qyrFs6QtCocnLCs8wAGAChOGM+CZJ0HAaoQHQYocBiaHtJT3LEfgCLYIgQNYgw4IQiSaBcAABBEAB/DAXS4HgPAgLUSCzGkPjkIATyXPQoCeNYfR6Do7QGI8Zj+CAHiyCY2SkIQTSSCIyDQCkpDBJQJinMMuAUPgOxGOcpA/AkoTzJwyiYFMiDwJEsShFAURFCwJRVFceQXKQIS8P8STlBgLggAcrAQCQATjIgZA0JgVSxL0OAmKI6CpEc4SuOkeBeOwMRnLQuQhOApDJAImYmD44BPIgAzFMYiR3LcQw4JwqhQAknAMFAxwEEwJwUO4ljCHgmxzNwNQ3EU3ScLYEAACocDePwZgCLI+yFN8jg7FEQTtKMcwrAAOhgHw6SQI4OCmJgjDmNAjj" +;
		"5Gw+wbHkkTpEw7gpFgIAA2sABJEUThEK4QhgIJAQ==`)"))
			oItems:SetProperty("CellCaption",h,1,oItems:CellCaption(h,0))
			oItems:SetProperty("CellHAlignment",h,1,2/*RightAlignment*/)
			oItems:SetProperty("CellImage",h,1,oItems:CellImage(h,0))
			oItems:SetProperty("CellImages",h,1,"2,1")
			oItems:SetProperty("CellPicture",h,1,oItems:CellPicture(h,0))
			h := oItems:AddItem("<b>HTML</b> <off 4>Caption")
			oItems:SetProperty("CellCaptionFormat",h,0,1/*exHTML*/)
			oItems:SetProperty("CellImage",h,0,2)
			oItems:SetProperty("CellImages",h,0,"1,2")
			oItems:SetProperty("CellPicture",h,0,oTree:ExecuteTemplate("loadpicture(`gCJKBOI4NBQaBQAhQNJJIIhShQAEEREAIA0ROZ6PT0hQKYZpIZDKBJkIgKByN5mNJsMsKPABVqXBI4KjrD7HL6GWKPJKiCIhMiySidKxbOzZZJWMLsGL2FqyLjZMonNa2CyiZDOUqsQqUEq0ZCNISFXDIFxzZ4hUrbdrefZ/fz3ZgzZ75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UkSlBYkxsCYAAHG4qwCBwMQfBYlxsNgsDhLEgwHA8" +;
		"PiPNg1ygP4uywIgMSwK4zSQG46BnFAATDJcL3IHM6DQBsPR3O83j/AsJyGH8w4ZJY5TsN8EAdFojTwJ0AAoA4MgATIMDqAcrQPMEwTDBgVy0LYtiuK8qyrFs6QtCocnLCs8wAGAChOGM+CZJ0HAaoQHQYocBiaHtJT3LEfgCLYIgQNYgw4IQiSaBcAABBEAB/DAXS4HgPAgLUSCzGkPjkIATyXPQoCeNYfR6Do7QGI8Zj+CAHiyCY2SkIQTSSCIyDQCkpDBJQJinMMuAUPgOxGOcpA/AkoTzJwyiYFMiDwJEsShFAURFCwJRVFceQXKQIS8P8STlBgLggAcrAQCQATjIgZA0JgVSxL0OAmKI6CpEc4SuOkeBeOwMRnLQuQhOApDJAImYmD44BPIgAzFMYiR3LcQw4JwqhQAknAMFAxwEEwJwUO4ljCHgmxzNwNQ3EU3ScLYEAACocDePwZgCLI+yFN8jg7FEQTtKMcwrAAOhgHw6SQI4OCmJgjDmNAjj" +;
		"5Gw+wbHkkTpEw7gpFgIAA2sABJEUThEK4QhgIJAQ==`)"))
			oItems:SetProperty("CellCaption",h,1,oItems:CellCaption(h,0))
			oItems:SetProperty("CellCaptionFormat",h,1,1/*exHTML*/)
			oItems:SetProperty("CellHAlignment",h,1,2/*RightAlignment*/)
			oItems:SetProperty("CellImage",h,1,oItems:CellImage(h,0))
			oItems:SetProperty("CellImages",h,1,"2,1")
			oItems:SetProperty("CellPicture",h,1,oItems:CellPicture(h,0))
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
721
ImageSize property on 32 (specifies the size of control' icons/images/check-boxes/radio-buttons)

PROCEDURE OnAddColumn(oTree,Column)
	/*Column.Def(48) = 2*/
	/*Column.Def(49) = 2*/

RETURN

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oAppearance
	LOCAL oColumn,oColumn1,oColumn2,oColumn3
	LOCAL oItems
	LOCAL oTree
	LOCAL h,hR

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:AddColumn := {|Column| OnAddColumn(oTree,Column)} /*Fired after a new column has been added.*/

		oTree:BeginUpdate()
		oTree:ImageSize := 32
		oTree:DefaultItemHeight := 36
		oTree:HeaderHeight := oTree:DefaultItemHeight()
		oTree:SortBarHeight := oTree:DefaultItemHeight()
		oTree:Font():Size := 16
		oTree:FilterBarFont():Size := oTree:Font():Size()
		oTree:ToolTipFont():Size := oTree:Font():Size()
		oTree:Indent := 26
		oTree:Images("gBJJgBAIDAAEg4AEEKAD/hz/EMNh8TIRNGwAjEZAEXjAojKAjMLjABhkaABAk0plUrlktl0vmExmUzmk1m03nE5nU7nk9miAoE+oVDolFo1HpFJpU5h8Sf9OqFNqUOqNUqdPq9VrFWrlbr1QpdhAFAkFis1ntFptVrtkrpszrNvmVxqk3uVtm1kmF3sdBvF/wGBmV+j9BYGHwWJulfxdax2NyFdx2JlV6l9Nw7AAGZymdz2Cy2GxErvWcz9ivlwyV21cuxugwktzGIzmvwtl0+53U5y0a0Wazmmyu/3dCyOMyXHx/J5nIr9q3uyqnBxFN3G46ma4vb7mD2Ng4nZze00fDkHC7t7us2rOX5tguetpHRlmz4HVqnXk1PjHO+CMPo9MBMC+j2vC8j7wS8cFNI4kBo05UIvfCT/NsnsApU+0Fqg/T+oy/kPxC0sEQfErKQK96+w28UWRI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IBm8d5UhOQgCDUIBDDJDhgggJgKgKYJIDSVoDk8KBFF4OohEMZgWDs" +;
		"YYDj4GoGmGSB2B6B5iAiBgYDsYRjGSbIJo4RgqDuIpIAoLoLmMCJGDKDJjJiLA7xqUAAgGTwYnYPoPmQCQGEKEJkEkFg9gGY44BoRoSmSSQ2EKEggHgRhShSZRJFYVoVmWCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoVoWiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZiSe41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbh" +;
		"FCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA==")
		oTree:SetProperty("BackColorHeader",0x4c6c6c6)
		oTree:SetProperty("SelBackColor",0x4000000)
		oTree:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
		oTree:SetProperty("CheckImage",0/*Unchecked*/,16777216)
		oTree:SetProperty("CheckImage",1/*Checked*/,33554432)
		oTree:SetProperty("CheckImage",2/*PartialChecked*/,50331648)
		oTree:SetProperty("Background",20/*exSelBackColorFilter*/,oTree:SelBackColor())
		oTree:SetProperty("Background",21/*exSelForeColorFilter*/,oTree:SelForeColor())
		oTree:SetProperty("Background",26/*exBackColorFilter*/,oTree:BackColor())
		oTree:SetProperty("Background",27/*exForeColorFilter*/,oTree:ForeColor())
		oTree:SetProperty("Background",32/*exCursorHoverColumn*/,-1)
		oTree:SetProperty("Background",0/*exHeaderFilterBarButton*/,0x4000000)
		oTree:SetProperty("Background",41/*exHeaderFilterBarActive*/,0x4010101)
		oTree:SetProperty("Background",1/*exFooterFilterBarButton*/,0x40000ff)
		oTree:HeaderAppearance := 4/*Etched*/
		oTree:ShowFocusRect := .F.
		oTree:SortBarVisible := .T.
		oTree:SetProperty("BackColorSortBar",oTree:BackColor())
		oTree:SetProperty("BackColorLevelHeader",oTree:BackColor())
		oTree:FilterBarDropDownHeight := 1
		oColumn := oTree:Columns():Add("Check")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
			oColumn:Width := 128
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 256/*exShowCheckBox*/
		oColumn1 := oTree:Columns():Add("Pos")
			oColumn1:FormatColumn := "1 pos ``"
			oColumn1:AllowSort := .F.
			oColumn1:Width := 48
			oColumn1:AllowSizing := .F.
			oColumn1:Alignment := 1/*CenterAlignment*/
			oColumn1:HeaderAlignment := 1/*CenterAlignment*/
		oColumn2 := oTree:Columns():Add("Image")
			oColumn2:DisplayFilterButton := .T.
			oColumn2:FilterList := 8480/*exShowExclude+exShowCheckBox+exSortItemsAsc*/
			oColumn2:FilterType := 10/*exImage*/
			oColumn2:DisplayExpandButton := .T.
			oColumn2:ExpandColumns := "1,2,3"
			oColumn2:Width := 128
			oColumn2:HeaderImage := 1
		oColumn3 := oTree:Columns():Add("Images")
			oColumn3:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn3:Width := 196
			oColumn3:HTMLCaption := "<img>1</img><img>2</img><img>3</img> Images"
		oTree:Columns:Item("Pos"):Position := 3
		oItems := oTree:Items()
			hR := oItems:AddItem("Root")
			oItems:SetProperty("ItemDivider",hR,0)
			oItems:SetProperty("ItemDividerLine",hR,0/*EmptyLine*/)
			h := oItems:InsertItem(hR,,"Child A")
			oItems:SetProperty("CellImage",h,2,1)
			oItems:SetProperty("CellImages",h,3,"1,2,3")
			oItems:SetProperty("CellCaption",h,3,"123")
			h := oItems:InsertItem(hR,,"Child B")
			oItems:SetProperty("CellState",h,0,1)
			oItems:SetProperty("CellImage",h,2,3)
			oItems:SetProperty("CellImages",h,3,"2,3,1")
			oItems:SetProperty("CellCaption",h,3,"231")
			oItems:SetProperty("SelectItem",h,.T.)
			h := oItems:InsertItem(hR,,"Child C")
			oItems:SetProperty("CellImage",h,2,2)
			oItems:SetProperty("CellState",h,3,1)
			oItems:SetProperty("CellCaption",h,3,"312")
			oItems:SetProperty("CellImages",h,3,"3,1,2")
			oItems:SetProperty("ExpandItem",hR,.T.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
720
ImageSize property on 16 (default) (specifies the size of control' icons/images/check-boxes/radio-buttons)

PROCEDURE OnAddColumn(oTree,Column)
	/*Column.Def(48) = 2*/
	/*Column.Def(49) = 2*/

RETURN

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oAppearance
	LOCAL oColumn,oColumn1,oColumn2,oColumn3
	LOCAL oItems
	LOCAL oTree
	LOCAL h,hR

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:AddColumn := {|Column| OnAddColumn(oTree,Column)} /*Fired after a new column has been added.*/

		oTree:BeginUpdate()
		oTree:ImageSize := 16
		oTree:Images("gBJJgBAIDAAEg4ACEKAD/hz/E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Dp6XoWWRbAAWDpVVzNNC3YzkCIceADHKiXxmVz4JLdGZ1QTGID2XaYaxWK4oZjsVSc4KDHbETbHFi9Fo3NaaxGisew+GYc4HlCR5NAAAIIEkQJSGMOgdE4RhYDwJJsAaAYQgmPpolCWgSCiBJzjcEIAkQXIBm8d5UhOQgCDUIBDDJDhgggJgKgKYJIDSVoDk8KBFF4OohEMZgWDs" +;
		"YYDj4GoGmGSB2B6B5iAiBgYDsYRjGSbIJo4RgqDuIpIAoLoLmMCJGDKDJjJiLA7xqUAAgGTwYnYPoPmQCQGEKEJkEkFg9gGY44BoRoSmSSQ2EKEggHgRhShSZRJFYVoVmWCRmFKFAgGOTheheZgJgYYoYmYSYWGaF4lkMMJ0hqZpJjYbobmcCZGHKHJmjmJh0h2Z4JmYcIaE8WZ2H6H5oAoBoCiCaBKBYfdjGoJoKiKaJKDaDojmkChGgmIgpCoVoWiWaJZiSd4mmmSh2h6J5qAqBoiiiaY5iSeIpmqComiqKpqkqNouiuah6hqMIsmsSpWiuGhP1kOoumuSp2j6L5sAsBo54gKwWkaMZsgsJpKjKbJLDaRYxYWRpSjSbIZiSe41m2CxmlqNptksdpejebR5iSfI4m4S4W16boLiaao6m5fJ9jubwLkaco8m8S5WnaPZunuOp4j6b5Lnac4SA0PAGlgP4wEwFwGkGcIMCcCpCnCCxiA8NYAAmMJfkSbh" +;
		"FCcFpFnGDBnBqRpUhuEwTDeZ5lHCfw6HIQxLCaAxygyJwqgGcATE4FA6hWY4tjEAAQBAgIA==")
		oTree:SetProperty("BackColorHeader",0x4c6c6c6)
		oTree:SetProperty("SelBackColor",0x4000000)
		oTree:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
		oTree:SetProperty("Background",20/*exSelBackColorFilter*/,oTree:SelBackColor())
		oTree:SetProperty("Background",21/*exSelForeColorFilter*/,oTree:SelForeColor())
		oTree:SetProperty("Background",26/*exBackColorFilter*/,oTree:BackColor())
		oTree:SetProperty("Background",27/*exForeColorFilter*/,oTree:ForeColor())
		oTree:SetProperty("Background",32/*exCursorHoverColumn*/,-1)
		oTree:SetProperty("Background",0/*exHeaderFilterBarButton*/,0x4000000)
		oTree:SetProperty("Background",41/*exHeaderFilterBarActive*/,0x4010101)
		oTree:SetProperty("Background",1/*exFooterFilterBarButton*/,0x40000ff)
		oTree:HeaderAppearance := 4/*Etched*/
		oTree:ShowFocusRect := .F.
		oTree:SortBarVisible := .T.
		oTree:SetProperty("BackColorSortBar",oTree:BackColor())
		oTree:SetProperty("BackColorLevelHeader",oTree:BackColor())
		oTree:FilterBarDropDownHeight := 1
		oColumn := oTree:Columns():Add("Check")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
			oColumn:Width := 128
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 256/*exShowCheckBox*/
		oColumn1 := oTree:Columns():Add("Pos")
			oColumn1:FormatColumn := "1 pos ``"
			oColumn1:AllowSort := .F.
			oColumn1:Width := 48
			oColumn1:AllowSizing := .F.
			oColumn1:Alignment := 1/*CenterAlignment*/
			oColumn1:HeaderAlignment := 1/*CenterAlignment*/
		oColumn2 := oTree:Columns():Add("Image")
			oColumn2:DisplayFilterButton := .T.
			oColumn2:FilterList := 8480/*exShowExclude+exShowCheckBox+exSortItemsAsc*/
			oColumn2:FilterType := 10/*exImage*/
			oColumn2:DisplayExpandButton := .T.
			oColumn2:ExpandColumns := "1,2,3"
			oColumn2:Width := 128
			oColumn2:HeaderImage := 1
		oColumn3 := oTree:Columns():Add("Images")
			oColumn3:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn3:Width := 196
			oColumn3:HTMLCaption := "<img>1</img><img>2</img><img>3</img> Images"
		oTree:Columns:Item("Pos"):Position := 3
		oItems := oTree:Items()
			hR := oItems:AddItem("Root")
			oItems:SetProperty("ItemDivider",hR,0)
			oItems:SetProperty("ItemDividerLine",hR,0/*EmptyLine*/)
			h := oItems:InsertItem(hR,,"Child A")
			oItems:SetProperty("CellImage",h,2,1)
			oItems:SetProperty("CellImages",h,3,"1,2,3")
			oItems:SetProperty("CellCaption",h,3,"123")
			h := oItems:InsertItem(hR,,"Child B")
			oItems:SetProperty("CellState",h,0,1)
			oItems:SetProperty("CellImage",h,2,3)
			oItems:SetProperty("CellImages",h,3,"2,3,1")
			oItems:SetProperty("CellCaption",h,3,"231")
			oItems:SetProperty("SelectItem",h,.T.)
			h := oItems:InsertItem(hR,,"Child C")
			oItems:SetProperty("CellImage",h,2,2)
			oItems:SetProperty("CellState",h,3,1)
			oItems:SetProperty("CellCaption",h,3,"312")
			oItems:SetProperty("CellImages",h,3,"3,1,2")
			oItems:SetProperty("ExpandItem",hR,.T.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
719
The user clicks the drop-down filter, select a value and the control's list filters for the selected item(s). Is there a way for when the user then goes to the next column to add another filter and the drop down arrow is clicked for the list of values they can filter by to be limited to what is being displayed in the list due to the first filter they set

PROCEDURE OnAddColumn(oTree,Column)

RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:AddColumn := {|Column| OnAddColumn(oTree,Column)} /*Fired after a new column has been added.*/

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oTree:DataSource := rs
		oTree:Columns:Item("ShipVia"):Position := 2
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
718
Is it possible to set from code, a column sort without being inserted in the sortbar

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.accdb",1/*adOpenKeyset*/,3/*adLockOptimistic*/)
		oTree:DataSource := rs
		oTree:SortBarVisible := .T.
		oTree:Layout := "singlesort=" + CHR(34) + "C1:1" + CHR(34) + ""
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
717
Is it possible to view all events the control fires
PROCEDURE OnEvent(oTree,EventID)
	DevOut( Transform(oTree:EventParam(-2),"") )
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Event := {|EventID| OnEvent(oTree,EventID)} /*Notifies the application once the control fires an event.*/

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn:FormatColumn := "value + (%CS0 = 1 ? `<r><fgcolor=808080>(checked)` : ``)"
		oTree:HeaderVisible := .T.
		oItems := oTree:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:SetProperty("CellState",hChild,0,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:SetProperty("CellState",hChild,0,1)
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
716
How can I prevent expanding/collapsing the child items

PROCEDURE OnBeforeExpandItem(oTree,Item,Cancel)
	Cancel := oTree:Items():ItemParent(Item)
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeforeExpandItem := {|Item,Cancel| OnBeforeExpandItem(oTree,Item,Cancel)} /*Fired before an item is about to be expanded (collapsed).*/

		oTree:BeginUpdate()
		oTree:SingleSel := .F.
		oTree:Columns():Add("Default")
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(oItems:InsertItem(h,,"Child 1.1"),,"Child")
			oItems:InsertItem(h,,"Child 1.2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(oItems:InsertItem(h,,"Child 2.1"),,"Child")
			oItems:InsertItem(h,,"Child 2.2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
715
How can I display an item of picture type

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:ScrollBySingleLine := .F.
		oTree:HeaderAppearance := 4/*Etched*/
		oTree:HeaderHeight := 24
		oTree:Columns():Add("Artikel"):HTMLCaption := "<u>Artikel"
		oTree:Columns():Add("Waarde"):HTMLCaption := "<u>Waarde"
		oTree:SetProperty("HTMLPicture","T22128","c:\exontrol\images\zipdisk.gif")
		oItems := oTree:Items()
			h := oItems:AddItem("T22128-28)2D")
			h1 := oItems:InsertItem(h,,"<img>T22128:128</img>")
			oItems:SetProperty("CellCaptionFormat",h1,0,1/*exHTML*/)
			oItems:SetProperty("ItemHeight",h1,128)
			h1 := oItems:InsertItem(h,,"werkvoorbereiding")
			oItems:SetProperty("CellCaption",h1,1,"5.80")
			oItems:SetProperty("CellBold",h1,1,.T.)
			oItems:SetProperty("CellCaption",oItems:InsertItem(h1,,"Type"),1,"Eenvoudig")
			oItems:SetProperty("CellCaption",oItems:InsertItem(h1,,"Prijs p/uur"),1,"60,00")
			oItems:SetProperty("CellCaption",oItems:InsertItem(h1,,"Marhe"),1,"15,00%")
			oItems:SetProperty("CellCaption",oItems:InsertItem(h1,,"Insteltijd min."),1,"5,00")
			oItems:SetProperty("CellCaption",oItems:InsertItem(h1,,"Aantal"),1,1)
			oItems:SetProperty("CellCaption",oItems:InsertItem(h1,,"Kostprije"),1,"5,00")
			oItems:SetProperty("ExpandItem",h1,.T.)
			h1 := oItems:InsertItem(h,,"materiall")
			oItems:SetProperty("CellCaption",h1,1,"14.82")
			oItems:SetProperty("CellBold",h1,1,.T.)
			oItems:SetProperty("ItemHasChildren",h1,.T.)
			h1 := oItems:InsertItem(h,,"snijden")
			oItems:SetProperty("CellCaption",h1,1,"3.13")
			oItems:SetProperty("CellBold",h1,1,.T.)
			oItems:SetProperty("ItemHasChildren",h1,.T.)
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()

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

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oTree
	LOCAL back,fore

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		back := 65536
		fore := 16777215
		oTree:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABXUIQAAYAQGKIcBiAKBQAGYBIJDEMgzDDAUBjKKocQTC4AIQjCK4JDKHYJRpHEZyCA8EhqGASRAFUQBYiWE4oSpLABQaK0ZwIGyRIrkGQgQgmPYDSDNU4zVIEEglBI0TDNczhNDENgtGYaJqHIYpZBcM40TKkEZoSIITZcRrOEBiRL1S0RBhGcRUHZlWzdN64LhuK47UrWdD/XhdVzXRbjfz1Oq+bxve48Br7A5yYThdr4LhOFQ3RjIL4xbIcUwGe6VZhjOLZXjmO49T69HTtOCYBEBA")
		oTree:VisualAppearance():Add(2,"gBFLBCJwBAEHhEJAAEhABPMIQAAYAQGKIcBiAKBQAGaAoDDcMgwQwAAxjIKUEwsACEIrjKCYVgOHYYQjGMZwHCMIhiGwcAChEZYHgkMYmDAMUhSE78axHG6PY7kKZ4biaKIqQLLEhSfJ0YyBECBZpfebIbjmIZMSLEIxDKItJSpCIaRgqWS6ahGO4JUbUFLQHT9IR4daIYRgEEBA")
		oTree:VisualAppearance():Add(3,"gBFLBCJwBAEHhEJAAEhABUUIQAAYAQGKIcBiAKBQAGaAoDDcMgwQwAAxjIKUEwsACEIrjKCYVgOHYYQjGMZwGAsEwjAoYAChEaILgkMw2DBIQwgJIMEr/G6RZxjeL5CjmG4nDhKMpybAcXxjBIYZJgOQpXb+PobTrNNLzfRFAxVAaWJikcZ4HpIAJNVLFdQ0XYMNSBISsBqrKiKcpeIIDWBZMbRZT1ZABCIZBpEW6LahENQwXrCN74DYkNTdKaxbbuaaXLhGCYBgIA==")
		oTree:HeaderAppearance := 5/*Bump*/
		oTree:SetProperty("BackColor",back)
		oTree:SetProperty("BackColorHeader",back)
		oTree:SetProperty("BackColorLevelHeader",back)
		oTree:SetProperty("BackColorSortBar",back)
		oTree:SetProperty("BackColorSortBarCaption",back)
		oTree:SetProperty("FilterBarBackColor",back)
		oTree:SetProperty("FilterBarForeColor",fore)
		oTree:SetProperty("ForeColor",fore)
		oTree:SetProperty("ForeColorHeader",fore)
		oTree:SetProperty("ForeColorSortBar",fore)
		oTree:SetProperty("SelBackColor",fore)
		oTree:SetProperty("SelForeColor",back)
		oTree:SetProperty("Background",0/*exHeaderFilterBarButton*/,0x1000000)
		oTree:SetProperty("Background",18/*0x10+exCellButtonUp*/,0x2000000)
		oTree:SetProperty("Background",32/*exCursorHoverColumn*/,-1)
		oTree:SetProperty("Background",64/*exToolTipAppearance*/,0x3000000)
		oTree:SetProperty("Background",65/*exToolTipBackColor*/,back)
		oTree:SetProperty("Background",66/*exToolTipForeColor*/,fore)
		oTree:SetProperty("Background",20/*exSelBackColorFilter*/,fore)
		oTree:SetProperty("Background",21/*exSelForeColorFilter*/,back)
		oTree:SetProperty("Background",26/*exBackColorFilter*/,back)
		oTree:SetProperty("Background",27/*exForeColorFilter*/,fore)
		oTree:SetProperty("Background",28/*exSortBarLinkColor*/,back)
		oTree:SetProperty("Background",142/*0x80+exDateSelect*/,0x2000000)
		oTree:SetProperty("Background",141/*0x80+exDateSeparatorBar*/,0x2000000)
		oTree:SetProperty("Background",186/*exTreeLinesColor*/,fore)
		oTree:SetProperty("Description",25/*exFilterBarExclude*/,"<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
713
How can I specify the cell's outline, border or lines around, when the cell gets selected

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:AttachTemplate("handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}")
		oAppearance := oTree:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wHIMQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCqOp6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZYnjUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgW" +;
		"YRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA=")
			oAppearance:Add(2,"CP:1 -4 0 0 0")
		oTree:SetProperty("SelBackColor",0x2000000)
		oTree:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
		oTree:FullRowSelect := .F.
		oTree:ShowFocusRect := .F.
		oTree:DefaultItemHeight := 24
		oTree:HeaderHeight := 24
		oTree:DrawGridLines := 2/*exVLines*/
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("Cell 1"),1,"Cell 2")
			oItems:SetProperty("CellCaption",oItems:AddItem("Cell 3"),1,"Cell 4")
		oTree:Items():SelectPos := 1
		oTree:SelectColumnIndex := 1
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
712
How can I specify the cell's outline, border or lines around, when the item gets selected

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:AttachTemplate("handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}")
		oTree:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wHIMQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCqOp6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZYnjUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgW" +;
		"YRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA=")
		oTree:SetProperty("SelBackColor",0x1000000)
		oTree:SetProperty("SelForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
		oTree:ShowFocusRect := .F.
		oTree:DefaultItemHeight := 24
		oTree:HeaderHeight := 24
		oTree:DrawGridLines := 2/*exVLines*/
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("Cell 1"),1,"Cell 2")
			oItems:SetProperty("CellCaption",oItems:AddItem("Cell 3"),1,"Cell 4")
			oItems:SelectPos := 1
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
711
How can I specify the cell's outline, border or lines around

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:AttachTemplate("handle AddColumn(Column){Column{Def(48)=4;Def(49)=4;}}")
		oTree:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABPEGACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSpEEg7BKMYwjOJgFgmEQxDANIBQSKoaQiGQYYLhEZAEiONoaDJCM4wHIMQxHCKTZRkGcfaRCGSfIzpGKpVgOTYiTbPcIyQKtBxDIydJTmeQQQhsFIJU7SdVUPDUJZlWbLAwWTAYazXCKRZBpeJqdo6Y5RUDKUqSdLUYyvEq7ZqnOIpw5vICpaCqOp6HqKFpiXSAFL1fLmAwvPKrJjoeqpWpyCaRZQAGg4dbEdTNNCIbatQANKrCSpgZ7sMB6Di2L4TPS2awoWgRYyTFZMbBAeQ7LC1c45Fqrd4zS4dSxKCahcLxFiaNpYZYnjUap1jGPJlkuAgAkidB3nceZsCQEQJCgGhMGcQ4pkiSxEAAOYpiQIhvkYNA2gSCg5n+LIoGILowFyXQoAYAoAmASAWAaAZgggJgKF2T54DYDoDmECBGBKBJgGgTgWgW" +;
		"YRoFYGIGmGOBqByB5hCgegggiYJYgoJIICIaIeByChixULILGGGAWDCCgjCiTgrg0YxojoC4OmOSJ2D6D5kAgJLFgABAEICA=")
		oTree:SelBackMode := 1/*exTransparent*/
		oTree:ShowFocusRect := .F.
		oTree:DefaultItemHeight := 24
		oTree:HeaderHeight := 24
		oTree:DrawGridLines := 2/*exVLines*/
		oTree:Columns():Add("C1")
		oTree:Columns():Add("C2")
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("Cell 1"),1,"Cell 2")
			h := oItems:AddItem("Cell 2")
			oItems:SetProperty("CellCaption",h,1,"Cell 3")
			oItems:SetProperty("CellBackColor",h,1,0x1000000)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
710
Is it possible to highligth the match while a filter is applied

PROCEDURE OnAddColumn(oTree,Column)
	/*Column.Def(17) = 1*/

RETURN

PROCEDURE OnFilterChange(oTree)
	LOCAL format
	format := oTree:FormatABC("`value replace '` + value + `' with '<bgcolor 000000><fgcolor FFFFFF>` + value  + `</fgcolor></bgcolor>'`",oTree:FilterBarPromptPattern())
	oTree:Columns:Item(0):FormatColumn := Transform(format,"")
	oTree:Columns:Item(1):FormatColumn := Transform(format,"")
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:AddColumn := {|Column| OnAddColumn(oTree,Column)} /*Fired after a new column has been added.*/
		oTree:FilterChange := {|| OnFilterChange(oTree)} /*Notifies your application that the filter is changed.*/

		oTree:BeginUpdate()
		oTree:DrawGridLines := 2/*exVLines*/
		oTree:HeaderAppearance := 4/*Etched*/
		oTree:Columns():Add("Col 1")
		oTree:Columns():Add("Col 2")
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("219 Smith"),1,"Ignacio 1234")
			oItems:SetProperty("CellCaption",oItems:AddItem("1666 County Road 309A"),1,"897 Manassa")
			oItems:SetProperty("CellCaption",oItems:AddItem("38 Lone Pine"),1,"Durango 11")
			oItems:SetProperty("CellCaption",oItems:AddItem("612 Jachim Street"),1,"Lamar 222")
		oTree:FilterBarPromptPattern := "1"
		oTree:FilterBarPromptVisible := 2067/*exFilterBarCompact+exFilterBarSingleLine+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPromptType := 257/*exFilterPromptCaseSensitive+exFilterPromptContainsAll*/
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
709
Is it possible to highlight the column's header once a filter is applied (sample 2)

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oAppearance := oTree:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABO8GACAADACAxRDgMQBQKAAzQFAYbBuGCGAAGIYBTgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwQgmNYDSBMcbwSAsXRYFocJ5gOT6AjKBA2UclEZpajiTY3ABUEgUS5oOBIACqariaQJAAiCRQGiYZyHKaRSwPBKFYDIIjbJheTIDChNVxUcDENQjJqLBIDRzbarye59YBfeBXdgmA4LQbDMRwNgMMQTDqKYbkOQZHbeGKAWTMEZzJj8cxTEqIaBhGTLfojSZMS7UGK1LLtMyHI6kP7sOiLfi2W4/W7XV72F79TzXIa2ZBuO57bhnAZ/VzGNj4PRNezfRqicjsGxcZwXg+TpQj0ew6gSOw7wSbozjsfYXi8PwMnSc52leHotl+MxjmoXh2nybxOH+SQtnYXx+D2P4vGMB56hQf5PCgBYeDwYBCEo1xggebgKH6IIDBYBgkiAQ5FgYPAhEIRgWGq" +;
		"DBoC4GoCiGCBYhGBQPAWdIQp0eIUiWCZigiJgqgqYpIioJQhmIMhBH0NxjEMag2g2Y4ImYOoOmOSJeDQNxXlOLR3ECUAQICA=")
			oAppearance:Add(2,"gBFLBCJwBAEHhEJAAEhABgsHQAAYAQGKIcBiAKBQAGaAoDDYNwwQwAAxDAKcEwsACEIrjKCRShyCYZRrGUgRCKQahLEiTIhGUYJHgmK4tRoAUgxWCEExrAaQJjjeCQFi6LAtDhPMByfQEZQIGyjkgjNLUcSbG4AKgkCiXfpUAJVP7FcgSABEEigNIxToOU4jFgeCYLQKQRK2RC9GQGFCbLhpYKIahGTYWVheN5XXblez9P7ABQwKCcAwXBp7YIKAT4XBIdYdQ7IL4xGA0AJPFoJC7mOQ5XiYAIBAZ/RL0LCcbxHHafVboQj6JouD5PUDVNY1XBdPynI6CbLhWy6Dq4UZzPwzeBifSHfDjRoJcCZe71KY3GwSEboNA6Kp+QBHAmZoZjSPYIEiF47lOLJVnuYofBwJJHmaQoYj0MIRHeM4/m6cJ8B+fpBHQJ5SGKPYYH8OYMk+P5Bn4fxaAYZAvEIX4RgUWBGgCCAmAqApgkgNgOgMEYlGASoEkQeBWBa" +;
		"BZhggZgagaYRoEwShWA6NZZAMQBAICA==")
		oTree:SetProperty("Background",0/*exHeaderFilterBarButton*/,0x1000000)
		oTree:SetProperty("Background",41/*exHeaderFilterBarActive*/,0x2000000)
		oTree:SetProperty("Background",32/*exCursorHoverColumn*/,-1)
		oTree:HeaderHeight := 28
		oTree:SetProperty("BackColorHeader",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oTree:DrawGridLines := -2/*exRowLines*/
		oTree:HeaderVisible := .T.
		oColumns := oTree:Columns()
			oColumns:Add("C1"):DisplayFilterButton := .T.
			oColumn := oColumns:Add("C2")
				oColumn:DisplayFilterButton := .T.
				oColumn:Filter := "Item 2"
				oColumn:FilterType := 240/*exFilter*/
			oColumns:Add("C3"):DisplayFilterButton := .T.
		oItems := oTree:Items()
			h := oItems:AddItem("Item 1")
			oItems:SetProperty("CellCaption",h,1,"Item 2")
			oItems:SetProperty("CellCaption",h,2,"Item 3")
			h := oItems:AddItem("Item 4")
			oItems:SetProperty("CellCaption",h,1,"Item 5")
			oItems:SetProperty("CellCaption",h,2,"Item 6")
		oTree:ApplyFilter()
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
708
How can I make the expand/collapse glyphs DPI aware

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		size := 2
		oTree:BeginUpdate()
		oAppearance := oTree:VisualAppearance()
			oAppearance:Add(3,"gBFLBCJwBAEHhEJAAEhEGAUHQAAYAQGKIcBiAKBQAGaAoDDYOA4QwAAxDAKcEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQiiCYsS5GQBRfIUEghGyNZjgNzQcCQAI8T5IUgARBJIDSMY6DpOIxYHgmC4DEITNLxOK0EhRHCBZrgOCAYhqEY1Ro+dhPFYjVTMdK0LRtKy7Mq2aJmOpZDxWE7dZKpO5fbxXS67cr2fp/YBed4rfa7KTlOBKcRQRBEFQPDqPZBkORZHh2FoLRJKbgtHJmHYNQWhVyYBbNCyTI6lahpeuHBx1QaWWxjbCMEr6bpoWLbFi3Ha1UzrPa8b5vSw7Gr+HzYQTHGPXGqaYJdZrnea6B7+U5XUJrnSOZciYHwhAeR5HDK+JVGqKRRmScx5HyfRei+H5bmmcp4Fi8o/CGGJKGQKZUGoFQigUPIiCeSZXnyHB6l0SAJn8JxfkIeZ5CgXxjCCAhyB8QgIlAM4MlKAIcCaIBIGY" +;
		"GoGGEYhqBMMxgnICgRDUDQjESGwmAkWBuCqBoiHIVgkDQYgYESWg2E0YhohcJQigITg3CQSRyEyEYGGOWJwhQJD4FiFIMk0aJFGsIBkkOBJeDc+AchYJwJgIWhSgYZQpFIVoVGOGQ4l2EwIBWMhgDmDhThCEwkAiaJchKDhjhgZhsCUY4iFCEoZkiaYQmSGAWhWQhgDuDpTjCDQiEgchAg0IpJBoDoFiEKBqCaCAimgIguH8IZnkPUhcBcJg+hGJZnloYJsiaKZKGa24YnWSR0CkKhCA2CxlCqColhAYpqEKER0DqVZ0A0ASAgA==")
			oAppearance:Add(4,"gBFLBCJwBAEHhEJAAEhABAQCg6AADACAxRDgMQBQKAAzQFAYbBwHCGAAGIYBTgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACjeQYJBCNYbTJAbqhYIgAR3HqQZABCCSQKkYx0HScRiwPBMFwGIQmaaicZoJCiN4DTZAcIBRDUIxpDR9bBeKw3KqVaZnWhaNpWXZlTzKdSxXisF67RZSdi/XgvF5XXblez9P69LwXe5mUrGbyVYghCCIKgeG4dR7IMhyLDcKQXCCVW7aGSsOwbAqAXpdGAXTQdDyLJKnaZqOi6BjjA4rNbHGIYJb1XTRMa1LJuG5LJrOeZ3Xre4BLfh1VoFRpjWIYNY1QS7TLOczzfRdDxTiGVpkjCeJoD4Ng1hSRxiisVRKg8D4PkWZJznmPQ+F8Xx5guWpjHGWYMiYQodEaIRSCgU5KCSeh3naHB/iAAh9n8fwfgIeZ1CgXwjCCAhxl8AgIlAM4MlKAIcCaD54FY" +;
		"FoFmGCBmBaBIJigPJNgKSAoDSVC+BIbIYCUYYoiYKoJgkWIMlGCAglMaJZDWCYiFyFIJkkOJYhEJc7G4PYPCOaJshQJBjgiVIUgyDRokEaggGSQ4El4N1CBiFgnAmAhaFKFZlFkShUhWJRYmITg3GSQgFGuGBOGOFJkCSSQCDoNgkiOCY0hUJJmmmQhvhqZtYmUOQmBWIRvhgTpjjSbAjEiEgchBZgyEaBIhigWgegqIhIjoDILiACB5nTL5WnWRYOiSKYJnqGQ7CmOh2hqJ5OkYORxFyShKhSAxihkOomioY5YiqFIkFyTo1HkAxAEAgIA==")
			oAppearance:Add(1,oTree:FormatABC("`CP:3 -` + int(value*dpi) + ` -` + int(value*dpi) + ` ` +  int(value*dpi) + ` ` + int(value*dpi)",size))
			oAppearance:Add(2,oTree:FormatABC("`CP:4 -` + int(value*dpi) + ` -` + int(value*dpi) + ` ` +  int(value*dpi) + ` ` + int(value*dpi)",size))
		oTree:LinesAtRoot := 1/*exGroupLinesAtRoot*/
		oTree:HasButtons := 4/*exCustom*/
		oTree:SetProperty("HasButtonsCustom",.F.,16777216)
		oTree:SetProperty("HasButtonsCustom",.T.,33554432)
		oTree:Columns():Add("Column")
		oItems := oTree: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")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
707
Is it possible to highlight the column's header once a filter is applied (sample 1)

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oAppearance := oTree:VisualAppearance()
			oAppearance:Add(2,"gBFLBCJwBAEHhEJAAEhABX8GACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGQaBUgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwYgmNYiTLAcgANJ0WBaGIZJ4gOT5fDKMoEDRRYADFCscwxJybQAqGQKKb+VgAVY/cTyBIAEQSKA0TDOQ5TSKWB4JPZQRBEbZMNBtBIUJquKaqShdQJCU5FdY3Xblez9P7AMBwLFEC4NQ8YNYuPhjR4dRTIMhvVAsUArFh8Zg9GZZFjmDIDT4ydBLTQwcyVIKnP5qOa6XbmPoCQDYKxZHYxPzVDa3axuL76dqCAT7XrXNy1TbNRrzQKfcJqfCbdw2YaDZLOOT3fjuI4hhKaRzFAHJ+jYQ4xHuY4gHuGIXGeExqC8Tp6C+PoEm+G5ImycRgh0XwvDGa5rgOeoejyXwnFeQp2mkf5ClgBB9gCWIYAwfYAEKV58mkdwOggNArgOXY2EWLoDkKOA0mg" +;
		"bhOGgZApgaSBIHWSYHSmbApgYThmESZYJkIeIkgeCpfliLIHgpMIcmUYYYmODAlg2SI4mWfRfGOEguDcCRjFYAJihCQhJBSDoRmONgKEcI4kFCEJhhOVYTmYnAlEAQhWBMJYJGYWoWmWSR2F6F5lnkWAQhUAgpEieRWEuSYkjWGpmkmNhuhuZwJkYcocmaaYkjyEhngnUA6lEFAlAEgI=")
			oAppearance:Add(1,"CP:2 -8 -4 2 4")
		oTree:SetProperty("Background",0/*exHeaderFilterBarButton*/,0x1fefefe)
		oTree:SetProperty("Background",41/*exHeaderFilterBarActive*/,0x1010101)
		oTree:SetProperty("Background",32/*exCursorHoverColumn*/,-1)
		oTree:HeaderHeight := 28
		oTree:SetProperty("BackColorHeader",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oTree:DrawGridLines := -2/*exRowLines*/
		oTree:HeaderVisible := .T.
		oColumns := oTree:Columns()
			oColumns:Add("C1"):DisplayFilterButton := .T.
			oColumn := oColumns:Add("C2")
				oColumn:DisplayFilterButton := .T.
				oColumn:Filter := "Item 2"
				oColumn:FilterType := 240/*exFilter*/
			oColumns:Add("C3"):DisplayFilterButton := .T.
		oItems := oTree:Items()
			h := oItems:AddItem("Item 1")
			oItems:SetProperty("CellCaption",h,1,"Item 2")
			oItems:SetProperty("CellCaption",h,2,"Item 3")
			h := oItems:AddItem("Item 4")
			oItems:SetProperty("CellCaption",h,1,"Item 5")
			oItems:SetProperty("CellCaption",h,2,"Item 6")
		oTree:ApplyFilter()
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
706
Is it possible to show the filterbar on top of the rows

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:FilterBarPromptVisible := 8192/*exFilterBarTop*/
		oTree:HeaderHeight := 24
		oTree:FilterBarHeight := oTree:HeaderHeight()
		oTree:HeaderAppearance := 1/*Flat*/
		oTree:DrawGridLines := -1/*exAllLines*/
		oTree:GridLineStyle := 512/*exGridLinesGeometric*/
		oColumn := oTree:Columns():Add("Column")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterType := 3/*exPattern*/
			oColumn:Filter := "B*"
		oColumn1 := oTree:Columns():Add("Index")
			oColumn1:FormatColumn := "1 index ``"
			oColumn1:Position := 0
			oColumn1:Width := 48
			oColumn1:AllowSizing := .F.
			oColumn1:SortType := 1/*SortNumeric*/
			oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
		oItems := oTree:Items()
			oItems:AddItem("A.1")
			oItems:AddItem("A.2")
			oItems:AddItem("B.1")
			oItems:AddItem("B.2")
			oItems:AddItem("B.3")
			oItems:AddItem("C")
		oTree:ApplyFilter()
		oTree:EndUpdate()

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

PROCEDURE OnOLEDragDrop(oTree,Data,Effect,Button,Shift,X,Y)
	/*SelectItem(InsertItem(i,, Data.GetData(1))) = True*/
	LOCAL oItems
	LOCAL i
	i := oTree:ItemFromPoint(-1,-1,c,hit)
	oItems := oTree:Items()
		oItems:SetProperty("ExpandItem",i,.T.)
RETURN

PROCEDURE OnOLEStartDrag(oTree,Data,AllowedEffects)
	/*Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1)*/
	AllowedEffects := 1
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:OLEDragDrop := {|Data,Effect,Button,Shift,X,Y| OnOLEDragDrop(oTree,Data,Effect,Button,Shift,X,Y)} /*Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur.*/
		oTree:OLEStartDrag := {|Data,AllowedEffects| OnOLEStartDrag(oTree,Data,AllowedEffects)} /*Occurs when the OLEDrag method is called.*/

		oTree:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABPUIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIaRjEEQDCKYcxHCaIBiGcaIfDEBIeSBHcgRbAcOQHGSZZBhGRJGjuKIbSrLICzBDUcRnGwAKQoaaaEomHwyAZOYwDAIoWhpKKCKjqWJKNb+XgAAJTES0RRVRTNAZ1YghGAQgIA==")
		oTree:SetProperty("Background",96/*exListOLEDropPosition*/,0x1000000)
		oTree:SetProperty("Background",33/*exDragDropBefore*/,AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oTree:SetProperty("Background",34/*exDragDropAfter*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oTree:OLEDropMode := 1/*exOLEDropManual*/
		oTree:AutoDrag := 196608/*exAutoDragPositionAnyOnRight*/
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Indent := 16
		oTree:SelBackMode := 1/*exTransparent*/
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		DevOut( "You can:" )
		DevOut( "A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)" )
		DevOut( "B) right-click to re-arrange the item position inside the same control" )
		DevOut( "This sample shows how you can insert the data being dropped as a child of the item being hovered." )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
704
DragDrop (with no visual effect, hide item while drag and drop)

PROCEDURE OnOLEDragDrop(oTree,Data,Effect,Button,Shift,X,Y)
	/*SelectItem(InsertItem(i,, Data.GetData(1))) = True*/
	LOCAL oItems
	LOCAL i
	i := oTree:ItemFromPoint(-1,-1,c,hit)
	oItems := oTree:Items()
		oItems:SetProperty("ExpandItem",i,.T.)
RETURN

PROCEDURE OnOLEStartDrag(oTree,Data,AllowedEffects)
	/*Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1)*/
	AllowedEffects := 1
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:OLEDragDrop := {|Data,Effect,Button,Shift,X,Y| OnOLEDragDrop(oTree,Data,Effect,Button,Shift,X,Y)} /*Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur.*/
		oTree:OLEStartDrag := {|Data,AllowedEffects| OnOLEStartDrag(oTree,Data,AllowedEffects)} /*Occurs when the OLEDrag method is called.*/

		oTree:SetProperty("Background",33/*exDragDropBefore*/,AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oTree:SetProperty("Background",34/*exDragDropAfter*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oTree:OLEDropMode := 1/*exOLEDropManual*/
		oTree:AutoDrag := 196608/*exAutoDragPositionAnyOnRight*/
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Indent := 16
		oTree:SelBackMode := 1/*exTransparent*/
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		DevOut( "You can:" )
		DevOut( "A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)" )
		DevOut( "B) right-click to re-arrange the item position inside the same control" )
		DevOut( "This sample shows how you can insert the data being dropped as a child of the item being hovered." )

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

PROCEDURE OnOLEDragDrop(oTree,Data,Effect,Button,Shift,X,Y)
	/*SelectItem(InsertItem(i,, Data.GetData(1))) = True*/
	LOCAL oItems
	LOCAL i
	i := oTree:ItemFromPoint(-1,-1,c,hit)
	oItems := oTree:Items()
		oItems:SetProperty("ExpandItem",i,.T.)
RETURN

PROCEDURE OnOLEStartDrag(oTree,Data,AllowedEffects)
	/*Data.SetData(Me.Items.CellCaption(FocusItem, 0), 1)*/
	AllowedEffects := 1
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:OLEDragDrop := {|Data,Effect,Button,Shift,X,Y| OnOLEDragDrop(oTree,Data,Effect,Button,Shift,X,Y)} /*Occurs when a source component is dropped onto a target component when the source component determines that a drop can occur.*/
		oTree:OLEStartDrag := {|Data,AllowedEffects| OnOLEStartDrag(oTree,Data,AllowedEffects)} /*Occurs when the OLEDrag method is called.*/

		oTree:OLEDropMode := 1/*exOLEDropManual*/
		oTree:AutoDrag := 196608/*exAutoDragPositionAnyOnRight*/
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Indent := 16
		oTree:SelBackMode := 1/*exTransparent*/
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		DevOut( "You can:" )
		DevOut( "A) left-click to drag and drop items between controls (open a new exhelper and run the same sample)" )
		DevOut( "B) right-click to re-arrange the item position inside the same control" )
		DevOut( "This sample shows how you can insert the data being dropped as a child of the item being hovered." )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
702
Is there anyway to stop the header changing colour when the mouse hovers/moves across the column header (non-clickable)

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:HeaderAppearance := 4/*Etched*/
		oColumns := oTree:Columns()
			oColumns:Add("Item")
			oColumn := oColumns:Add("Pos")
				oColumn:Position := 0
				oColumn:Width := 32
				oColumn:AllowSizing := .F.
				oColumn:FormatColumn := "1 index ``"
				oColumn:AllowSort := .F.
				oColumn:AllowDragging := .F.
		oItems := oTree:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
701
Is there anyway to stop the header changing colour when the mouse hovers/moves across the column header

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:HeaderAppearance := 4/*Etched*/
		oTree:SetProperty("Background",32/*exCursorHoverColumn*/,-1)
		oColumns := oTree:Columns()
			oColumns:Add("Item")
			oColumn := oColumns:Add("Pos")
				oColumn:Position := 0
				oColumn:Width := 32
				oColumn:AllowSizing := .F.
				oColumn:FormatColumn := "1 index ``"
				oColumn:AllowSort := .F.
				oColumn:AllowDragging := .F.
		oItems := oTree:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
700
Is it possible to display the header using multiple lines(sample 1)

PROCEDURE OnAddColumn(oTree,Column)
	/*Column.Def(52) = 4*/
	/*Column.Def(53) = 4*/

RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:AddColumn := {|Column| OnAddColumn(oTree,Column)} /*Fired after a new column has been added.*/

		oTree:BeginUpdate()
		oTree:HeaderHeight := 36
		oTree:HeaderAppearance := 1/*Flat*/
		oTree:HeaderSingleLine := .F.
		oColumns := oTree:Columns()
			oColumns:Add("Column")
			oColumns:Add("This is a bit of text that should break the header"):Width := 128
			oColumns:Add("This is a bit of text that should break the header"):Width := 96
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
699
Is it possible to display the header using multiple lines(sample 2)

PROCEDURE OnAddColumn(oTree,Column)
	/*Column.Def(52) = 4*/
	/*Column.Def(53) = 4*/

RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:AddColumn := {|Column| OnAddColumn(oTree,Column)} /*Fired after a new column has been added.*/

		oTree:BeginUpdate()
		oTree:HeaderHeight := 36
		oTree:HeaderAppearance := 1/*Flat*/
		oColumns := oTree:Columns()
			oColumns:Add("Column")
			oColumns:Add("C1"):HTMLCaption := "<b>C<off 4>1</b><br>left"
			oColumns:Add("C2"):HTMLCaption := "<c><b>C<off 4>2</b><br><c>center"
			oColumns:Add("C3"):HTMLCaption := "<r><b>C<off 4>3</b><br><r>right"
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
698
Is it possible to exclude the parent/child items when do the filtering, so to include only items that match the filter without any indentation

PROCEDURE OnFilterChange(oTree)
	oTree:Indent := oTree:FormatABC("value > 0 ? 18 : 0",:Items:MatchItemCount())
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:FilterChange := {|| OnFilterChange(oTree)} /*Notifies your application that the filter is changed.*/

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Indent := 18
		oTree:FilterInclude := 4/*exMatchingItemsOnly*/
		oTree:DrawGridLines := 2/*exVLines*/
		oTree:HeaderAppearance := 1/*Flat*/
		oColumns := oTree:Columns()
			oColumn := oColumns:Add("Column")
				oColumn:DisplayFilterButton := .T.
				oColumn:FilterType := 240/*exFilter*/
				oColumn:FilterList := 256/*exShowCheckBox*/
				oColumn:Filter := "C1"
			oColumn1 := oColumns:Add("Pos")
				oColumn1:FormatColumn := "1 rindex ``"
				oColumn1:Position := 0
				oColumn1:AllowSizing := .F.
				oColumn1:AllowDragging := .F.
		oItems := oTree:Items()
			h := oItems:AddItem("R1")
			h2 := oItems:InsertItem(h,,"S")
			oItems:InsertItem(h2,,"C1")
			oItems:InsertItem(h2,,"C2")
			oItems:InsertItem(h,,"C1")
			oItems:InsertItem(h,,"C2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("R2")
			oItems:InsertItem(h,,"C1")
			oItems:InsertItem(h,,"C2")
		oTree:ApplyFilter()
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
697
I would like to display a solid line between "root" items, and dotted lines (default) between child items. How can I do that

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:DrawGridLines := 1/*exHLines*/
		oTree:GridLineStyle := 512/*exGridLinesGeometric*/
		oTree:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhABMsIQAAYAQGKIcBiAKBQAGaAoDgYN4MAANAwjJBMKgBBCLIxhEYobgmGIXRpFMbxAKQahLEiTIgGUYJHgmK4tQLHb7zGAABRDDSOIDnGQJXhaI4JQSMMQDGLAZxVFiPRhAWLpBh+PQATrOdLUfSjVwhBKAQEBA==")
		oColumn := oTree:Columns():Add("Default")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oColumn1 := oTree:Columns():Add("Position")
			oColumn1:FormatColumn := "((1 rindex ``) contains `.`) = 0"
			oColumn1:Visible := .F.
		oConditionalFormat := oTree:ConditionalFormats():Add("%C1")
			oConditionalFormat:SetProperty("BackColor",0x1e0e0e0)
		oItems := oTree:Items()
			h := oItems:AddItem("Root 1")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:InsertItem(h,,"Child 3")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Root 2")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			h := oItems:AddItem("Root 3")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
696
I can not center or align the cell's caption and icon, when it displays the hierarchy

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oColumn := oTree:Columns():Add("Tasks")
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oTree:HeaderVisible := .T.
		oItems := oTree:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"<img>1</img> Task (left)")
			hChild := oItems:InsertItem(h,,"<c><img>2</img> Task (center)")
			hChild := oItems:InsertItem(h,,"<r>Task (right) <img>3</img>")
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
695
How do I set an extra data for each item
PROCEDURE OnMouseMove(oTree,Button,Shift,X,Y)
	LOCAL i
	i := oTree:ItemFromPoint(-1,-1,c,hit)
	DevOut( Transform(i,"") )
	DevOut( Transform(oTree:Items:ItemData(i),"") )
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oTree,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			oItems:SetProperty("ItemData",oItems:AddItem("method 1"),"your extra data of method 1")
			oItems:InsertItem(0,"your extra data of method 2","method 2")
		oItems1 := oTree:Items()
			oItems1:DefaultItem := oItems1:AddItem("method 3")
			oItems1:SetProperty("ItemData",0,"your extra data of method 3")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
694
I do not like to specify the item padding for every column I add. The question is how can I do it automatically

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:AttachTemplate("handle AddColumn(Column){Column{Def(48)=8;Def(49)=8;AllowDragging=False;AllowSizing = True}}")
		oTree:HeaderAppearance := 4/*Etched*/
		oTree:DrawGridLines := -1/*exAllLines*/
		oTree:GridLineStyle := 32/*exGridLinesVSolid*/
		oColumns := oTree:Columns()
			oColumns:Add("Item")
			oColumn := oColumns:Add("Pos")
				oColumn:Position := 0
				oColumn:Width := 32
				oColumn:AllowSizing := .F.
				oColumn:FormatColumn := "1 index ``"
		oItems := oTree:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
693
Can I sort the column by check-state

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oColumn := oTree:Columns():Add("Check")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:SortType := 32/*exSortByState*/
		oItems := oTree:Items()
			oItems:AddItem()
			oItems:SetProperty("CellState",oItems:AddItem(),0,1)
			oItems:SetProperty("CellState",oItems:AddItem(),0,1)
			oItems:AddItem()
		oTree:Columns:Item(0):SortOrder := 1/*SortAscending*/
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
692
Can I sort the column by image

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oColumn := oTree:Columns():Add("Image")
			oColumn:SortType := 48/*exSortByImage*/
		oItems := oTree:Items()
			oItems:SetProperty("CellImage",oItems:AddItem(),0,3)
			oItems:AddItem()
			oItems:SetProperty("CellImage",oItems:AddItem(),0,1)
			oItems:SetProperty("CellImage",oItems:AddItem(),0,2)
		oTree:Columns:Item(0):SortOrder := 1/*SortAscending*/
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
691
How can I display UNICODE characters

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oStdFont := oTree:Font()
			oStdFont:Name := "Arial Unicode"
			oStdFont:Size := 22
		oTree:HeaderVisible := .F.
		oTree:DefaultItemHeight := 48
		oTree:Columns():Add(""):SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oTree:Items()
			oItems:AddItem("Ӓӓ")
			oItems:AddItem("ᦜᦝ;ᦞ")
			oItems:AddItem("ɮɭ;ɯ")
			oItems:AddItem("勳勴勵勶")
			oItems:SetProperty("FormatCell",oItems:AddItem(oTree:Version()),0,"(value lfind `UNICODE`) < 0 ? `<fgcolor=FF0000><b>!UNICODE!</b> version</fgcolor> required: ` + value : `` ")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
690
How do I display the position of the item with 0-padding
#include "AppEvent.ch"
#include "ActiveX.ch"

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Items"):FormatColumn := "((1 apos ``) lpad `00`) + `. `  + value"
		oItems := oTree:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
			oItems:AddItem("Item D")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
689
Can't get the +/- to be displayed on a divider item. What else can I do

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:DrawGridLines := -1/*exAllLines*/
		oTree:TreeColumnIndex := 0
		oTree:MarkSearchColumn := .F.
		oTree:FullRowSelect := .F.
		oTree:HeaderAppearance := -1/*0xfffffff8+Bump+Sunken*/
		oColumns := oTree:Columns()
			oColumns:Add("C1"):Width := 32
			oColumns:Add("C2"):FormatColumn := "1 index ``"
		oItems := oTree:Items()
			h := oItems:AddItem("Cell 1")
			oItems:SetProperty("CellSingleLine",h,1,0/*exCaptionWordWrap*/)
			h := oItems:AddItem("This is bit of text merges all cells in the item (divider shows no +/-)")
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("ItemBackColor",h,AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
			oItems:SetProperty("ItemDividerLine",h,0/*EmptyLine*/)
			oItems:SetProperty("CellHAlignment",h,0,1/*CenterAlignment*/)
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
			h := oItems:AddItem("Cell 3")
			h := oItems:AddItem("This is bit of text merges all cells in the item (merge shows +/-)")
			oItems:SetProperty("ItemBackColor",h,AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
			oItems:SetProperty("CellMerge",h,0,1)
			oItems:InsertItem(h,,"Child 3")
			oItems:InsertItem(h,,"Child 4")
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()

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

PROCEDURE OnCellButtonClick(oTree,Item,ColIndex)
	LOCAL cmd
	cmd := CreateObject("ADODB.Command")
		cmd:ActiveConnection := oTree:DataSource():ActiveConnection()
		cmd:CommandText := "INSERT INTO Orders (EmployeeID) VALUES(12345)"
		cmd:CommandType := 1/*adCmdText*/
		cmd:Execute()
	oTree:DataSource():Requery()
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:CellButtonClick := {|Item,ColIndex| OnCellButtonClick(oTree,Item,ColIndex)} /*Fired after the user clicks on the cell of button type. */

		oTree:BeginUpdate()
		oTree:HeaderAppearance := 4/*Etched*/
		oTree:ColumnAutoResize := .F.
		rs := CreateObject("ADODB.Recordset")
			rs:Open("Select * From Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.accdb",1/*adOpenKeyset*/,3/*adLockOptimistic*/)
		oTree:DataSource := rs
		oTree:ConditionalFormats():Add("%1=12345"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oItems := oTree:Items()
			oItems:SetProperty("LockedItemCount",0/*TopAlignment*/,1)
			h := oItems:LockedItem(0/*TopAlignment*/,0)
			oItems:SetProperty("ItemDivider",h,0)
			oItems:SetProperty("CellHasButton",h,0,.T.)
			oItems:SetProperty("CellCaption",h,0,"Requery (add a new record, using ADODB.Command)")
			oItems:SetProperty("CellHAlignment",h,0,1/*CenterAlignment*/)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
687
How do I use the ColumnsFloatBarVisible on exColumnsFloatBarVisibleIncludeCheckColumns

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .F.
		oTree:HeaderAppearance := 4/*Etched*/
		oColumns := oTree:Columns()
			oColumns:Add("City")
			oColumns:Add("Start"):Visible := .F.
			oColumns:Add("End"):Visible := .F.
		oTree:SetProperty("Description",26/*exColumnsFloatBar*/,"Show/Hide")
		oTree:ColumnsFloatBarSortOrder := 1/*SortAscending*/
		oTree:ColumnsFloatBarVisible := 2/*exColumnsFloatBarVisibleIncludeCheckColumns*/
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
686
How do I use the ColumnsFloatBarVisible on exColumnsFloatBarVisibleIncludeHiddenColumn

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .F.
		oTree:HeaderAppearance := 4/*Etched*/
		oColumns := oTree:Columns()
			oColumns:Add("City")
			oColumns:Add("Start"):Visible := .F.
			oColumns:Add("End"):Visible := .F.
		oTree:SetProperty("Description",26/*exColumnsFloatBar*/,"Show")
		oTree:ColumnsFloatBarVisible := -1/*exColumnsFloatBarVisibleIncludeHiddenColumns*/
		oTree:ColumnsFloatBarSortOrder := 1/*SortAscending*/
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
685
Type of wraps the cell's caption support (Sample 2)

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:HeaderSingleLine := .F.
		oTree:HeaderHeight := 36
		oTree:DrawGridLines := -2/*exRowLines*/
		oTree:ColumnAutoResize := .F.
		oTree:ScrollBySingleLine := .T.
		oColumns := oTree:Columns()
			oColumn := oColumns:Add("Single-Line (exCaptionSingleLine)")
				oColumn:Width := 96
				oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
				oColumn:SetProperty("Def",16/*exCellSingleLine*/,-1)
			oColumn1 := oColumns:Add("Word-Wrap (exCaptionWordWrap)")
				oColumn1:Width := 96
				oColumn1:SetProperty("Def",17/*exCellCaptionFormat*/,1)
				oColumn1:SetProperty("Def",16/*exCellSingleLine*/,0)
				oColumn1:FormatColumn := "%0"
			oColumn2 := oColumns:Add("Break-Wrap (exCaptionBreakWrap)")
				oColumn2:Width := 96
				oColumn2:SetProperty("Def",17/*exCellCaptionFormat*/,1)
				oColumn2:SetProperty("Def",16/*exCellSingleLine*/,1)
				oColumn2:FormatColumn := "%0"
		oItems := oTree:Items()
			oItems:AddItem("This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line.")
			oItems:AddItem("This is the <b>first</b> line.\r\nThis is the <b>second</b> line.\r\nThis is the <b>third</b> line.")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
684
Type of wraps the cell's caption support (Sample 1)

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:HeaderSingleLine := .F.
		oTree:HeaderHeight := 36
		oTree:DrawGridLines := -2/*exRowLines*/
		oTree:ColumnAutoResize := .F.
		oTree:ScrollBySingleLine := .T.
		oTree:Columns():Add("Default"):Width := 128
		oItems := oTree:Items()
			h := oItems:AddItem("This is the first line.\r\nThis is the second line.\r\nThis is the third line.")
			h := oItems:AddItem("This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line.")
			oItems:SetProperty("CellCaptionFormat",h,0,1/*exHTML*/)
			h := oItems:AddItem("This is the first line.\r\nThis is the second line.\r\nThis is the third line.")
			oItems:SetProperty("CellSingleLine",h,0,0/*exCaptionWordWrap*/)
			h := oItems:AddItem("This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line.")
			oItems:SetProperty("CellCaptionFormat",h,0,1/*exHTML*/)
			oItems:SetProperty("CellSingleLine",h,0,0/*exCaptionWordWrap*/)
			h := oItems:AddItem("This is the first line.\r\nThis is the second line.\r\nThis is the third line.")
			oItems:SetProperty("CellSingleLine",h,0,1/*exCaptionBreakWrap*/)
			h := oItems:AddItem("This is the <b>first</b> line.<br>This is the <b>second</b> line.<br>This is the <b>third</b> line.")
			oItems:SetProperty("CellCaptionFormat",h,0,1/*exHTML*/)
			oItems:SetProperty("CellSingleLine",h,0,1/*exCaptionBreakWrap*/)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
683
Can I break the cell's caption using the line break <br> or \r\n (Sample 2)

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:DrawGridLines := -2/*exRowLines*/
		oTree:ColumnAutoResize := .F.
		oTree:ScrollBySingleLine := .T.
		oTree:Columns():Add("Default"):Width := 128
		oItems := oTree:Items()
			oItems:SetProperty("CellSingleLine",oItems:AddItem("This is the first line.\r\nThis is the second line.\r\nThis is the third line."),0,1/*exCaptionBreakWrap*/)
			oItems:AddItem("This is the first line.\r\nThis is the second line.\r\nThis is the third line.")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
682
Can I break the cell's caption using the line break <br> or \r\n (Sample 1)

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:DrawGridLines := -2/*exRowLines*/
		oTree:ColumnAutoResize := .F.
		oTree:ScrollBySingleLine := .T.
		oColumn := oTree:Columns():Add("Default")
			oColumn:Width := 128
			oColumn:SetProperty("Def",16/*exCellSingleLine*/,1)
		oItems := oTree:Items()
			oItems:AddItem("This is the first line.\r\nThis is the second line.\r\nThis is the third line.")
			oItems:AddItem("This is the first line.\r\nThis is the second line.\r\nThis is the third line.")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
681
How can I change the visual appearance/color of the Filter For ... field

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:SetProperty("BackColorHeader",AutomationTranslateColor( GraMakeRGBColor  ( { 1,0,0 } )  , .F. ))
		oTree:SetProperty("ForeColorHeader",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oTree:SetProperty("Background",26/*exBackColorFilter*/,oTree:BackColorHeader())
		oTree:SetProperty("Background",27/*exForeColorFilter*/,oTree:ForeColorHeader())
		oTree:SetProperty("Background",0/*exHeaderFilterBarButton*/,AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oTree:SetProperty("Background",32/*exCursorHoverColumn*/,-1)
		oTree:HeaderAppearance := 5/*Bump*/
		oColumn := oTree:Columns():Add("Items")
			oColumn:FilterOnType := .T.
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 2/*exNoItems*/
		oItems := oTree: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")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
680
How can I display the cell's caption without spaces on both sides

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oColumn := oTree:Columns():Add("Default")
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn:FormatColumn := "((trim(value) replace `   ` with ` `) replace `  ` with ` `) replace ` ` with `<bgcolor=FF0000> </bgcolor>`"
		oItems := oTree:Items()
			oItems:AddItem("")
			oItems:AddItem("Item A")
			oItems:AddItem("    Item B")
			oItems:AddItem("        Item   C    ")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
679
How can I highlight the spaces within the column (sample 2)

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oColumn := oTree:Columns():Add("Default")
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn:FormatColumn := "`'` + ( value replace ` ` with `_` ) + `'`"
		oItems := oTree:Items()
			oItems:AddItem("")
			oItems:AddItem("Item A")
			oItems:AddItem("    Item B")
			oItems:AddItem("        Item   C    ")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
678
How can I highlight the spaces within the column (sample 1)

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oColumn := oTree:Columns():Add("Default")
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn:FormatColumn := "len(value) = 0 ? `<bgcolor=FF0000> </bgcolor>` : ( value replace ` ` with `<bgcolor=FF0000> </bgcolor>` )"
		oItems := oTree:Items()
			oItems:AddItem("")
			oItems:AddItem("Item A")
			oItems:AddItem("    Item B")
			oItems:AddItem("        Item   C    ")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
677
How can I change the visual aspect of the drop down filter-calendar

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:SetProperty("Background",26/*exBackColorFilter*/,AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
		oTree:SetProperty("Background",27/*exForeColorFilter*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oTree:SetProperty("Background",12/*exDateScrollRange*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oTree:SetProperty("Background",8/*exDateHeader*/,oTree:Background(26/*exBackColorFilter*/))
		oTree:SetProperty("Background",11/*exDateScrollThumb*/,AutomationTranslateColor( GraMakeRGBColor  ( { 128,128,128 } )  , .F. ))
		oColumn := oTree:Columns():Add("Date")
			oColumn:FilterType := 4/*exDate*/
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterDate := .T.
			oColumn:DisplayFilterPattern := .F.
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
676
Export Data in HTML format

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4,oColumn5,oColumn6
	LOCAL oColumns
	LOCAL oConditionalFormat,oConditionalFormat1
	LOCAL oConditionalFormats
	LOCAL oItems
	LOCAL oShellBrowserWindow
	LOCAL oTree
	LOCAL h,sFile

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oTree:DrawGridLines := -1/*exAllLines*/
		oTree:HeaderAppearance := 4/*Etched*/
		oTree:SetProperty("Description",11/*exFilterBarAnd*/,Transform(oTree:FormatABC("`<fgcolor=808080> ` + value + ` </fgcolor>`",oTree:Description(11/*exFilterBarAnd*/)),""))
		oTree:FilterBarCaption := "(( ( value replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace `[<s>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` )  + `<r><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcount + ` item(s)`) )))"
		oTree:FilterBarPromptVisible := 2579/*exFilterBarCompact+exFilterBarShowCloseIfRequired+exFilterBarSingleLine+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPromptType := 2/*exFilterPromptContainsAny*/
		oConditionalFormats := oTree:ConditionalFormats()
			oConditionalFormats:Add("%0 like `*parent*`","parent"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 192,192,192 } )  , .F. ))
			oConditionalFormat := oConditionalFormats:Add("%0 like `*child*`","child")
				oConditionalFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,128,128 } )  , .F. ))
				oConditionalFormat:ApplyTo := 0/*exFormatToColumns*/
			oConditionalFormat1 := oConditionalFormats:Add("%0 like `*B*`","b")
				oConditionalFormat1:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
				oConditionalFormat1:Bold := .T.
				oConditionalFormat1:Italic := .T.
				oConditionalFormat1:ApplyTo := 0/*exFormatToColumns*/
		oColumns := oTree:Columns()
			oColumn := oColumns:Add("Value")
				oColumn:Width := 128
				oColumn:HTMLCaption := "<b>VA</b><r>sko"
			oColumn1 := oColumns:Add("APos")
				oColumn1:FormatColumn := "0 apos ``"
				oColumn1:AllowSort := .F.
				oColumn1:SetProperty("Def",4/*exCellBackColor*/,15790320)
				oColumn1:SetProperty("Def",5/*exCellForeColor*/,8421504)
				oColumn1:SetProperty("Def",8/*exHeaderForeColor*/,oColumn1:Def(5/*exCellForeColor*/))
				oColumn1:Position := 0
			oColumn2 := oColumns:Add("RPos")
				oColumn2:FormatColumn := "0 rpos ``"
				oColumn2:AllowSort := .F.
				oColumn2:Position := 1
			oColumn3 := oColumns:Add("Index")
				oColumn3:FormatColumn := "0 index ``"
				oColumn3:DisplayFilterButton := .T.
				oColumn3:FilterList := 256/*exShowCheckBox*/
				oColumn3:Position := 2
			oColumn4 := oColumns:Add("Data 1")
				oColumn4:FormatColumn := "0 index `A-Z`"
				oColumn4:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn5 := oColumns:Add("Data 2")
				oColumn5:FormatColumn := "0 index `AB` replace `A` with `<off -4>A</off>`"
				oColumn5:SetProperty("Def",16/*exCellSingleLine*/,.F.)
				oColumn5:SetProperty("Def",17/*exCellCaptionFormat*/,1)
				oColumn5:SetProperty("Def",1/*exCellHasRadioButton*/,.T.)
			oColumn6 := oColumns:Add("Data 3")
				oColumn6:FormatColumn := "0 index `CDC` replace `D` with `<b>D</b>`"
				oColumn6:SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oTree:Items()
			h := oItems:AddItem("ParentA")
			oItems:InsertItem(h,,"Child A")
			oItems:InsertItem(h,,"Child B")
			oItems:SetProperty("CellState",h,4,1)
			oItems:SetProperty("CellBackColor",oItems:InsertItem(h,,"Child C"),5,AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:AddItem("Item A")
			h := oItems:AddItem("ParentB")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("CellBackColor",oItems:InsertItem(h,,"Child 3"),5,AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
			oItems:SetProperty("CellState",h,5,1)
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
			oItems:AddItem("Item D")
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()
		sFile := "c:/temp/export.html"
		oTree:Export(sFile,"vis")
		oShellBrowserWindow := CreateObject("InternetExplorer.Application")
			oShellBrowserWindow:Navigate2(sFile)

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
675
Export Data in CSV format

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4,oColumn5,oColumn6
	LOCAL oColumns
	LOCAL oConditionalFormat,oConditionalFormat1
	LOCAL oConditionalFormats
	LOCAL oItems
	LOCAL oTree
	LOCAL h

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:SetProperty("BackColorAlternate",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oTree:DrawGridLines := -1/*exAllLines*/
		oTree:HeaderAppearance := 4/*Etched*/
		oTree:SetProperty("Description",11/*exFilterBarAnd*/,Transform(oTree:FormatABC("`<fgcolor=808080> ` + value + ` </fgcolor>`",oTree:Description(11/*exFilterBarAnd*/)),""))
		oTree:FilterBarCaption := "(( ( value replace `[<b>` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `</b>]` with ` </b></bgcolor></fgcolor>` replace `[<s>` with `<bgcolor=C0C0C0><fgcolor=FFFFFF> ` replace `</s>]` with ` </fgcolor></bgcolor>` )  + `<r><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<r><fgcolor=808080>`+ itemcount + ` item(s)`) )))"
		oTree:FilterBarPromptVisible := 2579/*exFilterBarCompact+exFilterBarShowCloseIfRequired+exFilterBarSingleLine+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPromptType := 2/*exFilterPromptContainsAny*/
		oConditionalFormats := oTree:ConditionalFormats()
			oConditionalFormats:Add("%0 like `*parent*`","parent"):SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 192,192,192 } )  , .F. ))
			oConditionalFormat := oConditionalFormats:Add("%0 like `*child*`","child")
				oConditionalFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,128,128 } )  , .F. ))
				oConditionalFormat:ApplyTo := 0/*exFormatToColumns*/
			oConditionalFormat1 := oConditionalFormats:Add("%0 like `*B*`","b")
				oConditionalFormat1:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,255 } )  , .F. ))
				oConditionalFormat1:Bold := .T.
				oConditionalFormat1:Italic := .T.
				oConditionalFormat1:ApplyTo := 0/*exFormatToColumns*/
		oColumns := oTree:Columns()
			oColumn := oColumns:Add("Value")
				oColumn:Width := 128
				oColumn:HTMLCaption := "<b>VA</b><r>sko"
			oColumn1 := oColumns:Add("APos")
				oColumn1:FormatColumn := "0 apos ``"
				oColumn1:AllowSort := .F.
				oColumn1:SetProperty("Def",4/*exCellBackColor*/,15790320)
				oColumn1:SetProperty("Def",5/*exCellForeColor*/,8421504)
				oColumn1:SetProperty("Def",8/*exHeaderForeColor*/,oColumn1:Def(5/*exCellForeColor*/))
				oColumn1:Position := 0
			oColumn2 := oColumns:Add("RPos")
				oColumn2:FormatColumn := "0 rpos ``"
				oColumn2:AllowSort := .F.
				oColumn2:Position := 1
			oColumn3 := oColumns:Add("Index")
				oColumn3:FormatColumn := "0 index ``"
				oColumn3:DisplayFilterButton := .T.
				oColumn3:FilterList := 256/*exShowCheckBox*/
				oColumn3:Position := 2
			oColumn4 := oColumns:Add("Data 1")
				oColumn4:FormatColumn := "0 index `A-Z`"
				oColumn4:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn5 := oColumns:Add("Data 2")
				oColumn5:FormatColumn := "0 index `AB` replace `A` with `<off -4>A</off>`"
				oColumn5:SetProperty("Def",16/*exCellSingleLine*/,.F.)
				oColumn5:SetProperty("Def",17/*exCellCaptionFormat*/,1)
				oColumn5:SetProperty("Def",1/*exCellHasRadioButton*/,.T.)
			oColumn6 := oColumns:Add("Data 3")
				oColumn6:FormatColumn := "0 index `CDC` replace `D` with `<b>D</b>`"
				oColumn6:SetProperty("Def",17/*exCellCaptionFormat*/,1)
		oItems := oTree:Items()
			h := oItems:AddItem("ParentA")
			oItems:InsertItem(h,,"Child A")
			oItems:InsertItem(h,,"Child B")
			oItems:SetProperty("CellState",h,4,1)
			oItems:SetProperty("CellBackColor",oItems:InsertItem(h,,"Child C"),5,AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:AddItem("Item A")
			h := oItems:AddItem("ParentB")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("CellBackColor",oItems:InsertItem(h,,"Child 3"),5,AutomationTranslateColor( GraMakeRGBColor  ( { 0,255,0 } )  , .F. ))
			oItems:SetProperty("CellState",h,5,1)
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
			oItems:AddItem("Item D")
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()
		DevOut( Transform(oTree:Export("","vis"),"") )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
674
Is it possible to check multiple-items at once

PROCEDURE OnAddItem(oTree,Item)
	LOCAL oItems
	LOCAL bHasParent
	bHasParent := oTree:FormatABC("value != 0",oTree:Items:ItemParent(Item))
	oItems := oTree:Items()
		oItems:SetProperty("CellHasCheckBox",Item,0,.F.)
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("Tasks")
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn:FormatColumn := "value + (%CS0 = 1 ? `<r><fgcolor=808080>(checked)` : ``)"
		oTree:HeaderVisible := .T.
		oTree:SingleSel := .F.
		oItems := oTree:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			hChild := oItems:InsertItem(h,,"Task 2")
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:SetProperty("LockedItemCount",0/*TopAlignment*/,1)
			oItems:SetProperty("CellCaption",oItems:LockedItem(0/*TopAlignment*/,0),0,"<c>Select multiple items and press the <b>SPACE</b> key")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
673
How can I get the icon from the cell when using the Items.CellImages property (icon index)

PROCEDURE OnMouseMove(oTree,Button,Shift,X,Y)
	LOCAL i
	i := oTree:ItemFromPoint(-1,-1,c,hit)
	DevOut( Transform(oTree:FormatABC("( 0x44 = ( value bitand 0x44 ) ) ? ( ( (value bitand 0xFFFF0000) bitshift 16 ) array B split `,` )  : `no image`",hit,oTree:Items:CellImages(i,c)),"") )
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oTree,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oTree:BeginUpdate()
		oTree:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			oItems:SetProperty("CellImages",oItems:AddItem("Item 1"),0,"3,2,1")
			oItems:SetProperty("CellImages",oItems:AddItem("Item 2"),0,"2,3")
			oItems:SetProperty("CellImages",oItems:AddItem("Item 3"),0,"2,")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
672
How can I get the icon from the cell when using the Items.CellImages property (icon position within the cell)

PROCEDURE OnMouseMove(oTree,Button,Shift,X,Y)
	LOCAL i
	i := oTree:ItemFromPoint(-1,-1,c,hit)
	DevOut( Transform(oTree:FormatABC("( 0x44 = ( value bitand 0x44 ) ) ? 1 + ( (value bitand 0xFFFF0000) bitshift 16 ) : `no image`",hit),"") )
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:MouseMove := {|Button,Shift,X,Y| OnMouseMove(oTree,Button,Shift,X,Y)} /*Occurs when the user moves the mouse.*/

		oTree:BeginUpdate()
		oTree:Images("gBJJgBAIDAAGAAEAAQhYAf8Pf4hh0QihCJo2AEZjQAjEZFEaIEaEEaAIAkcbk0olUrlktl0vmExmUzmk1m03nE5nU7nk9n0/oFBoVDolFo1HpFJpVLplNp1PqFRqVTqlVq1XrFZrVbrldr1fsFhsVjslls1ntFptVrtltt1vuFxuVzul1u13vF5vV7vl9v1/wGBwWDwmFw2HxGJxWLxmNx0xiFdyOTh8Tf9ZymXx+QytcyNgz8r0OblWjyWds+m0ka1Vf1ta1+r1mos2xrG2xeZ0+a0W0qOx3GO4NV3WeyvD2XJ5XL5nN51aiw+lfSj0gkUkAEllHanHI5j/cHg8EZf7w8vl8j4f/qfEZeB09/vjLAB30+kZQAP/P5/H6/yNAOAEAwCjMBwFAEDwJBMDwLBYAP2/8Hv8/gAGAD8LQs9w/nhDY/oygIA=")
		oTree:Columns():Add("Default")
		oItems := oTree:Items()
			oItems:SetProperty("CellImages",oItems:AddItem("Item 1"),0,"3,2,1")
			oItems:SetProperty("CellImages",oItems:AddItem("Item 2"),0,"2,3")
			oItems:SetProperty("CellImages",oItems:AddItem("Item 3"),0,"2")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
671
Is it possible to change the visual appearance of the position signs when user changes the column's position by drag and drop

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:HeaderAppearance := 4/*Etched*/
		oColumns := oTree:Columns()
			oColumns:Add("Column 1")
			oColumns:Add("Column 2")
			oColumns:Add("Column 3")
		oAppearance := oTree:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABZEGACAADACAxRDgMQBQKAAzAJBIYhiG4cYCgMYxXDOCYXABCEYRXBIZQ7BKNIxjSJwFgmEgADKMA4SOKIZhrE4bBhGaQRUgyI43RhHUBzVIUcQvE6TZRHCQYHgkNIhDJIM7TPLkeSVJaTIRoKhJUogApQThTMgVRDEThkGoSa6soSoYTDBKybLrSLKagOT5YUDKUqSdKEZRpEq1YztWbaQoCUoqVRRVIWfbNd4JJa4aDhWpYdpeeY5R7bWLgBYVVABL7LLRsSxpHxPF6RXxaeI3GKsaS8G6ic6nPQMHj7I4NS5pUa6Rh2VYNSa8AAtETRYznOw4bTMXAjNIea5bAYIIR5HIoDzVbQcCQAHL9DBeEMIQEEISgGhMGZQmocgymoYRRCIEQ0G2HYBnEIBig4V4zCQGINnmagCECY43medZ6H2Pw/g+X5fnueh/h+R5+AKABfkMWgGgGYA4AICoCGCE5WA4CphACMgSD2IRIDI" +;
		"BICmEd5YGCBpRjGBgegWIYIgWdgoGIRQsiKCZiAiJZ0gGQI4jUS4LECOAiBmDJflGfg2BSY4Al4OhGkOCJ2DgFJjGGfgqgiH5Ch4RhGkqOQmEOEpkFkHQYhJRYyESAokGKHhIhKIxJEmf4VGUeRGFmF5iBkchPhYJQ5GoYIZg6Ug6GoFYmkmNhuhulRGHKGoImefh0BUZ4JmYeoemeSZ2H6HQmgoBgXDqXwUAQgI=")
			oAppearance:Add(2,"CP:1 0 -36 0 0")
		oTree:SetProperty("Background",182/*exColumnsPositionSign*/,0x2000000)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
670
A black portion is shown while I am using the BackColorAlternate with EBN colors. What can I do

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:DefaultItemHeight := 20
		oTree:VisualAppearance():Add(1,"gBFLBCJwBAEHhEJAAEhIDhAxHAxg0HG0Mg4xGI3HMOig3GcJiYAf8jAEhhUnAAyhEqg8hk0oAsIjgAiAwmYxGA4mYzGwwkI0i0ooUnB0IBMIl1Dg8zmYyGolptPkI1mY1GAll9KoUslNIrVCqNQldShFUstXAVfrVcrlZtVhuFnsUHq1zoczoQGhFBkNpg6zbDykUkhsPHE2h85nc9n8xtVDtlex9Msd2p1YstVq9ux8HyMtzuFz1PsNTzQlv2hhWfkuqpeVuN0q+nvEooN5veSAGpkb/ACcZrvhU3w83nM/poxGuchGpoVBvWgg+8knA4WimnFxI45Er5XOlHMg/Q3XU33W4ew9Wyu11mchDagcO7zus8VDoNBBEIKBpMY6DqOQyokhA/IQIQmwMk4bIQFDcoO6LWgwhQkNcABwEyAB5GwWbet6cRQg3DENQ5D8QxADZvEkAB8nabsURGeBpFM3pwE2AEZRpDx/neZpOR3Dz9oO/r/wCMoZNTBQAQR" +;
		"JSEwYg8HPGhEIoNCaEwq10gQ2WcRt7LcRxRFpuxUAEURQ3sczBEMgTTG8gN7HpOSEAEiQBAQZpmQ0DibPUFwbKcHwkhQoQtNQNzNEMbABOKDy/DMYQzHLeoPL0OTJSUd0pHcxTewk5zrIygIRPslz4lEngBKIAQivgASs/kLSBTlO00f8t0vGcgUbDlDRjXLCUNRERRvRgAHW2oAICA==")
		oColumn := oTree:Columns():Add("Default")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oColumn1 := oTree:Columns():Add("Position")
			oColumn1:FormatColumn := "1 rindex ``"
			oColumn1:Visible := .F.
		oConditionalFormat := oTree:ConditionalFormats():Add("%C1 mod 2")
			oConditionalFormat:SetProperty("BackColor",0x1000000)
		oItems := oTree:Items()
			oItems:AddItem("Item 1")
			oItems:AddItem("Item 2")
			oItems:AddItem("Item 3")
			oItems:AddItem("Item 4")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
669
How can I specify alternate background colors for each root item, similar with BackColorAlternate

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("Default")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oColumn1 := oTree:Columns():Add("Position")
			oColumn1:FormatColumn := "( ( 1:=( ( 0:=(1 rpos '') ) lfind `.`) ) < 0 ? =:0 : (=:0 left =:1) )"
			oColumn1:Visible := .F.
		oConditionalFormat := oTree:ConditionalFormats():Add("%C1 mod 2")
			oConditionalFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 240,240,240 } )  , .F. ))
		oItems := oTree: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")
			h := oItems:AddItem("Root 3")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
		oTree:EndUpdate()

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Columns():Add("ColumnName"):Caption := "NewName"
		oTree:Columns():Add("ColumnName"):HTMLCaption := "<b>New</b>Name"

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

PROCEDURE OnAddItem(oTree,Item)
	LOCAL i
	i := oTree:FormatABC("value + 1",oTree:Items:ItemToIndex(Item))
	oTree:Items():SetProperty("CellImage",Item,3,i)
RETURN

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4,oColumn5
	LOCAL oItems
	LOCAL oTree
	LOCAL h

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

PROCEDURE OnAddItem(oTree,Item)
	LOCAL i
	i := oTree:FormatABC("value + 1",oTree:Items:ItemToIndex(Item))
	oTree:Items():SetProperty("CellImage",Item,3,i)
RETURN

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4,oColumn5
	LOCAL oItems
	LOCAL oTree
	LOCAL h

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

PROCEDURE OnAddItem(oTree,Item)
	LOCAL i
	i := oTree:FormatABC("value + 1",oTree:Items:ItemToIndex(Item))
	oTree:Items():SetProperty("CellImage",Item,3,i)
RETURN

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4,oColumn5
	LOCAL oItems
	LOCAL oTree
	LOCAL h

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

PROCEDURE OnAddItem(oTree,Item)
	LOCAL i
	i := oTree:FormatABC("value + 1",oTree:Items:ItemToIndex(Item))
	oTree:Items():SetProperty("CellImage",Item,3,i)
RETURN

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4,oColumn5
	LOCAL oItems
	LOCAL oTree
	LOCAL h

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

PROCEDURE OnAddItem(oTree,Item)
	LOCAL i
	i := oTree:FormatABC("value + 1",oTree:Items:ItemToIndex(Item))
	oTree:Items():SetProperty("CellImage",Item,3,i)
RETURN

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4,oColumn5
	LOCAL oItems
	LOCAL oTree
	LOCAL h

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

PROCEDURE OnAddItem(oTree,Item)
	LOCAL i
	i := oTree:FormatABC("value + 1",oTree:Items:ItemToIndex(Item))
	oTree:Items():SetProperty("CellImage",Item,3,i)
RETURN

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4,oColumn5
	LOCAL oItems
	LOCAL oTree
	LOCAL h

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4
	LOCAL oItems
	LOCAL oTree

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oColumn := oTree:Columns():Add("Col-1")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn1 := oTree:Columns():Add("Col-2")
			oColumn1:DisplayFilterButton := .T.
			oColumn1:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn2 := oTree:Columns():Add("Pos")
			oColumn2:AllowSizing := .F.
			oColumn2:AllowSort := .F.
			oColumn2:Width := 32
			oColumn2:FormatColumn := "1 apos ``"
			oColumn2:Position := 0
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("Item A"),1,"Sub-Item A")
			oItems:SetProperty("CellCaption",oItems:AddItem("Item B"),1,"Sub-Item B")
			oItems:SetProperty("CellCaption",oItems:AddItem("Item C"),1,"Sub-Item C")
		oTree:FilterBarFont := oTree:Font()
		oTree:SetProperty("Description",11/*exFilterBarAnd*/,Transform(oTree:FormatABC("`<fgcolor=808080>` + value + `</fgcolor>`",oTree:Description(11/*exFilterBarAnd*/)),""))
		oTree:FilterBarCaption := "(`<b>` + value + `</b><fgcolor=808080>` + ( matchitemcount < 0 ? ( ( len(value) ? `` : `` ) + `<r>` + abs(matchitemcount + 1) + ` result(s)` ) : (`<fgcolor=808080>`+ itemcount + ` item(s)`) )) replace `[` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `]` with ` </b></bgcolor></fgcolor>`"
		oTree:FilterBarPromptVisible := 256/*exFilterBarToggle*/
		oColumn3 := oTree:Columns:Item(0)
			oColumn3:FilterType := 240/*exFilter*/
			oColumn3:Filter := "Item A|Item B"
		oColumn4 := oTree:Columns:Item(1)
			oColumn4:FilterType := 3/*exPattern*/
			oColumn4:Filter := "*B"
		oTree:ApplyFilter()
		oTree:EndUpdate()

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

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4
	LOCAL oItems
	LOCAL oTree

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oColumn := oTree:Columns():Add("Col-1")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn1 := oTree:Columns():Add("Col-2")
			oColumn1:DisplayFilterButton := .T.
			oColumn1:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn2 := oTree:Columns():Add("Pos")
			oColumn2:AllowSizing := .F.
			oColumn2:AllowSort := .F.
			oColumn2:Width := 32
			oColumn2:FormatColumn := "1 apos ``"
			oColumn2:Position := 0
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("Item A"),1,"Sub-Item A")
			oItems:SetProperty("CellCaption",oItems:AddItem("Item B"),1,"Sub-Item B")
			oItems:SetProperty("CellCaption",oItems:AddItem("Item C"),1,"Sub-Item C")
		oTree:FilterBarFont := oTree:Font()
		oTree:SetProperty("Description",11/*exFilterBarAnd*/,Transform(oTree:FormatABC("`<fgcolor=808080>` + value + `</fgcolor>`",oTree:Description(11/*exFilterBarAnd*/)),""))
		oTree:FilterBarCaption := "value replace `[` with `<bgcolor=000000><fgcolor=FFFFFF><b> ` replace `]` with ` </b></bgcolor></fgcolor>`"
		oTree:FilterBarPromptVisible := 256/*exFilterBarToggle*/
		oColumn3 := oTree:Columns:Item(0)
			oColumn3:FilterType := 240/*exFilter*/
			oColumn3:Filter := "Item A|Item B"
		oColumn4 := oTree:Columns:Item(1)
			oColumn4:FilterType := 3/*exPattern*/
			oColumn4:Filter := "*B"
		oTree:ApplyFilter()
		oTree:EndUpdate()

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

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4
	LOCAL oItems
	LOCAL oTree

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oColumn := oTree:Columns():Add("Col-1")
			oColumn:DisplayFilterButton := .T.
			oColumn:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn1 := oTree:Columns():Add("Col-2")
			oColumn1:DisplayFilterButton := .T.
			oColumn1:FilterList := 9504/*exShowExclude+exShowFocusItem+exShowCheckBox+exSortItemsAsc*/
		oColumn2 := oTree:Columns():Add("Pos")
			oColumn2:AllowSizing := .F.
			oColumn2:AllowSort := .F.
			oColumn2:Width := 32
			oColumn2:FormatColumn := "1 apos ``"
			oColumn2:Position := 0
		oItems := oTree:Items()
			oItems:SetProperty("CellCaption",oItems:AddItem("Item A"),1,"Sub-Item A")
			oItems:SetProperty("CellCaption",oItems:AddItem("Item B"),1,"Sub-Item B")
			oItems:SetProperty("CellCaption",oItems:AddItem("Item C"),1,"Sub-Item C")
		oTree:SetProperty("Description",11/*exFilterBarAnd*/,Transform(oTree:FormatABC("`<fgcolor=808080>` + value + `</fgcolor>`",oTree:Description(11/*exFilterBarAnd*/)),""))
		oTree:FilterBarCaption := "value replace `[` with `<fgcolor=808080>[` replace `]` with `]</fgcolor>`"
		oTree:FilterBarPromptVisible := 256/*exFilterBarToggle*/
		oColumn3 := oTree:Columns:Item(0)
			oColumn3:FilterType := 240/*exFilter*/
			oColumn3:Filter := "Item A|Item B"
		oColumn4 := oTree:Columns:Item(1)
			oColumn4:FilterType := 3/*exPattern*/
			oColumn4:Filter := "*B"
		oTree:ApplyFilter()
		oTree:EndUpdate()

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

PROCEDURE OnAfterExpandItem(oTree,Item)
	oTree:Refresh()
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:AfterExpandItem := {|Item| OnAfterExpandItem(oTree,Item)} /*Fired after an item is expanded (collapsed).*/

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oTree:Columns():Add("Check")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:FilterType := 6/*exCheck*/
		oColumn1 := oTree:Columns():Add("Pos")
			oColumn1:AllowSizing := .F.
			oColumn1:AllowSort := .F.
			oColumn1:Width := 32
			oColumn1:FormatColumn := "1 apos ``"
			oColumn1:Position := 0
		oItems := oTree:Items()
			oItems:AddItem("Item A")
			h := oItems:AddItem("Item B")
			oItems:SetProperty("CellState",oItems:InsertItem(h,,"Sub-Item B1"),1,1)
			oItems:InsertItem(h,,"Sub-Item B2")
			oItems:SetProperty("ExpandItem",h,.T.)
			oItems:AddItem("Item C")
		oTree:FilterInclude := 1/*exItemsWithChilds*/
		oTree:FilterBarFont := oTree:Font()
		oTree:FilterBarCaption := "`<fgcolor=0000FF><i>value/current</i></fgcolor>: <fgcolor=808080>` + value + `</fgcolor>` + `<br><fgcolor=0000FF><i>available</i></fgcolor>: ` + available + `<br><fgcolor=0000FF><i>allui</i></fgcolor>: ` + allui + `<br><fgcolor=0000FF><i>all</i></fgcolor>: ` + all + `<br><fgcolor=0000FF><i>itemcount</i></fgcolor>: <fgcolor=808080>` + itemcount + `</fgcolor>`+ `<br><fgcolor=0000FF><i>visibleitemcount</i></fgcolor>: <fgcolor=808080>` + visibleitemcount + `</fgcolor>`+ `<br><fgcolor=0000FF><i>matchitemcount</" +;
		"i></fgcolor>: <fgcolor=808080>` + matchitemcount + `</fgcolor>`+ `<br><fgcolor=0000FF><i>promptpattern</i></fgcolor>: <fgcolor=808080>` + promptpattern + `</fgcolor>`+ `<br><fgcolor=0000FF><i>leafitemcount</i></fgcolor>: <fgcolor=808080>` + leafitemcount + `</fgcolor>`"
		oTree:FilterBarPromptPattern := "B"
		oTree:FilterBarPromptVisible := 7/*exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oColumn2 := oTree:Columns:Item(0)
			oColumn2:FilterType := 240/*exFilter*/
			oColumn2:Filter := "Item A|Item B"
		oTree:ApplyFilter()
		oTree:EndUpdate()

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oTree:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oTree:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oTree:FilterBarPromptVisible := 1281/*exFilterBarShowCloseOnRight+exFilterBarToggle+exFilterBarPromptVisible*/
		oTree:FilterBarPrompt := Transform(oTree:FormatABC("`<r>` + value",oTree:FilterBarPrompt()),"")
		oTree:EndUpdate()

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:RightToLeft := .T.
		oTree:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oTree:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oTree:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oTree:FilterBarPromptVisible := 257/*exFilterBarToggle+exFilterBarPromptVisible*/
		oTree:EndUpdate()

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oTree:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oTree:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oTree:FilterBarPromptVisible := 1/*exFilterBarPromptVisible*/
		oTree:SetProperty("Background",1/*exFooterFilterBarButton*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,0,0 } )  , .F. ))
		oTree:EndUpdate()

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oTree:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oTree:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oTree:FilterBarPromptVisible := 1/*exFilterBarPromptVisible*/
		oTree:SetProperty("Background",1/*exFooterFilterBarButton*/,-1)
		oTree:EndUpdate()

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oTree:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oTree:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oTree:FilterBarPromptVisible := 513/*exFilterBarShowCloseIfRequired+exFilterBarPromptVisible*/
		oTree:EndUpdate()

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oTree:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oTree:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oTree:FilterBarCaption := "`<r>` + value"
		oTree:FilterBarPromptVisible := 2067/*exFilterBarCompact+exFilterBarSingleLine+exFilterBarVisible+exFilterBarPromptVisible*/
		oColumn1 := oTree:Columns:Item(0)
			oColumn1:FilterType := 240/*exFilter*/
			oColumn1:Filter := "Item A|Item B"
		oTree:ApplyFilter()
		oTree:EndUpdate()

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

PROCEDURE OnClick(oTree)
	oTree:ClearFilter()
RETURN

PROCEDURE OnFilterChange(oTree)
	DevOut( "Items.MatchItemCount" )
	DevOut( Transform(oTree:Items:MatchItemCount(),"") )
	DevOut( Transform(oTree:FormatABC("value < 0 ? `filter applied: ` + abs(value + 1) + ` result(s)` : `no filter`",oTree:Items:MatchItemCount()),"") )
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Click := {|| OnClick(oTree)} /*Occurs when the user presses and then releases the left mouse button over the tree control.*/
		oTree:FilterChange := {|| OnFilterChange(oTree)} /*Notifies your application that the filter is changed.*/

		oTree:BeginUpdate()
		oTree:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oTree:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oTree:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oTree:FilterBarPromptVisible := 1/*exFilterBarPromptVisible*/
		oTree:FilterBarPromptPattern := "Item"
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
641
How can I programmatically clear the control's filter

PROCEDURE OnClick(oTree)
	oTree:ClearFilter()
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:Click := {|| OnClick(oTree)} /*Occurs when the user presses and then releases the left mouse button over the tree control.*/

		oTree:BeginUpdate()
		oTree:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oTree:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oTree:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oTree:FilterBarPromptVisible := 1/*exFilterBarPromptVisible*/
		oTree:FilterBarPromptPattern := "B"
		oTree:EndUpdate()

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oTree:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oTree:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oTree:FilterBarPromptPattern := "B"
		oTree:FilterBarPromptVisible := 3/*exFilterBarVisible+exFilterBarPromptVisible*/
		oColumn1 := oTree:Columns:Item(0)
			oColumn1:FilterType := 240/*exFilter*/
			oColumn1:Filter := "Item B"
		oTree:ApplyFilter()
		oTree:EndUpdate()

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Item"):DisplayFilterButton := .T.
		oColumn := oTree:Columns():Add("Pos")
			oColumn:AllowSizing := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 32
			oColumn:FormatColumn := "1 apos ``"
			oColumn:Position := 0
		oItems := oTree:Items()
			oItems:AddItem("Item A")
			oItems:AddItem("Item B")
			oItems:AddItem("Item C")
		oTree:FilterBarPromptVisible := 1/*exFilterBarPromptVisible*/
		oTree:FilterBarPromptPattern := "B"
		oTree:EndUpdate()

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
637
How can I change the visual appearance of the +/- buttons, open/close glyphs as current visual theme (method 4)

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:VisualDesign := "gBFLBWIgBAEHhEJAEGg6VAkHeLpgwChAOhULB8XAUUg8MAAREEHGMcgRCJ0ei8dhABDEcQAAYAQGKIYBkAKBQAGaAoDDMOQwQwAAxjGKEEwsACEIrjKCRShyCYZRhGcTSBCIZBqEqSZLiEZRQiiCYsS5GQBRWAkEwiBiEQTjea5CgOIAFS7LIqjRQEBxhIaZYIGaiQADENo9TxIMZAfBIHShK6NJABCCSQKkYx0HScRijDIEFwGIQmbKiej4DCiCQQW7OYYRVCNMQSfa8HivJyrcamfp/YBgOBYHb1eLVPR5LwfPCGUw1P6PLxkORZHimK4tSLHV7xVpMIwZFafIQhCCoHomS5NU7UNR0TQUFx9FaGX7rDDsGwLAJ6XRgF4bg2VpnHePpenAN4bH2GwHFmApSjEGBLnWOpRGOTBZHOegrE6BxPiWVJqCweQrn0LgJAWJBjwgaw1gKO5HmWch5h+fovF+G5bmich4BgfZkB8dynRUVYqiUR5rnmex/F6" +;
		"N4tn2AJfnebZ3DEXw3HWXgzAyIwgicKJKBKEIhCeCgiHyHYFEmSAFmqBghFIdgSCeIJygYDAyAgJx6AoIINAMOJNCgCZCGoGoLmMCI+Cw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ree: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")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
636
How can I change the visual appearance of the +/- buttons, open/close glyphs as current visual theme (method 3)

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oAppearance := oTree:VisualAppearance()
			oAppearance:Add(3,"gBFLBCJwBAEHhEJAAEhABDwCg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJ5BhIAAyDSJMjSRJUEhqGCWYDleYYYAKHIMQLJQKQSBcQR9EaBZBAWTpQC0OJDTJRI4TNAgbSYAAYRqoCb6loTKypaxjCQQIgkUBpGKdBynEYsDwSGyJCCJWyIbpKAwoVbcs4AYhuJpaQi+d5PFbjVT8dLAMBwLA8EwXAJ+OpfDxXU7eFKpR5fchXTI8UxXFqXZhkeQrfh7KYVRBKdBQRBEFQPJqnahqOpaXo2RoLUJKcQwHTmHYNQTALyuTALZrWeZ3XrgN74LbtZzVQauYRpbCMEr6bpoW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;
		"eBkh+BghFgRIegOCgYCySAgh4CAkgINAMmMNIgCcCYjn4LoLmMCJGDKC5ijIagoDMYhCAoJg1A0IxEhsJgJFiThChCY5yFYPA0GOGIYloNhNGIaIXCUJACE4TwkEkchOFSFYlFkXhUCUCQZEYTglCSMxaEkYJIBmFJhDeDZZEYPwlgmQhghaGqVDoa4bGaeY6FGGZNlmFIBGEJ4jhiZQ5AkMhAg6E5JCkRoGCUSQ6B6CYiSCBIOh+DhJmmARiWQOJtDsCJSCSBwkXSLIRicaZ6HqIIomoIguhwIpphIHoWDsJ4mCGChpmqOpGheLIOkqUo2iya4DjGJxihiQoSj4IJaDaMpCjCWoGg6PgpBiQ4tHcQJQBAgI=")
			oAppearance:Add(2,"CP:4 -2 -2 2 2")
		oTree:LinesAtRoot := 1/*exGroupLinesAtRoot*/
		oTree:HasButtons := 4/*exCustom*/
		oTree:SetProperty("HasButtonsCustom",.F.,16777216)
		oTree:SetProperty("HasButtonsCustom",.T.,33554432)
		oTree:Columns():Add("Column")
		oItems := oTree: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")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
635
How can I change the visual appearance of the +/- buttons, open/close glyphs as current visual theme (method 2)

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oAppearance := oTree:VisualAppearance()
			oAppearance:Add(1,"XP:TREEVIEW 2 1")
			oAppearance:Add(2,"XP:TREEVIEW 2 2")
		oTree:SetProperty("Background",180/*exTreeGlyphOpen*/,0x1000000)
		oTree:SetProperty("Background",181/*exTreeGlyphClose*/,0x2000000)
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:Columns():Add("Column")
		oItems := oTree: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")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
634
How can I find if the control is running in DPI mode
#include "AppEvent.ch"
#include "ActiveX.ch"

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		DevOut( Transform(oTree:FormatABC("dpi = 1 ? `normal/stretch mode` : `dpi mode`"),"") )

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
633
How can I change the visual appearance of the +/- buttons (method 1)

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oAppearance := oTree:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABDwCg6AADACAxRDgMQBQKAAzAJBIYhiG4cYCgMZhXDOCYXABCEYRXBIZQ7BKNIxjSJ5BhIAAyDSJMjSRJUEhqGCWYDleYYYAKHIMQLJQKQSBcQR9EaBZBAWTpQC0OJDTJRI4TNAgbSYAAYRqoCb6loTKypaxjCQQIgkUBpGKdBynEYsDwSGyJCCJWyIbpKAwoVbcs4AYhuJpaQi+d5PFbjVT8dLAMBwLA8EwXAJ+OpfDxXU7eFKpR5fchXTI8UxXFqXZhkeQrfh7KYVRBKdBQRBEFQPJqnahqOpaXo2RoLUJKcQwHTmHYNQTALyuTALZrWeZ3XrgN74LbtZzVQauYRpbCMEr6bpoWLnFi6Ho1U4llWah1jqSweFqfxPgQQRphi+Yak0YIuqUfJegef4zluaJ3nqPJeCYH4BAeX5TDLBpVGqKRRnwf4flefZtHsX54BYAR/F+EwVnUd5eAMMJKDIChygyIQpAoEh4iIJ5Jlg" +;
		"XIcgCXpIGoFwnGEQh6BEKBgmMIICHgIJCAiUAzgyUoAhwJohkiRgygwYpiGoKwzGIcgKCkNQNCMRIbCYCRYk4QoMiO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DsCJSCSBwkXSLIRicaZ6HqIIomoIguhwIpphIHoWDsJ4mCGChpmqOpGheLIOkqUo2iya4DjGJxihiQoSj4IJaDaMpCjCWoGg6PgpBiQ4tHcQJQBAgI=")
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:SetProperty("Background",180/*exTreeGlyphOpen*/,0x1000000)
		oTree:SetProperty("Background",181/*exTreeGlyphClose*/,0x2000000)
		oTree:Columns():Add("Column")
		oItems := oTree: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")
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
632
I am using single selection, the question is if possible to select an item only when the user releases the mouse, as currently it selects the item as soon as the user clicks it
PROCEDURE OnSelectionChanged(oTree)
	DevOut( "SelectionChanged" )
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

		oTree:BeginUpdate()
		oTree:FreezeEvents(.T.)
		oTree:SingleSel := .T.
		oTree:SelectOnRelease := .T.
		oTree:Columns():Add("Column"):FormatColumn := "1 apos `A-Z`"
		oItems := oTree:Items()
			oItems:AddItem("")
			oItems:SetProperty("SelectItem",oItems:AddItem(""),.T.)
			oItems:AddItem("")
		oTree:FreezeEvents(.F.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
631
Is it possible to select nothing
PROCEDURE OnSelectionChanged(oTree)
	DevOut( "SelectionChanged" )
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

		oTree:BeginUpdate()
		oTree:FreezeEvents(.T.)
		oTree:AllowSelectNothing := .T.
		oTree:Columns():Add("Column"):FormatColumn := "1 apos `A-Z`"
		oItems := oTree:Items()
			oItems:AddItem("")
			oItems:SetProperty("SelectItem",oItems:AddItem(""),.T.)
			oItems:AddItem("")
		oTree:FreezeEvents(.F.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
630
How can I specify the color for control's selection when it loses the focus

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oColumn := oTree:Columns():Add("")
			oColumn:AllowSizing := .F.
			oColumn:AllowDragging := .F.
			oColumn:AllowSort := .F.
			oColumn:Width := 24
			oColumn:SetProperty("Def",2/*exCellHasButton*/,.T.)
		oTree:Columns():Add("Column"):FormatColumn := "1 apos `A-Z`"
		oItems := oTree:Items()
			oItems:AddItem("")
			oItems:SetProperty("SelectItem",oItems:AddItem(""),.T.)
			oItems:AddItem("")
		oTree:SetProperty("Background",166/*exSelBackColorHide*/,AutomationTranslateColor( GraMakeRGBColor  ( { 196,196,196 } )  , .F. ))
		oTree:SetProperty("Background",167/*exSelForeColorHide*/,AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
		oTree:EndUpdate()

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

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:SelBackMode := 1/*exTransparent*/
		oTree:DefaultItemHeight := 22
		oColumn := oTree:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oAppearance := oTree:VisualAppearance()
			oAppearance:Add(2,"gBFLBCJwBAEHhEJAAEhABUkIQAAYAQGKIcBiAKBQAGYBIJDEMQ3DjAUBjMK4ZwTC4AIQjCK4JDKHYJRpHEZgLBMJAAGIZYhhUYRUiYMkiJBGGDIDiGGI2SJAcbTVIEcx9EyUJSgSTJOjCMokTTIU4TTLYASbJafJJhWSaAiyMouDIOMg1BDNIw/Hika6jOgKUisNJXRzWIBTbDlOQ3JqnbCjOQRSrQBoNDAMAiiaKlbwJPK9RoieQXfwUAJrXJcFqXFSLVxNBKAQEBA=")
			oAppearance:Add(1,"CP:2 1 1 -1 -1")
		oConditionalFormat := oTree:ConditionalFormats():Add("%CS0 = 1")
			oConditionalFormat:SetProperty("BackColor",0x1000000)
		oTree:HeaderVisible := .T.
		oItems := oTree:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:SetProperty("CellState",hChild,0,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:SetProperty("CellState",hChild,0,1)
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
628
How can I change the caption of the checked items (sample 2)

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn:FormatColumn := "%CS0 = 1 ? `<bgcolor=000000><fgcolor=FFFFFF> ` + value + ` </fgcolor></bgcolor>` : value"
		oTree:HeaderVisible := .T.
		oItems := oTree:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:SetProperty("CellState",hChild,0,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:SetProperty("CellState",hChild,0,1)
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
627
How can I change the caption of the checked items (sample 1)

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
			oColumn:SetProperty("Def",17/*exCellCaptionFormat*/,1)
			oColumn:FormatColumn := "value + (%CS0 = 1 ? `<r><fgcolor=808080>(checked)` : ``)"
		oTree:HeaderVisible := .T.
		oItems := oTree:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:SetProperty("CellState",hChild,0,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:SetProperty("CellState",hChild,0,1)
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()

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

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

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn
	LOCAL oConditionalFormat
	LOCAL oItems
	LOCAL oTree
	LOCAL h,hChild
	LOCAL f

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:DefaultItemHeight := 22
		oColumn := oTree:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oConditionalFormat := oTree:ConditionalFormats():Add("%CS0 = 1")
			f := CreateObject("StdFont")
				f:Name := oTree:Font():Name()
				f:Size := 12
			oConditionalFormat:Font := f
		oTree:HeaderVisible := .T.
		oItems := oTree:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:SetProperty("CellState",hChild,0,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:SetProperty("CellState",hChild,0,1)
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
625
How can I bold the checked items

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oConditionalFormat := oTree:ConditionalFormats():Add("%CS0 = 1")
			oConditionalFormat:Bold := .T.
		oTree:HeaderVisible := .T.
		oItems := oTree:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:SetProperty("CellState",hChild,0,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:SetProperty("CellState",hChild,0,1)
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()

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

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:SelBackMode := 1/*exTransparent*/
		oColumn := oTree:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oConditionalFormat := oTree:ConditionalFormats():Add("%CS0 = 1")
			oConditionalFormat:SetProperty("ForeColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,128,128 } )  , .F. ))
		oTree:HeaderVisible := .T.
		oItems := oTree:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:SetProperty("CellState",hChild,0,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:SetProperty("CellState",hChild,0,1)
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()

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

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:SelBackMode := 1/*exTransparent*/
		oColumn := oTree:Columns():Add("Tasks")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oConditionalFormat := oTree:ConditionalFormats():Add("%CS0 = 1")
			oConditionalFormat:SetProperty("BackColor",AutomationTranslateColor( GraMakeRGBColor  ( { 255,128,128 } )  , .F. ))
		oTree:HeaderVisible := .T.
		oItems := oTree:Items()
			h := oItems:AddItem("Project")
			hChild := oItems:InsertItem(h,,"Task 1")
			oItems:SetProperty("SelectItem",hChild,.T.)
			hChild := oItems:InsertItem(h,,"Task 2")
			oItems:SetProperty("CellState",hChild,0,1)
			hChild := oItems:InsertItem(h,,"Task 3")
			oItems:SetProperty("CellState",hChild,0,1)
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
622
How can I export the cell's state as well

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oColumns := oTree:Columns()
			oColumns:Add("C1"):SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumns:Add("C2"):FormatColumn := "1 index `A-Z`"
			oColumns:Add("C3"):FormatColumn := "100 index ``"
		oItems := oTree:Items()
			oItems:AddItem("Item 1")
			oItems:SetProperty("CellState",oItems:AddItem("Item 2"),1)
			oItems:SetProperty("CellState",oItems:AddItem("Item 3"),1)
		oTree:EndUpdate()
		DevOut( "Export CSV Items including Check-State:" )
		oTree:BeginUpdate()
		oColumn := oTree:Columns():Add("Check")
			oColumn:Position := 0
			oColumn:FormatColumn := "%CS0"
		DevOut( Transform(oTree:Export(""),"") )
		oTree:Columns():Remove("Check")
		oTree:EndUpdate()

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeforeExpandItem := {|Item,Cancel| OnBeforeExpandItem(oTree,Item,Cancel)} /*Fired before an item is about to be expanded (collapsed).*/

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

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
620
The BeforeExpandItem event is fired when clicking the drop down filter button. What we can do to prevent that (method 1)
PROCEDURE OnBeforeExpandItem(oTree,Item,Cancel)
	DevOut( "BeforeExpandItem" )
	DevOut( Transform(Item,"") )
	oTree:Items():InsertItem(Item,,"new child")
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeforeExpandItem := {|Item,Cancel| OnBeforeExpandItem(oTree,Item,Cancel)} /*Fired before an item is about to be expanded (collapsed).*/

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumns := oTree:Columns()
			oColumn := oColumns:Add("Items")
				oColumn:DisplayFilterButton := .T.
				oColumn:FilterList := 4/*exRootItems*/
		oItems := oTree:Items()
			oItems:SetProperty("ItemHasChildren",oItems:InsertItem(,,"Group 1"),.T.)
			oItems:SetProperty("ItemHasChildren",oItems:InsertItem(,,"Group 2"),.T.)
		oTree:EndUpdate()

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oAppearance := oTree:VisualAppearance()
			oAppearance:Add(1,"gBFLBCJwBAEHhEJAAEhABXUIQAAYAQGKIcBiAKBQAGYBIJDEMgzDDAUBjKKocQTC4AIQjCK4JDKHYJRpHEZyCA8EhqGASRAFUQBYiWE4oSpLABQaK0ZwIGyRIrkGQgQgmPYDSDNU4zVIEEglBI0TDNczhNDENgtGYaJqHIYpZBcM40TKkEZoSIITZcRrOEBiRL1S0RBhGcRUHZlWzdN64LhuK47UrWdD/XhdVzXRbjfz1Oq+bxve48Br7A5yYThdr4LhOFQ3RjIL4xbIcUwGe6VZhjOLZXjmO49T69HTtOCYBEBA")
		oTree:SetProperty("Background",32/*exCursorHoverColumn*/,-1)
		oTree:SetProperty("Background",0/*exHeaderFilterBarButton*/,0x1000000)
		oTree:SetProperty("Background",26/*exBackColorFilter*/,AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,1 } )  , .F. ))
		oTree:SetProperty("Background",27/*exForeColorFilter*/,AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oTree:SetProperty("Description",25/*exFilterBarExclude*/,"<bgcolor 0><fgcolor ffffff> Exclude </fgcolor></bgcolor>")
		oTree:HeaderAppearance := 0/*None2*/
		oTree:SetProperty("BackColorHeader",AutomationTranslateColor( GraMakeRGBColor  ( { 0,0,0 } )  , .F. ))
		oTree:SetProperty("ForeColorHeader",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oTree:HeaderVisible := .T.
		oTree:SetProperty("BackColorLevelHeader",oTree:BackColor())
		oColumn := oTree:Columns():Add("Filter")
			oColumn:FilterList := 8448/*exShowExclude+exShowCheckBox*/
			oColumn:DisplayFilterButton := .T.
			oColumn:AllowSort := .F.
			oColumn:AllowDragging := .F.
		oItems := oTree:Items()
			oItems:AddItem("One")
			oItems:AddItem("Two")
			oItems:AddItem("Three")
		oTree:EndUpdate()

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oAppearance := oTree:VisualAppearance()
			oAppearance:Add(2,"gBFLBCJwBAEHhEJAAEhABX8GACAADACAxSDEMQBQKAAzQFAYbhgHCGAAGQaBUgmFgAQhFcZQSKUOQTDKNYykCIRSDUJYkSZEIyjBI8ExXFqNACkGKwYgmNYiTLAcgANJ0WBaGIZJ4gOT5fDKMoEDRRYADFCscwxJybQAqGQKKb+VgAVY/cTyBIAEQSKA0TDOQ5TSKWB4JPZQRBEbZMNBtBIUJquKaqShdQJCU5FdY3Xblez9P7AMBwLFEC4NQ8YNYuPhjR4dRTIMhvVAsUArFh8Zg9GZZFjmDIDT4ydBLTQwcyVIKnP5qOa6XbmPoCQDYKxZHYxPzVDa3axuL76dqCAT7XrXNy1TbNRrzQKfcJqfCbdw2YaDZLOOT3fjuI4hhKaRzFAHJ+jYQ4xHuY4gHuGIXGeExqC8Tp6C+PoEm+G5ImycRgh0XwvDGa5rgOeoejyXwnFeQp2mkf5ClgBB9gCWIYAwfYAEKV58mkdwOggNArgOXY2EWLoDkKOA0mg" +;
		"bhOGgZApgaSBIHWSYHSmbApgYThmESZYJkIeIkgeCpfliLIHgpMIcmUYYYmODAlg2SI4mWfRfGOEguDcCRjFYAJihCQhJBSDoRmONgKEcI4kFCEJhhOVYTmYnAlEAQhWBMJYJGYWoWmWSR2F6F5lnkWAQhUAgpEieRWEuSYkjWGpmkmNhuhuZwJkYcocmaaYkjyEhngnUA6lEFAlAEgI=")
			oAppearance:Add(1,"CP:2 -14 -4 -2 4")
		oTree:SetProperty("Background",0/*exHeaderFilterBarButton*/,0x1000000)
		oTree:SetProperty("Background",32/*exCursorHoverColumn*/,oTree:BackColor())
		oTree:HeaderAppearance := 0/*None2*/
		oTree:SetProperty("BackColorHeader",AutomationTranslateColor( GraMakeRGBColor  ( { 255,255,255 } )  , .F. ))
		oTree:HeaderVisible := .T.
		oTree:HeaderHeight := 24
		oTree:SetProperty("BackColorLevelHeader",oTree:BackColor())
		oColumn := oTree:Columns():Add("Filter")
			oColumn:DisplayFilterButton := .T.
			oColumn:AllowSort := .F.
			oColumn:AllowDragging := .F.
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
617
Do you have any Fit-To-Page options when printing the control (W x T, Fit-To )

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .F.
		oTree:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oTree:DataSource := rs
		oTree:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			oPrint:Options := "FitToPage =2 x 1"
			oPrint:PrintExt := oTree
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
616
Do you have any Fit-To-Page options when printing the control ( x T, Fit-To Tall )

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .F.
		oTree:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oTree:DataSource := rs
		oTree:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			oPrint:Options := "FitToPage = x 2"
			oPrint:PrintExt := oTree
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
615
Do you have any Fit-To-Page options when printing the control ( W x, Fit-To Wide )

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .F.
		oTree:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oTree:DataSource := rs
		oTree:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			oPrint:Options := "FitToPage = 2 x"
			oPrint:PrintExt := oTree
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
614
Do you have any Fit-To-Page options when printing the control ( percent view, Adjust-To )

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .F.
		oTree:ContinueColumnScroll := .F.
		rs := CreateObject("ADOR.Recordset")
			rs:Open("Orders","Provider=Microsoft.ACE.OLEDB.12.0;Data Source=C:\Program Files\Exontrol\ExTree\Sample\Access\sample.accdb",3/*adOpenStatic*/,3/*adLockOptimistic*/)
		oTree:DataSource := rs
		oTree:EndUpdate()
		oPrint := CreateObject("Exontrol.Print")
			oPrint:Options := "FitToPage = 50%"
			oPrint:PrintExt := oTree
			oPrint:Preview()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
613
How do I prevent changing the cell's state ( check-box state )
PROCEDURE OnCellStateChanging(oTree,Item,ColIndex,NewState)
	LOCAL oItems
	oItems := oTree:Items()
		NewState := oItems:CellState(Item,ColIndex)
RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:CellStateChanging := {|Item,ColIndex,NewState| OnCellStateChanging(oTree,Item,ColIndex,NewState)} /*Fired before cell's state is about to be changed.*/

		oTree:BeginUpdate()
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oColumn := oTree:Columns():Add("P1")
			oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn:PartialCheck := .T.
		oColumn1 := oTree:Columns():Add("P2")
			oColumn1:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
			oColumn1:PartialCheck := .T.
		oItems := oTree:Items()
			h := oItems:AddItem("Root")
			oItems:InsertItem(h,,"Child 1")
			oItems:InsertItem(h,,"Child 2")
			oItems:SetProperty("ExpandItem",h,.T.)
		oTree:EndUpdate()

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

PROCEDURE OnCellStateChanged(oTree,Item,ColIndex)

RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:Columns():Add("Items")
		oColumn := oTree:Columns():Add("Format")
			oColumn:FormatColumn := "%0"
			oColumn:Caption := oColumn:FormatColumn()
			oColumn:SetProperty("Def",5/*exCellForeColor*/,8421504)
			oColumn:SetProperty("Def",8/*exHeaderForeColor*/,oColumn:Def(5/*exCellForeColor*/))
			oColumn:Width := 96
			oColumn:AllowSizing := .F.
		oColumn1 := oTree:Columns():Add("Format")
			oColumn1:FormatColumn := "%C0"
			oColumn1:Caption := oColumn1:FormatColumn()
			oColumn1:SetProperty("Def",5/*exCellForeColor*/,8421504)
			oColumn1:SetProperty("Def",8/*exHeaderForeColor*/,oColumn1:Def(5/*exCellForeColor*/))
			oColumn1:Width := 96
			oColumn1:AllowSizing := .F.
		oItems := oTree:Items()
			oItems:AddItem(1)
			h := oItems:AddItem(0)
			oItems:SetProperty("CellCaption",h,0,"<b>HTML</b> Text")
			oItems:SetProperty("CellCaptionFormat",h,0,1/*exHTML*/)
			oItems:AddItem(2)
		oTree:EndUpdate()

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

PROCEDURE OnCellStateChanged(oTree,Item,ColIndex)

RETURN

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

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

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

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

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

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
602
How can I include the child items, when a filter is applied

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumns
	LOCAL oItems
	LOCAL oTree
	LOCAL h0

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oTree:ColumnAutoResize := .T.
		oTree:ContinueColumnScroll := .F.
		oTree:MarkSearchColumn := .F.
		oTree:SearchColumnIndex := 1
		oTree:Indent := 16
		oTree:LinesAtRoot := -1/*exLinesAtRoot*/
		oTree:FilterBarPromptVisible := -1/*0xfffff0e8+exFilterBarCompact+exFilterBarShowCloseOnRight+exFilterBarShowCloseIfRequired+exFilterBarToggle+exFilterBarSingleLine+exFilterBarCaptionVisible+exFilterBarVisible+exFilterBarPromptVisible*/
		oTree:FilterBarPromptPattern := "Nancy"
		oTree:FilterInclude := 1/*exItemsWithChilds*/
		oColumns := oTree:Columns()
			oColumns:Add("Name"):Width := 96
			oColumns:Add("Title"):Width := 96
			oColumns:Add("City")
		oItems := oTree:Items()
			h0 := oItems:AddItem("Nancy Davolio")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Seattle")
			h0 := oItems:InsertItem(h0,,"Andrew Fuller")
			oItems:SetProperty("CellCaption",h0,1,"Vice President, Sales")
			oItems:SetProperty("CellCaption",h0,2,"Tacoma")
			h0 := oItems:InsertItem(h0,,"Michael Suyama")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"London")
			h0 := oItems:AddItem("Janet Leverling")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Kirkland")
			h0 := oItems:InsertItem(h0,,"Margaret Peacock")
			oItems:SetProperty("CellCaption",h0,1,"Sales Representative")
			oItems:SetProperty("CellCaption",h0,2,"Redmond")
		oTree:ApplyFilter()
		oTree:EndUpdate()

	oForm:Show()
	DO WHILE nEvent != xbeP_Quit
		nEvent := AppEvent( @mp1, @mp2, @oXbp )
		oXbp:handleEvent( nEvent, mp1, mp2 )
	ENDDO 
RETURN
601
How do I get sorted the column as string, numeric, date, date and time. Also how can it be applied to drop down filter panel

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

PROCEDURE Main
 	LOCAL oForm
	LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL
	LOCAL oColumn,oColumn1,oColumn2,oColumn3,oColumn4
	LOCAL oItems
	LOCAL oTree
	LOCAL h

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

	oTree := XbpActiveXControl():new( oForm:drawingArea )
	oTree:CLSID  := "Exontrol.Tree.1" /*{3C5FC763-72BA-4B97-9985-81862E9251F2}*/
	oTree:create(,, {10,60},{610,370} )

		oTree:BeginUpdate()
		oColumn := oTree:Columns():Add("Date")
			oColumn:SortType := 2/*SortDate*/
			oColumn:DisplayFilterButton := .T.
			oColumn:DisplayFilterPattern := .F.
			oColumn:DisplayFilterDate := .T.
			oColumn:FilterList := 1296/*exShowFocusItem+exShowCheckBox+exSortItemsDesc*/
		oColumn1 := oTree:Columns():Add("DateTime")
			oColumn1:SortType := 3/*SortDateTime*/
			oColumn1:DisplayFilterButton := .T.
			oColumn1:DisplayFilterPattern := .F.
			oColumn1:FilterList := 1296/*exShowFocusItem+exShowCheckBox+exSortItemsDesc*/
		oColumn2 := oTree:Columns():Add("Time")
			oColumn2:SortType := 4/*SortTime*/
			oColumn2:DisplayFilterButton := .T.
			oColumn2:DisplayFilterPattern := .F.
			oColumn2:FilterList := 1296/*exShowFocusItem+exShowCheckBox+exSortItemsDesc*/
			oColumn2:FormatColumn := "time(value)"
		oColumn3 := oTree:Columns():Add("Numeric")
			oColumn3:SortType := 1/*SortNumeric*/
			oColumn3:DisplayFilterButton := .T.
			oColumn3:FilterList := 1296/*exShowFocusItem+exShowCheckBox+exSortItemsDesc*/
		oColumn4 := oTree:Columns():Add("String")
			oColumn4:DisplayFilterButton := .T.
			oColumn4:FilterList := 1296/*exShowFocusItem+exShowCheckBox+exSortItemsDesc*/
		oItems := oTree:Items()
			h := oItems:AddItem("01/27/2010")
			oItems:SetProperty("CellCaption",h,1,"01/27/2010 10:00:00")
			oItems:SetProperty("CellCaption",h,2,oItems:CellCaption(h,1))
			oItems:SetProperty("CellCaption",h,3,1)
			oItems:SetProperty("CellCaption",h,4,oItems:CellCaption(h,3))
			h := oItems:AddItem("01/27/2011")
			oItems:SetProperty("CellCaption",h,1,"01/27/2011 09:00:00")
			oItems:SetProperty("CellCaption",h,2,oItems:CellCaption(h,1))
			oItems:SetProperty("CellCaption",h,3,11)
			oItems:SetProperty("CellCaption",h,4,oItems:CellCaption(h,3))
			h := oItems:AddItem("11/02/2010")
			oItems:SetProperty("CellCaption",h,1,"11/02/2010 09:00:00")
			oItems:SetProperty("CellCaption",h,2,oItems:CellCaption(h,1))
			oItems:SetProperty("CellCaption",h,3,2)
			oItems:SetProperty("CellCaption",h,4,oItems:CellCaption(h,3))
		oTree:Columns:Item("DateTime"):DisplayFilterDate := .F.
		oTree:EndUpdate()

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