property Column.Def(Property as DefColumnEnum) as Variant
Retrieves or sets a value that indicates the default value of given properties for all cells in the same column.

TypeDescription
Property as DefColumnEnum A DefColumnEnum expression that indicates the property being changed.
Variant Variant value that specifies the newly value.
Use the Def property to specify a common value for given properties for all cells in the column. For instance, you can use the Def property to assign check boxes to all cells in the column, without enumerating them.

The following samples show how to assign a check-box to entire column:

VBA (MS Access, Excell...)

With TreeCube1
	.TexturePicturePath = ""
	With .FrontFace.CreateTree
		.ItemPadding = 20
		With .Columns.Add("Def")
			.Alignment = 0
			.Def(0) = True
			.FormatColumn = "`Check <b>` + 1 pos ``"
		End With
		.Items.Count = 4
	End With
End With

VB6

With TreeCube1
	.TexturePicturePath = ""
	With .FrontFace.CreateTree
		.ItemPadding = 20
		With .Columns.Add("Def")
			.Alignment = LeftAlignment
			.Def(exCellHasCheckBox) = True
			.FormatColumn = "`Check <b>` + 1 pos ``"
		End With
		.Items.Count = 4
	End With
End With

VB.NET

With Extreecube1
	.TexturePicturePath = ""
	With .FrontFace.CreateTree()
		.ItemPadding = 20
		With .Columns.Add("Def")
			.Alignment = exontrol.EXTREECUBELib.AlignmentEnum.LeftAlignment
			.set_Def(exontrol.EXTREECUBELib.DefColumnEnum.exCellHasCheckBox,True)
			.FormatColumn = "`Check <b>` + 1 pos ``"
		End With
		.Items.Count = 4
	End With
End With

VB.NET for /COM

With AxTreeCube1
	.TexturePicturePath = ""
	With .FrontFace.CreateTree()
		.ItemPadding = 20
		With .Columns.Add("Def")
			.Alignment = EXTREECUBELib.AlignmentEnum.LeftAlignment
			.Def(EXTREECUBELib.DefColumnEnum.exCellHasCheckBox) = True
			.FormatColumn = "`Check <b>` + 1 pos ``"
		End With
		.Items.Count = 4
	End With
End With

C++

/*
	Copy and paste the following directives to your header file as
	it defines the namespace 'EXTREECUBELib' for the library: 'ExTreeCube 1.0 Control Library'

	#import <ExTreeCube.dll>
	using namespace EXTREECUBELib;
*/
EXTREECUBELib::ITreeCubePtr spTreeCube1 = GetDlgItem(IDC_TREECUBE1)->GetControlUnknown();
spTreeCube1->PutTexturePicturePath(L"");
EXTREECUBELib::IFaceTreePtr var_FaceTree = spTreeCube1->GetFrontFace()->CreateTree();
	var_FaceTree->PutItemPadding(20);
	EXTREECUBELib::IColumnPtr var_Column = var_FaceTree->GetColumns()->Add(L"Def");
		var_Column->PutAlignment(EXTREECUBELib::LeftAlignment);
		var_Column->PutDef(EXTREECUBELib::exCellHasCheckBox,VARIANT_TRUE);
		var_Column->PutFormatColumn(L"`Check <b>` + 1 pos ``");
	var_FaceTree->GetItems()->PutCount(4);

C++ Builder

TreeCube1->TexturePicturePath = L"";
Extreecubelib_tlb::IFaceTreePtr var_FaceTree = TreeCube1->FrontFace->CreateTree();
	var_FaceTree->ItemPadding = 20;
	Extreecubelib_tlb::IColumnPtr var_Column = var_FaceTree->Columns->Add(L"Def");
		var_Column->Alignment = Extreecubelib_tlb::AlignmentEnum::LeftAlignment;
		var_Column->set_Def(Extreecubelib_tlb::DefColumnEnum::exCellHasCheckBox,TVariant(true));
		var_Column->FormatColumn = L"`Check <b>` + 1 pos ``";
	var_FaceTree->Items->Count = 4;

C#

extreecube1.TexturePicturePath = "";
exontrol.EXTREECUBELib.FaceTree var_FaceTree = extreecube1.FrontFace.CreateTree();
	var_FaceTree.ItemPadding = 20;
	exontrol.EXTREECUBELib.Column var_Column = var_FaceTree.Columns.Add("Def");
		var_Column.Alignment = exontrol.EXTREECUBELib.AlignmentEnum.LeftAlignment;
		var_Column.set_Def(exontrol.EXTREECUBELib.DefColumnEnum.exCellHasCheckBox,true);
		var_Column.FormatColumn = "`Check <b>` + 1 pos ``";
	var_FaceTree.Items.Count = 4;

JScript/JavaScript

<BODY onload="Init()">
<OBJECT CLASSID="clsid:13A5B44B-DBB7-42F2-AE2B-943A6CF6C8B9" id="TreeCube1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	TreeCube1.TexturePicturePath = "";
	var var_FaceTree = TreeCube1.FrontFace.CreateTree();
		var_FaceTree.ItemPadding = 20;
		var var_Column = var_FaceTree.Columns.Add("Def");
			var_Column.Alignment = 0;
			var_Column.Def(0) = true;
			var_Column.FormatColumn = "`Check <b>` + 1 pos ``";
		var_FaceTree.Items.Count = 4;
}
</SCRIPT>
</BODY>

VBScript

<BODY onload="Init()">
<OBJECT CLASSID="clsid:13A5B44B-DBB7-42F2-AE2B-943A6CF6C8B9" id="TreeCube1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With TreeCube1
		.TexturePicturePath = ""
		With .FrontFace.CreateTree
			.ItemPadding = 20
			With .Columns.Add("Def")
				.Alignment = 0
				.Def(0) = True
				.FormatColumn = "`Check <b>` + 1 pos ``"
			End With
			.Items.Count = 4
		End With
	End With
End Function
</SCRIPT>
</BODY>

C# for /COM

axTreeCube1.TexturePicturePath = "";
EXTREECUBELib.FaceTree var_FaceTree = axTreeCube1.FrontFace.CreateTree();
	var_FaceTree.ItemPadding = 20;
	EXTREECUBELib.Column var_Column = var_FaceTree.Columns.Add("Def");
		var_Column.Alignment = EXTREECUBELib.AlignmentEnum.LeftAlignment;
		var_Column.set_Def(EXTREECUBELib.DefColumnEnum.exCellHasCheckBox,true);
		var_Column.FormatColumn = "`Check <b>` + 1 pos ``";
	var_FaceTree.Items.Count = 4;

X++ (Dynamics Ax 2009)

public void init()
{
	COM com_Column,com_Columns,com_FaceTree,com_Items;
	anytype var_Column,var_Columns,var_FaceTree,var_Items;
	;

	super();

	extreecube1.TexturePicturePath("");
	var_FaceTree = extreecube1.FrontFace().CreateTree(); com_FaceTree = var_FaceTree;
		com_FaceTree.ItemPadding(20);
		var_Columns = COM::createFromObject(com_FaceTree.Columns()); com_Columns = var_Columns;
		var_Column = COM::createFromObject(com_Columns).Add("Def"); com_Column = var_Column;
			com_Column.Alignment(0/*LeftAlignment*/);
			com_Column.Def(0/*exCellHasCheckBox*/,COMVariant::createFromBoolean(true));
			com_Column.FormatColumn("`Check <b>` + 1 pos ``");
		var_Items = COM::createFromObject(com_FaceTree.Items()); com_Items = var_Items;
		com_Items.Count(4);
}

Delphi 8 (.NET only)

with AxTreeCube1 do
begin
	TexturePicturePath := '';
	with FrontFace.CreateTree() do
	begin
		ItemPadding := 20;
		with Columns.Add('Def') do
		begin
			Alignment := EXTREECUBELib.AlignmentEnum.LeftAlignment;
			Def[EXTREECUBELib.DefColumnEnum.exCellHasCheckBox] := TObject(True);
			FormatColumn := '`Check <b>` + 1 pos ``';
		end;
		Items.Count := 4;
	end;
end

Delphi (standard)

with TreeCube1 do
begin
	TexturePicturePath := '';
	with FrontFace.CreateTree() do
	begin
		ItemPadding := 20;
		with Columns.Add('Def') do
		begin
			Alignment := EXTREECUBELib_TLB.LeftAlignment;
			Def[EXTREECUBELib_TLB.exCellHasCheckBox] := OleVariant(True);
			FormatColumn := '`Check <b>` + 1 pos ``';
		end;
		Items.Count := 4;
	end;
end

VFP

with thisform.TreeCube1
	.TexturePicturePath = ""
	with .FrontFace.CreateTree
		.ItemPadding = 20
		with .Columns.Add("Def")
			.Alignment = 0
			.Def(0) = .T.
			.FormatColumn = "`Check <b>` + 1 pos ``"
		endwith
		.Items.Count = 4
	endwith
endwith

dBASE Plus

local oTreeCube,var_Column,var_FaceTree

oTreeCube = form.EXTREECUBEACTIVEXCONTROL1.nativeObject
oTreeCube.TexturePicturePath = ""
var_FaceTree = oTreeCube.FrontFace.CreateTree()
	var_FaceTree.ItemPadding = 20
	var_Column = var_FaceTree.Columns.Add("Def")
		var_Column.Alignment = 0
		// var_Column.Def(0) = true
		with (oTreeCube)
			TemplateDef = [dim var_Column]
			TemplateDef = var_Column
			Template = [var_Column.Def(0) = True]
		endwith
		var_Column.FormatColumn = "`Check <b>` + 1 pos ``"
	var_FaceTree.Items.Count = 4

XBasic (Alpha Five)

Dim oTreeCube as P
Dim var_Column as P
Dim var_FaceTree as P

oTreeCube = topparent:CONTROL_ACTIVEX1.activex
oTreeCube.TexturePicturePath = ""
var_FaceTree = oTreeCube.FrontFace.CreateTree()
	var_FaceTree.ItemPadding = 20
	var_Column = var_FaceTree.Columns.Add("Def")
		var_Column.Alignment = 0
		' var_Column.Def(0) = .t.
		oTreeCube.TemplateDef = "dim var_Column"
		oTreeCube.TemplateDef = var_Column
		oTreeCube.Template = "var_Column.Def(0) = True"

		var_Column.FormatColumn = "`Check <b>` + 1 pos ``"
	var_FaceTree.Items.Count = 4

Visual Objects

local var_Column as IColumn
local var_FaceTree as IFaceTree

oDCOCX_Exontrol1:TexturePicturePath := ""
var_FaceTree := oDCOCX_Exontrol1:FrontFace:CreateTree()
	var_FaceTree:ItemPadding := 20
	var_Column := var_FaceTree:Columns:Add("Def")
		var_Column:Alignment := LeftAlignment
		var_Column:[Def,exCellHasCheckBox] := true
		var_Column:FormatColumn := "`Check <b>` + 1 pos ``"
	var_FaceTree:Items:Count := 4

PowerBuilder

OleObject oTreeCube,var_Column,var_FaceTree

oTreeCube = ole_1.Object
oTreeCube.TexturePicturePath = ""
var_FaceTree = oTreeCube.FrontFace.CreateTree()
	var_FaceTree.ItemPadding = 20
	var_Column = var_FaceTree.Columns.Add("Def")
		var_Column.Alignment = 0
		var_Column.Def(0,true)
		var_Column.FormatColumn = "`Check <b>` + 1 pos ``"
	var_FaceTree.Items.Count = 4

Visual DataFlex

Procedure OnCreate
	Forward Send OnCreate
	Set ComTexturePicturePath to ""
	Variant voFace
	Get ComFrontFace to voFace
	Handle hoFace
	Get Create (RefClass(cComFace)) to hoFace
	Set pvComObject of hoFace to voFace
		Variant voFaceTree
		Get ComCreateTree of hoFace to voFaceTree
		Handle hoFaceTree
		Get Create (RefClass(cComFaceTree)) to hoFaceTree
		Set pvComObject of hoFaceTree to voFaceTree
			Set ComItemPadding of hoFaceTree to 20
			Variant voColumns
			Get ComColumns of hoFaceTree to voColumns
			Handle hoColumns
			Get Create (RefClass(cComColumns)) to hoColumns
			Set pvComObject of hoColumns to voColumns
				Variant voColumn
				Get ComAdd of hoColumns "Def" to voColumn
				Handle hoColumn
				Get Create (RefClass(cComColumn)) to hoColumn
				Set pvComObject of hoColumn to voColumn
					Set ComAlignment of hoColumn to OLELeftAlignment
					Set ComDef of hoColumn OLEexCellHasCheckBox to True
					Set ComFormatColumn of hoColumn to "`Check <b>` + 1 pos ``"
				Send Destroy to hoColumn
			Send Destroy to hoColumns
			Variant voItems
			Get ComItems of hoFaceTree to voItems
			Handle hoItems
			Get Create (RefClass(cComItems)) to hoItems
			Set pvComObject of hoItems to voItems
				Set ComCount of hoItems to 4
			Send Destroy to hoItems
		Send Destroy to hoFaceTree
	Send Destroy to hoFace
End_Procedure

XBase++

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

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

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

	oTreeCube := XbpActiveXControl():new( oForm:drawingArea )
	oTreeCube:CLSID  := "Exontrol.TreeCube.1" /*{13A5B44B-DBB7-42F2-AE2B-943A6CF6C8B9}*/
	oTreeCube:create(,, {10,60},{610,370} )

		oTreeCube:TexturePicturePath := ""
		oFaceTree := oTreeCube:FrontFace():CreateTree()
			oFaceTree:ItemPadding := 20
			oColumn := oFaceTree:Columns():Add("Def")
				oColumn:Alignment := 0/*LeftAlignment*/
				oColumn:SetProperty("Def",0/*exCellHasCheckBox*/,.T.)
				oColumn:FormatColumn := "`Check <b>` + 1 pos ``"
			oFaceTree:Items():Count := 4

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