property Gauge.DefaultLayer(Property as DefaultLayerPropertyEnum) as Variant
Defines the default value for properties of the layers to be created.

TypeDescription
Property as DefaultLayerPropertyEnum A DefaultLayerPropertyEnum expression that specifies the property to change the default value
Variant A VARIANT expression that specifies the property's default value.
The DefaultLayer property defines the default value for properties of the layers to be created. Any call of the DefaultLayer property has effect for any new layer added to the control's collection. Changing the DefaultLayer property does not have any effect on already existing layers. 

The following samples show how you can load all layers with a semi-transparency (50%):

VBA (MS Access, Excell...)

With Gauge1
	.AllowSmoothChange = 0
	.DefaultLayer(22) = 50
	.PicturesPath = "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	.PicturesName = "`Layer` + int(value  + 1) + `.png`"
	.Layers.Count = 11
End With

VB6

With Gauge1
	.AllowSmoothChange = exSmoothChangeless
	.DefaultLayer(exDefLayerTransparency) = 50
	.PicturesPath = "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	.PicturesName = "`Layer` + int(value  + 1) + `.png`"
	.Layers.Count = 11
End With

VB.NET

With Exgauge1
	.AllowSmoothChange = exontrol.EXGAUGELib.SmoothPropertyEnum.exSmoothChangeless
	.set_DefaultLayer(exontrol.EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerTransparency,50)
	.PicturesPath = "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	.PicturesName = "`Layer` + int(value  + 1) + `.png`"
	.Layers.Count = 11
End With

VB.NET for /COM

With AxGauge1
	.AllowSmoothChange = EXGAUGELib.SmoothPropertyEnum.exSmoothChangeless
	.set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerTransparency,50)
	.PicturesPath = "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	.PicturesName = "`Layer` + int(value  + 1) + `.png`"
	.Layers.Count = 11
End With

C++

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

	#import <ExGauge.dll>
	using namespace EXGAUGELib;
*/
EXGAUGELib::IGaugePtr spGauge1 = GetDlgItem(IDC_GAUGE1)->GetControlUnknown();
spGauge1->PutAllowSmoothChange(EXGAUGELib::exSmoothChangeless);
spGauge1->PutDefaultLayer(EXGAUGELib::exDefLayerTransparency,long(50));
spGauge1->PutPicturesPath(L"C:\\Program Files (x86)\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
spGauge1->PutPicturesName(L"`Layer` + int(value  + 1) + `.png`");
spGauge1->GetLayers()->PutCount(11);

C++ Builder

Gauge1->AllowSmoothChange = Exgaugelib_tlb::SmoothPropertyEnum::exSmoothChangeless;
Gauge1->DefaultLayer[Exgaugelib_tlb::DefaultLayerPropertyEnum::exDefLayerTransparency] = TVariant(50);
Gauge1->PicturesPath = L"C:\\Program Files (x86)\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob";
Gauge1->PicturesName = L"`Layer` + int(value  + 1) + `.png`";
Gauge1->Layers->Count = 11;

C#

exgauge1.AllowSmoothChange = exontrol.EXGAUGELib.SmoothPropertyEnum.exSmoothChangeless;
exgauge1.set_DefaultLayer(exontrol.EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerTransparency,50);
exgauge1.PicturesPath = "C:\\Program Files (x86)\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob";
exgauge1.PicturesName = "`Layer` + int(value  + 1) + `.png`";
exgauge1.Layers.Count = 11;

JScript/JavaScript

<BODY onload="Init()">
<OBJECT CLASSID="clsid:91628F12-393C-44EF-A558-83ED1790AAD3" id="Gauge1"></OBJECT>

<SCRIPT LANGUAGE="JScript">
function Init()
{
	Gauge1.AllowSmoothChange = 0;
	Gauge1.DefaultLayer(22) = 50;
	Gauge1.PicturesPath = "C:\\Program Files (x86)\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob";
	Gauge1.PicturesName = "`Layer` + int(value  + 1) + `.png`";
	Gauge1.Layers.Count = 11;
}
</SCRIPT>
</BODY>

VBScript

<BODY onload="Init()">
<OBJECT CLASSID="clsid:91628F12-393C-44EF-A558-83ED1790AAD3" id="Gauge1"></OBJECT>

<SCRIPT LANGUAGE="VBScript">
Function Init()
	With Gauge1
		.AllowSmoothChange = 0
		.DefaultLayer(22) = 50
		.PicturesPath = "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob"
		.PicturesName = "`Layer` + int(value  + 1) + `.png`"
		.Layers.Count = 11
	End With
End Function
</SCRIPT>
</BODY>

C# for /COM

axGauge1.AllowSmoothChange = EXGAUGELib.SmoothPropertyEnum.exSmoothChangeless;
axGauge1.set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerTransparency,50);
axGauge1.PicturesPath = "C:\\Program Files (x86)\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob";
axGauge1.PicturesName = "`Layer` + int(value  + 1) + `.png`";
axGauge1.Layers.Count = 11;

X++ (Dynamics Ax 2009)

public void init()
{
	;

	super();

	exgauge1.AllowSmoothChange(0/*exSmoothChangeless*/);
	exgauge1.DefaultLayer(22/*exDefLayerTransparency*/,COMVariant::createFromInt(50));
	exgauge1.PicturesPath("C:\\Program Files (x86)\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob");
	exgauge1.PicturesName("`Layer` + int(value  + 1) + `.png`");
	exgauge1.Layers().Count(11);
}

Delphi 8 (.NET only)

with AxGauge1 do
begin
	AllowSmoothChange := EXGAUGELib.SmoothPropertyEnum.exSmoothChangeless;
	set_DefaultLayer(EXGAUGELib.DefaultLayerPropertyEnum.exDefLayerTransparency,TObject(50));
	PicturesPath := 'C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob';
	PicturesName := '`Layer` + int(value  + 1) + `.png`';
	Layers.Count := 11;
end

Delphi (standard)

with Gauge1 do
begin
	AllowSmoothChange := EXGAUGELib_TLB.exSmoothChangeless;
	DefaultLayer[EXGAUGELib_TLB.exDefLayerTransparency] := OleVariant(50);
	PicturesPath := 'C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob';
	PicturesName := '`Layer` + int(value  + 1) + `.png`';
	Layers.Count := 11;
end

VFP

with thisform.Gauge1
	.AllowSmoothChange = 0
	.Object.DefaultLayer(22) = 50
	.PicturesPath = "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	.PicturesName = "`Layer` + int(value  + 1) + `.png`"
	.Layers.Count = 11
endwith

dBASE Plus

local oGauge

oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject
oGauge.AllowSmoothChange = 0
oGauge.Template = [DefaultLayer(22) = 50] // oGauge.DefaultLayer(22) = 50
oGauge.PicturesPath = "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oGauge.PicturesName = "`Layer` + int(value  + 1) + `.png`"
oGauge.Layers.Count = 11

XBasic (Alpha Five)

Dim oGauge as P

oGauge = topparent:CONTROL_ACTIVEX1.activex
oGauge.AllowSmoothChange = 0
oGauge.Template = "DefaultLayer(22) = 50" // oGauge.DefaultLayer(22) = 50
oGauge.PicturesPath = "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oGauge.PicturesName = "`Layer` + int(value  + 1) + `.png`"
oGauge.Layers.Count = 11

Visual Objects


oDCOCX_Exontrol1:AllowSmoothChange := exSmoothChangeless
oDCOCX_Exontrol1:[DefaultLayer,exDefLayerTransparency] := 50
oDCOCX_Exontrol1:PicturesPath := "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oDCOCX_Exontrol1:PicturesName := "`Layer` + int(value  + 1) + `.png`"
oDCOCX_Exontrol1:Layers:Count := 11

PowerBuilder

OleObject oGauge

oGauge = ole_1.Object
oGauge.AllowSmoothChange = 0
oGauge.DefaultLayer(22,50)
oGauge.PicturesPath = "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob"
oGauge.PicturesName = "`Layer` + int(value  + 1) + `.png`"
oGauge.Layers.Count = 11

Visual DataFlex

Procedure OnCreate
	Forward Send OnCreate
	Set ComAllowSmoothChange to OLEexSmoothChangeless
	Set ComDefaultLayer OLEexDefLayerTransparency to 50
	Set ComPicturesPath to "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob"
	Set ComPicturesName to "`Layer` + int(value  + 1) + `.png`"
	Variant voLayers
	Get ComLayers to voLayers
	Handle hoLayers
	Get Create (RefClass(cComLayers)) to hoLayers
	Set pvComObject of hoLayers to voLayers
		Set ComCount of hoLayers to 11
	Send Destroy to hoLayers
End_Procedure

XBase++

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

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

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

	oGauge := XbpActiveXControl():new( oForm:drawingArea )
	oGauge:CLSID  := "Exontrol.Gauge.1" /*{91628F12-393C-44EF-A558-83ED1790AAD3}*/
	oGauge:create(,, {10,60},{610,370} )

		oGauge:AllowSmoothChange := 0/*exSmoothChangeless*/
		oGauge:SetProperty("DefaultLayer",22/*exDefLayerTransparency*/,50)
		oGauge:PicturesPath := "C:\Program Files (x86)\Exontrol\ExGauge\Sample\Design\Circular\Knob"
		oGauge:PicturesName := "`Layer` + int(value  + 1) + `.png`"
		oGauge:Layers():Count := 11

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