eXGauge - Templates
Exontrol.COM Software - Templates - ExGauge Component
1:
Yes, we can help you free of charge. In order to create the x-script to generate your request, we need from you clear pictures to build the layers as explained in the following preview.

Shortly, let's say you need to generate a gauge that looks as follow:

so, all we ask are the PNG ( transparent pictures ) for each layer. Having them we can build the x-script to generate a fully functional gauge control.

All you need is to contact us, and we will be back to you with details.
2:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\clock.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle Timer(TickCount)
{
	Value = FormatABC("value + 1/24/60/60", Value)
}

handle Change(Layer)
{
	Layers("sec").Value = Me.Value
	Layers("min").Value = Me.Value
	Layers("hour").Value = Me.Value
}

BeginUpdate
DefaultLayer(185)  = 2 ' exRotateBilinearInterpolation(2)
HTMLPicture("vista_clock.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock\vista_clock.png"
HTMLPicture("second-hand.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock\second-hand.png"
HTMLPicture("Minute.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock\Minute.png"
HTMLPicture("Hour.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock\Hour.png"
Layers.Clear()
Layers.Add("back").Background.Picture.Name = "vista_clock.png"
Layers.Add("hour")
{
	Selectable = False 
	OnDrag = 2 ' exDoRotate(2)
	Background.Picture.Name = "Hour.png"
	ValueToRotateAngle = "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
	RotateAngleToValue = "value / 360 * 0.5"
}
Layers.Add("min")
{
	OnDrag = 2 ' exDoRotate(2)
	Selectable = False 
	Background.Picture.Name = "Minute.png"
	ValueToRotateAngle = "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 360"
	RotateAngleToValue = "value / 360 / 24 / 60"
}
Layers.Add("sec")
{
	OnDrag = 2 ' exDoRotate(2)
	Selectable = False 
	Background.Picture.Name = "second-hand.png"
	ValueToRotateAngle = "((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 60 )) - floor(=:2) ) * 360"
	RotateAngleToValue = "value / 360 / 24 / 60"
}
LayerOfValue = 1
Value = FormatABC("date(`now`)")
TimerInterval = 1000
EndUpdate
3:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\clock.london.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle Change(Layer)
{
	Layers("sec").Value = Me.Value
	Layers("min").Value = Me.Value
	Layers("hour").Value = Me.Value
}

handle Timer(TickCount)
{
	Value = Me.FormatABC("value + 1/24/60/60",Value)
}

BeginUpdate
HTMLPicture("Back.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - London\Back.png"
HTMLPicture("second-hand.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - London\second-hand.png"
HTMLPicture("Minute.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - London\Minute.png"
HTMLPicture("Hour.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - London\Hour.png"
HTMLPicture("Front.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - London\front.png"
DefaultLayer(185) = 2
Layers.Clear()
Layers.Count = 6
Layers(0)
{
	Key = "back"
	Left = "(width-512)/2"
	Top = "(height-512)/2"
	Height = 512
	Width = 512
	Background.Picture.Name = "Back.png"
}
Layers(1)
{
	Position = 3
	Left = "(width-512)/2"
	Top = "(height-512)/2"
	Height = 512
	Width = 512
	Key = "sec"
	OnDrag = 2 ' exDoRotate(2)
	Selectable = False 
	RotateCenterLayer = 1
	Background.Picture.Name = "second-hand.png"
	ValueToRotateAngle = "((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 60 )) - floor(=:2) ) * 360"
	RotateAngleToValue = "value / 360 / 24 / 60"
}
Layers(2)
{
	Left = "(width-512)/2"
	Top = "(height-512)/2"
	Height = 512
	Width = 512
	Position = 2
	RotateCenterLayer = 2
	Key = "min"
	OnDrag = 2 ' exDoRotate(2)
	Selectable = False 
	Background.Picture.Name = "Minute.png"
	ValueToRotateAngle = "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 360"
	RotateAngleToValue = "value / 360 / 24 / 60"
}
Layers(3)
{
	Left = "(width-512)/2"
	Top = "(height-512)/2"
	Height = 512
	Width = 512
	Position = 1
	Key = "hour"
	RotateCenterLayer = 3
	OnDrag = 2 ' exDoRotate(2)
	Selectable = False 
	Background.Picture.Name = "Hour.png"
	ValueToRotateAngle = "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
	RotateAngleToValue = "value / 360 * 0.5"
}
Layers(4)
{
	Left = "(width-512)/2"
	Top = "(height-512)/2"
	Height = 512
	Width = 512
	Position = 1
	Key = "front"
	RotateCenterLayer = 4
	OnDrag = 2 ' exDoRotate(2)
	Background.Picture.Name = "front.png"
	ValueToRotateAngle = "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
	RotateAngleToValue = "value / 360 * 0.5"
}
Layers(5)
{
	Left = "(width-512)/2"
	Top = "(height-512)/2"
	Height = 512
	Width = 512
	Key = "bolt"
	RotateCenterLayer = 5
	Background.Picture.Name = "Bolt.png"
}
LayerOfValue = Me.Layers("hour").Index
Value = Me.FormatABC("date(`now`)")
TimerInterval = 1000
EndUpdate
4:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\clock.vintage.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle Timer(TickCount)
{
	Value = FormatABC("value + 1/24/60/60", Value)
}

handle Change(Layer)
{
	Layers("sec").Value = Me.Value
	Layers("min").Value = Me.Value
	Layers("hour").Value = Me.Value
}

BeginUpdate
DefaultLayer(185) = 2 ' exRotateBilinearInterpolation(2)
HTMLPicture("Back.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Vintage\Back.png"
HTMLPicture("second-hand.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Vintage\second-hand.png"
HTMLPicture("Minute.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Vintage\Minute.png"
HTMLPicture("Hour.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Vintage\Hour.png"
HTMLPicture("Front.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Vintage\front.png"
Layers.Clear()
Layers.Count = 5
Layers(0)
{
	Key = "back"
	Left = "(width-512)/2"
	Top = "(height-512)/2"
	Height = 512
	Width = 512
	Background.Picture.Name = "Back.png"
}
Layers(1)
{
	Position = 3
	Left = "(width-512)/2"
	Top = "(height-512)/2"
	Height = 512
	Width = 512
	Key = "sec"
	OnDrag = 2 ' exDoRotate(2)
	Selectable = False 
	Background.Picture.Name = "second-hand.png"
	ValueToRotateAngle = "((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 60 )) - floor(=:2) ) * 360"
	RotateAngleToValue = "value / 360 / 24 / 60"
}
Layers(2)
{
	Left = "(width-512)/2"
	Top = "(height-512)/2"
	Height = 512
	Width = 512
	Position = 2
	Key = "min"
	OnDrag = 2 ' exDoRotate(2)
	Selectable = False 
	Background.Picture.Name = "Minute.png"
	ValueToRotateAngle = "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 360"
	RotateAngleToValue = "value / 360 / 24 / 60"
}
Layers(3)
{
	Left = "(width-512)/2"
	Top = "(height-512)/2"
	Height = 512
	Width = 512
	Position = 1
	Key = "hour"
	OnDrag = 2 ' exDoRotate(2)
	Selectable = False 
	Background.Picture.Name = "Hour.png"
	ValueToRotateAngle = "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
	RotateAngleToValue = "value / 360 * 0.5"
}
Layers(4)
{
	Left = "(width-512)/2"
	Top = "(height-512)/2"
	Height = 512
	Width = 512
	Position = 1
	Key = "front"
	OnDrag = 2 ' exDoRotate(2)
	Selectable = False 
	Background.Picture.Name = "front.png"
	ValueToRotateAngle = "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
	RotateAngleToValue = "value / 360 * 0.5"
}
LayerOfValue = 3
Value = FormatABC("date(`now`)")
TimerInterval = 1000
EndUpdate()
5:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\clock.wolf.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle Timer(TickCount)
{
	Value = Me.FormatABC(" date(`now`)")
	Me.Layers("pointer").Value = Me.FormatABC("sin((value/100 mod 100)/100 * 2 * asin(1)) * 100",TickCount)
	Layers("range").Clip.Value = Me.Layers("pointer").Value
}

handle Change(Layer)
{
	Layers("sec").Value = Me.Value
	Layers("min").Value = Me.Value
	Layers("hour").Value = Me.Value
	Layers("range").Clip.Value = Me.Layers("pointer").Value
}

BeginUpdate
HTMLPicture("Back.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Wolf\Back.png"
HTMLPicture("Scale.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Wolf\Scale.png"
HTMLPicture("ScalePointerArc.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Wolf\ScalePointerArc.png"
HTMLPicture("ScalePointer.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Wolf\ScalePointer.png"
HTMLPicture("Bolt.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Wolf\Bolt.png"
HTMLPicture("second-hand.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Wolf\second-hand.png"
HTMLPicture("Minute.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Wolf\Minute.png"
HTMLPicture("Hour.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Wolf\Hour.png"
HTMLPicture("front.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Clock - Wolf\front.png"

DefaultLayer(185) = 2 ' exRotateBilinearInterpolation(2)
Layers.Clear()
Layers.Count = 9
Layers(0)
{
	Left = "(width-512)/2"
	Top = "(height-512)/2"
	Height = 512
	Width = 512
	Background.Picture.Name = "Back.png"
}
Layers(1)
{
	Key = "scale"
	DefaultOffsetX = -90
	DefaultOffsetY = -150
	Background.Picture.Name = "Scale.png"
	RotateCenterLayer =  1
	RotateCenterX =  "(lwidth+181)/2"
	RotateCenterY =  "(lheight+232)/2"
}
Layers(2)
{
	Key = "range"
	DefaultOffsetX = Me.Layers("scale").DefaultOffsetX
	DefaultOffsetY = Me.Layers("scale").DefaultOffsetY
	RotateCenterLayer =  Me.Layers("scale").Index
	Background.Picture
	{
		Name = "ScalePointerArc.png"
	}
'	Background.Color.Value = 0
	RotateCenterLayer =  Me.Layers("scale").Index
	Clip.Pie
	{
		RadiusX = 100
		RadiusY = 100
		CenterX = Me.Layers("scale").RotateCenterX
		CenterY = Me.Layers("scale").RotateCenterY
		StartAngle = -148
		SweepAngle = "value/100 * 300"
	}
}
Layers(3)
{
	Key = "pointer"
	DefaultOffsetX = Me.Layers("scale").DefaultOffsetX
	DefaultOffsetY = Me.Layers("scale").DefaultOffsetY
	Background.Picture
	{
		Name = "ScalePointer.png"
	}
	RotateCenterLayer =  Me.Layers("scale").Index
	OnDrag = 2 ' exDoRotate(2)
	DefaultRotateAngle = -148
	RotateAngleValid = "value > 300 ? (value > 330 ? 0 : 300) : value"
	RotateAngleToValue = "value / 300 * 100"
	ValueToRotateAngle = "value /100 * 300"
}
Layers(4)
{
	Key = "bolt"
	DefaultOffsetX = Me.Layers("scale").DefaultOffsetX
	DefaultOffsetY = Me.Layers("scale").DefaultOffsetY
	Background.Picture
	{
		Name = "Bolt.png"
	}
}
Layers(5)
{
	Left = "(width-512)/2"
	Top = "(height-512)/2"
	Height = 512
	Width = 512
	Key = "sec"
	OnDrag = 2 ' exDoRotate(2)
	Selectable = False 
	Background.Picture.Name = "second-hand.png"
	ValueToRotateAngle = "((2:=(((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 60 )) - floor(=:2) ) * 360"
	RotateAngleToValue = "value / 360 / 24 / 60"
}
Layers(6)
{
	Left = "(width-512)/2"
	Top = "(height-512)/2"
	Height = 512
	Width = 512
	Key = "min"
	OnDrag = 2 ' exDoRotate(2)
	Selectable = False 
	Background.Picture.Name = "Minute.png"
	ValueToRotateAngle = "((1:=( ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) ) * 24 ))  - floor(=:1)) * 360"
	RotateAngleToValue = "value / 360 / 24 / 60"
}
Layers(7)
{
	Left = "(width-512)/2"
	Top = "(height-512)/2"
	Height = 512
	Width = 512
	Key = "hour"
	OnDrag = 2 ' exDoRotate(2)
	Selectable = False 
	Background.Picture.Name = "Hour.png"
	ValueToRotateAngle = "2 * 360 * ( (0:=(value < 0 ? floor(value) + 1 - value : value - floor(value))) < 0.5 ? =:0 : (0:= (=:0 - 0.5)) )"
	RotateAngleToValue = "value / 360 * 0.5"
}
Layers(8)
{
	Left = "(width-512)/2"
	Top = "(height-512)/2"
	Height = 512
	Width = 512
	Key = "front"
	OnDrag = 2 ' exDoRotate(2)
	Selectable = False 
	Background.Picture.Name = "front.png"
}
LayerOfValue = Me.Layers("hour").Index
Value = FormatABC("date(`now`)")
TimerInterval = 100
EndUpdate
6:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\gauge.1.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle MouseWheel(Delta)
{
	Value = Me.FormatABC("A - B", Me.Value, Delta )
}

handle Change(Layer)
{
	Layers(1).Brightness(2) = Me.Value
}

BeginUpdate
Layers.Clear()
Layers.Count = 2
AllowSmoothChange = 0 ' exSmoothChangeless(0)
HTMLPicture("Guage_Background_Transparent.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Guage\Guage_Background_Transparent.png"
HTMLPicture("Guage_Needle.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Guage\Guage_Needle.png"
Layers(0)
{
	RotateCenterY = "lheight/2 + 78"
	Background.Picture.Name = "Guage_Background_Transparent.png"
}
Layers(1)
{
	OnDrag = 2 ' exDoRotate(2)
	Background.Picture.Name = "Guage_Needle.png"
	RotateAngleValid = "value < 90 ? value : (value < 180 ? 90 : ( value < 270 ? 270 : value ))"
	RotateAngleToValue = "value >= 270 ? (value - 270)/90*50 : (value/90)*50 + 50"
	ValueToRotateAngle = "value < 50 ? (270 + value/50*90) : (value - 50)/50 * 90"
	RotateType = 2 ' exRotateBilinearInterpolation(2)
	Brightness(0) = 0 ' exAllChannels(0)
}
LayerOfValue = 1
Value = 50
EndUpdate()
7:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\knob.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle MouseWheel(Delta)
{
	Value = FormatABC("A  - B*(360/8/8)", Value, Delta)
	Value = FormatABC("int(A/(360/8/8))*(360/8/8)", Value)
}

handle DragStart(DragInfo,Cancel)
{
	DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)"
}

BeginUpdate
HTMLPicture("Layer1.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer1.png"
HTMLPicture("Layer2.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer2.png"
HTMLPicture("Layer3.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer3.png"
HTMLPicture("Layer4.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer4.png"
HTMLPicture("Layer5.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer5.png"
HTMLPicture("Layer6.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer6.png"
HTMLPicture("Layer7.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer7.png"
HTMLPicture("Layer8.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer8.png"
HTMLPicture("Layer9.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer9.png"
HTMLPicture("Layer10.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer10.png"
DefaultLayer(185) = 2 ' exDefLayerRotateType(185)
Layers.Clear()
Layers.Add("back").Background.Picture.Name = "Layer1.png"
Layers.Add("l2").Background.Picture.Name = "Layer2.png"
Layers.Add("l3").Background.Picture.Name = "Layer3.png"
Layers.Add("l4")
{
	Background.Picture.Name = "Layer4.png"
	Grayscale = True
}
Layers.Add("l5")
{
	Background.Picture.Name = "Layer5.png"
	Grayscale = True
}
Layers.Add("l6").Background.Picture.Name = "Layer6.png"
Layers.Add("l7").Background.Picture.Name = "Layer7.png"
Layers.Add("l8").Background.Picture.Name = "Layer8.png"
Layers.Add("l9").Background.Picture.Name = "Layer9.png"
Layers.Add("knob")
{
	Background.Picture.Name = "Layer10.png"
	OnDrag = 3 ' exDoRotamove(3)
	DefaultRotateAngle = -126
	'RotateAngleValid = "(360/8/8) * int(value /(360/8/8))"
}
Value = 90
EndUpdate
8:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\knob.h.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle Change(Layer)
{
	ExtraCaption("Client",0) = FormatABC("`<sha ;;0>` + ((100 - value) format ``)", Me.Value)
	ExtraCaption("Client", 4 )= FormatABC("value - 12", Layers(9).LayerToClientX(RotamoveCenterX,RotamoveCenterY)) ' exLayerCaptionLeft(4)
	ExtraCaption("Client", 5) =  FormatABC("value - 24", Layers(9).LayerToClientY(RotamoveCenterX,RotamoveCenterY))' exLayerCaptionTop(5)
	Layers(3).Clip.Value = Me.Layers(9).RotateAngle
	Layers(4).Clip.Value = Me.Layers(3).Clip.Value
}

handle MouseWheel(Delta)
{
	Value = FormatABC("(100 - value) - B/4", Value, Delta)
	Value = FormatABC("100 - int(A/(1/4))*(1/4)", Value)
}

handle DragStart(DragInfo,Cancel)
{
	DragInfo.RotateAngleValid = "value < 0 ? 0 : ( value >= 360 ? 359.999 : value )"
}

BeginUpdate
HTMLPicture("Layer1.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer1.png"
HTMLPicture("Layer2.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer2.png"
HTMLPicture("Layer3.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer3.png"
HTMLPicture("Layer4.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer4.png"
HTMLPicture("Layer5.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer5.png"
HTMLPicture("Layer6.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer6.png"
HTMLPicture("Layer7.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer7.png"
HTMLPicture("Layer8.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer8.png"
HTMLPicture("Layer9.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer9.png"
HTMLPicture("Layer10.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob\Layer10.png"
DefaultLayer(185) = 2 ' exDefLayerRotateType(185)
Layers.Clear()
Layers.Add("back").Background.Picture.Name = "Layer1.png"
Layers.Add("l2").Background.Picture.Name = "Layer2.png"
Layers.Add("l3").Background.Picture.Name = "Layer3.png"
Layers.Add("l4").Background.Picture.Name = "Layer4.png"
Layers.Add("l5").Background.Picture.Name = "Layer5.png"
Layers.Add("l6").Background.Picture.Name = "Layer6.png"
Layers.Add("l7").Background.Picture.Name = "Layer7.png"
Layers.Add("l8").Background.Picture.Name = "Layer8.png"
Layers.Add("l9").Background.Picture.Name = "Layer9.png"
Layers.Add("knob")
{
	Background.Picture.Name = "Layer10.png"
	OnDrag = 3 ' exDoRotamove(3)
	DefaultRotateAngle = -126
	'RotateAngleValid = "(360/8/8) * int(value /(360/8/8))"
	RotateAngleToValue = "100 - value / 360 * 100"
	ValueToRotateAngle = "(value)/100 * 360"
}
Layers(3).Clip.Pie.SweepAngle = "value"
Layers(4).Clip.Pie.SweepAngle = Me.Layers(3).Clip.Pie.SweepAngle
LayerOfValue = Layers("knob").Index
Value = 25
EndUpdate
9:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\knob.1.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle MouseWheel(Delta)
{
	Value = FormatABC("A  - B*(360/8/8)", Value, Delta)
	Value = FormatABC("int(A/(360/8/8))*(360/8/8)", Value)
}

handle DragStart(DragInfo,Cancel)
{
	DragInfo.RotateAngleValid = "value < 0 ? 0 : (value > 360 ? 359.999999 : value)"
}

BeginUpdate
HTMLPicture("Layer1.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1\Layer1.png"
HTMLPicture("Layer2.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1\Layer2.png"
HTMLPicture("Layer3.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1\Layer3.png"
HTMLPicture("Layer4.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1\Layer4.png"
HTMLPicture("Layer5.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1\Layer5.png"
DefaultLayer(185) = 2 ' exDefLayerRotateType(185)
Layers.Clear()
Layers.Add("back").Background.Picture.Name = "Layer1.png"
Layers.Add("l2")
{
	Background.Picture.Name = "Layer2.png"
	Grayscale = True
}
Layers.Add("l3").Background.Picture.Name = "Layer3.png"
Layers.Add("l4")
{
	Background.Picture.Name = "Layer4.png"
}
Layers.Add("knob")
{
	Background.Picture.Name = "Layer5.png"
	OnDrag = 3 ' exDoRotamove(3)
	DefaultRotateAngle = -142
	'RotateAngleValid = "(360/8/8) * int(value /(360/8/8))"
}
LayerOfValue = Layers("knob").Index
Value = 90
EndUpdate
10:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\knob.1h.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle Change(Layer)
{
	ExtraCaption("Client",0) = FormatABC("`` + ((100 - value) format ``)", Me.Value)
	ExtraCaption("Client", 4 )= FormatABC("value - 12", Layers(4).LayerToClientX(RotamoveCenterX,RotamoveCenterY)) ' exLayerCaptionLeft(4)
	ExtraCaption("Client", 5) =  FormatABC("value - 32", Layers(4).LayerToClientY(RotamoveCenterX,RotamoveCenterY))' exLayerCaptionTop(5)
	Layers(1).Clip.Value = Me.Layers(4).RotateAngle
}

handle MouseWheel(Delta)
{
	Value = FormatABC("(100 - value) - B/4", Value, Delta)
	Value = FormatABC("100 - int(A/(1/4))*(1/4)", Value)
}

handle DragStart(DragInfo,Cancel)
{
	DragInfo.RotateAngleValid = "value < 0 ? 0 : ( value >= 360 ? 359.999 : value )"
}

BeginUpdate
HTMLPicture("Layer1.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1\Layer1.png"
HTMLPicture("Layer2.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1\Layer2.png"
HTMLPicture("Layer3.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1\Layer3.png"
HTMLPicture("Layer4.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1\Layer4.png"
HTMLPicture("Layer5.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 1\Layer5.png"
DefaultLayer(185) = 2 ' exDefLayerRotateType(185)
Layers.Clear()
Layers.Add("back").Background.Picture.Name = "Layer1.png"
Layers.Add("l2").Background.Picture.Name = "Layer2.png"
Layers.Add("l3").Background.Picture.Name = "Layer3.png"
Layers.Add("l4").Background.Picture.Name = "Layer4.png"
Layers.Add("knob")
{
	Background.Picture.Name = "Layer5.png"
	OnDrag = 3 ' exDoRotamove(3)
	DefaultRotateAngle = -142
	'RotateAngleValid = "(360/8/8) * int(value /(360/8/8))"
	RotateAngleToValue = "100 - value / 360 * 100"
	ValueToRotateAngle = "(value)/100 * 360"
}
Layers(1).Clip.Pie.SweepAngle = "value"
LayerOfValue = Layers("knob").Index
Value = 25
EndUpdate
11:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\knob.2.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle MouseWheel(Delta)
{
	Value = Me.FormatABC("A - B",Value, Delta)
}

BeginUpdate
HTMLPicture("Layer1.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2\Layer1.png"
HTMLPicture("Layer2.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2\Layer2.png"
HTMLPicture("Layer3.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2\Layer3.png"
HTMLPicture("Layer4.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2\Layer4.png"
HTMLPicture("Layer5.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2\Layer5.png"
DefaultLayer(185) = 2 ' exDefLayerRotateType(185)
Layers.Clear()
Layers.Add("back")
{
	Background.Picture.Name = "Layer1.png"
	RotateCenterX = "lwidth/2-3"
	RotateCenterY = "lheight/2+23"
}
Layers.Add("l2").Background.Picture.Name = "Layer2.png"
Layers.Add("l3")
{
	Background.Picture.Name = "Layer3.png"
	Grayscale = True
}
Layers.Add("l4").Background.Picture.Name = "Layer4.png"
Layers.Add("knob")
{
	Background.Picture.Name = "Layer5.png"
	DefaultRotateAngle = -132
	OnDrag = 3  ' exDoRotate(2)
	RotateAngleValid = "value < 0 ? 0  : (value > 236 ? (value > 300 ? 0 : 236 ) : value)"
	ValueToRotateAngle = "value < 20 ? (value /20 * 86) : (value - 20) / (90-20) * (236-86) + 86"
	RotateAngleToValue = "value < 86 ? value / 86 * 20: ( 20 + ( value -86 ) / (236-86) * 70 )"
}
LayerOfValue = Layers("knob").Index
Value = 35
EndUpdate
12:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\knob.2h.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle MouseWheel(Delta)
{
	Value = Me.FormatABC("A - B",Value, Delta)
}

handle Change(Layer)
{
	ExtraCaption("Client",0) = FormatABC("`` + ((value) format ``)", Me.Value)
	ExtraCaption("Client", 4 )= FormatABC("value - 12", Layers(4).LayerToClientX(RotamoveCenterX,RotamoveCenterY)) ' exLayerCaptionLeft(4)
	ExtraCaption("Client", 5) =  FormatABC("value + 12", Layers(4).LayerToClientY(RotamoveCenterX,RotamoveCenterY))' exLayerCaptionTop(5)
	Layers("l3").Clip.Value = Me.Layers("knob").RotateAngle
}

BeginUpdate
HTMLPicture("Layer1.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2\Layer1.png"
HTMLPicture("Layer2.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2\Layer2.png"
HTMLPicture("Layer3.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2\Layer3.png"
HTMLPicture("Layer4.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2\Layer4.png"
HTMLPicture("Layer5.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob 2\Layer5.png"
DefaultLayer(185) = 2 ' exDefLayerRotateType(185)
Layers.Clear()
Layers.Add("back")
{
	Background.Picture.Name = "Layer1.png"
	RotateCenterX = "lwidth/2-3"
	RotateCenterY = "lheight/2+23"
}
Layers.Add("l2").Background.Picture.Name = "Layer2.png"
Layers.Add("l3")
{
	Background.Picture.Name = "Layer3.png"
	Clip.Pie
	{
		StartAngle = 242
		SweepAngle = "value"
		CenterX = "lwidth/2-3"
		CenterY = "lheight/2+23"
	}
}
Layers.Add("l4").Background.Picture.Name = "Layer4.png"
Layers.Add("knob")
{
	Background.Picture.Name = "Layer5.png"
	DefaultRotateAngle = -132
	OnDrag = 3  ' exDoRotate(2)
	RotateAngleValid = "value < 0 ? 0  : (value > 236 ? (value > 300 ? 0 : 236 ) : value)"
	ValueToRotateAngle = "value < 20 ? (value /20 * 86) : (value - 20) / (90-20) * (236-86) + 86"
	RotateAngleToValue = "value < 86 ? value / 86 * 20: ( 20 + ( value -86 ) / (236-86) * 70 )"
}
LayerOfValue = Layers("knob").Index
Value = 35
EndUpdate
13:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\led.1.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle MouseWheel(Delta)
{
	Value = Me.FormatABC("value + B", Me.Layers("noDigit").Value, Delta)
}

handle Change(Layer)
{
	Value = Me.FormatABC("value MIN 0 MAX 9", Value )
	Me.Layers("noDigit").Background.ExtraPicture("8").Name = Me.FormatABC("`no` + value + `.png`", Me.Value )
}

BeginUpdate
AllowSmoothChange = 0 ' exSmoothChangeless(0)
HTMLPicture("noBack.png") = "E:\Exontrol\ExGauge\design\Led\Speed\noBack.png"
HTMLPicture("no0.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no0.png"
HTMLPicture("no1.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no1.png"
HTMLPicture("no2.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no2.png"
HTMLPicture("no3.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no3.png"
HTMLPicture("no4.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no4.png"
HTMLPicture("no5.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no5.png"
HTMLPicture("no6.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no6.png"
HTMLPicture("no7.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no7.png"
HTMLPicture("no8.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no8.png"
HTMLPicture("no9.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no9.png"
Layers.Clear()
Layers.Add("noBack")
{
	Width = "1 * 70"
	Height = "1 * 94"
	Transparency = 90
	Background.ExtraPicture("8").Name = "noBack.png"
}
Layers.Add("noDigit")
{
	Width = "1 * 70"
	Height = "1 * 94"
	Background.ExtraPicture("8").Name = "no0.png"
}
LayerOfValue = Me.Layers("noDigit").Index
Value = 5
EndUpdate
14:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\led.2.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle MouseWheel(Delta)
{
	Value = Me.FormatABC("value + B", Me.Layers("noDigit").Value, Delta)
}

handle Change(Layer)
{
	Value = Me.FormatABC("value MIN 0 MAX 99", 	Value )
	Me.Layers("noDigit").Background.ExtraPicture("80").Name = Me.FormatABC("`no` + int(value/10) + `.png`", Me.Value )	
	Me.Layers("noDigit").Background.ExtraPicture("08").Name = Me.FormatABC("`no` + int(value mod 10) + `.png`", Me.Value )	
}

BeginUpdate
AllowSmoothChange = 0 ' exSmoothChangeless(0)
HTMLPicture("noBack.png") = "E:\Exontrol\ExGauge\design\Led\Speed\noBack.png"
HTMLPicture("no0.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no0.png"
HTMLPicture("no1.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no1.png"
HTMLPicture("no2.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no2.png"
HTMLPicture("no3.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no3.png"
HTMLPicture("no4.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no4.png"
HTMLPicture("no5.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no5.png"
HTMLPicture("no6.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no6.png"
HTMLPicture("no7.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no7.png"
HTMLPicture("no8.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no8.png"
HTMLPicture("no9.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no9.png"
Layers.Clear()
Layers.Add("noBack")
{
	Left = "(width - 55 * 2)/2"
	Top = "(height - 94 * 1)/2"
	Width = "2 * 45 + 8"
	Height = "1 * 94"
	Transparency = 90
	Background.ExtraPicture("80")
	{
		Name = "noBack.png"
		Left = "-4"
		Width = "70"
	}
	Background.ExtraPicture("08")
	{
		Name = "noBack.png"
		Left = "36"
		Width = 70
	}
'	Visible = False 
}
Layers.Add("noDigit")
{
	Left = "(width - 55 * 2)/2"
	Top = "(height - 94 * 1)/2"
	Width = "2 * 45 + 8"
	Height = "1 * 94"
	Background.ExtraPicture("80")
	{
		Name = "no0.png"
		Left = "-4"
		Width = "70"
	}
	Background.ExtraPicture("08")
	{
		Name = "no0.png"
		Left = "36"
		Width = 70
	}
}
LayerOfValue = Me.Layers("noDigit").Index
Value = 67
EndUpdate
15:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\led.3.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle MouseWheel(Delta)
{
	Value = Me.FormatABC("value + B", Me.Layers("noDigit").Value, Delta)
}

handle Change(Layer)
{
	Value = Me.FormatABC("value MIN 0 MAX 999", 	Value )
	Me.Layers("noDigit").Background.ExtraPicture("800").Name = Me.FormatABC("`no` + int(value/100) + `.png`", Me.Value )	
	Me.Layers("noDigit").Background.ExtraPicture("080").Name = Me.FormatABC("`no` + int((value mod 100)/10) + `.png`", Me.Value )	
	Me.Layers("noDigit").Background.ExtraPicture("008").Name = Me.FormatABC("`no` + (value mod 10) + `.png`", Me.Value )	
}

BeginUpdate
AllowSmoothChange = 0 ' exSmoothChangeless(0)
HTMLPicture("noBack.png") = "E:\Exontrol\ExGauge\design\Led\Speed\noBack.png"
HTMLPicture("no0.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no0.png"
HTMLPicture("no1.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no1.png"
HTMLPicture("no2.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no2.png"
HTMLPicture("no3.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no3.png"
HTMLPicture("no4.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no4.png"
HTMLPicture("no5.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no5.png"
HTMLPicture("no6.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no6.png"
HTMLPicture("no7.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no7.png"
HTMLPicture("no8.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no8.png"
HTMLPicture("no9.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no9.png"
Layers.Clear()
Layers.Add("noBack")
{
	Left = "(width - (3 * 45 + 8))/2"
	Top = "(height - 94 * 1)/2"
	Width = "3 * 45 + 8"
	Height = "1 * 94"
	Transparency = 90
	Background.ExtraPicture("800")
	{
		Name = "noBack.png"
		Left = "-4"
		Width = "70"
	}
	Background.ExtraPicture("080")
	{
		Name = "noBack.png"
		Left = "-4 + 45"
		Width = 70
	}
	Background.ExtraPicture("008")
	{
		Name = "noBack.png"
		Left = "-4 + 2*45"
		Width = 70
	}
'	Visible = False 
}
Layers.Add("noDigit")
{
	Left = "(width - (3 * 45 + 8))/2"
	Top = "(height - 94 * 1)/2"
	Width = "3 * 45 + 8"
	Height = "1 * 94"
	Background.ExtraPicture("800")
	{
		Name = "no0.png"
		Left = "-4"
		Width = "70"
	}
	Background.ExtraPicture("080")
	{
		Name = "no0.png"
		Left = "-4 + 45"
		Width = 70
	}
	Background.ExtraPicture("008")
	{
		Name = "no0.png"
		Left = "-4 + 2*45"
		Width = 70
	}
}
LayerOfValue = Me.Layers("noDigit").Index
Value = 265
EndUpdate
16:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\led.4.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle MouseWheel(Delta)
{
	Value = Me.FormatABC("value + B", Me.Layers("noDigit").Value, Delta)
}

handle Change(Layer)
{
	Value = Me.FormatABC("value MIN 0 MAX 9999", 	Value )
	Me.Layers("noDigit").Background.ExtraPicture("8000").Name = Me.FormatABC("`no` + int(value/1000) + `.png`", Me.Value )	
	Me.Layers("noDigit").Background.ExtraPicture("0800").Name = Me.FormatABC("`no` + int((value mod 1000)/100) + `.png`", Me.Value )	
	Me.Layers("noDigit").Background.ExtraPicture("0080").Name = Me.FormatABC("`no` + int((value mod 100)/10) + `.png`", Me.Value )	
	Me.Layers("noDigit").Background.ExtraPicture("0008").Name = Me.FormatABC("`no` + (value mod 10) + `.png`", Me.Value )	
}

BeginUpdate
AllowSmoothChange = 0 ' exSmoothChangeless(0)
HTMLPicture("noBack.png") = "E:\Exontrol\ExGauge\design\Led\Speed\noBack.png"
HTMLPicture("no0.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no0.png"
HTMLPicture("no1.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no1.png"
HTMLPicture("no2.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no2.png"
HTMLPicture("no3.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no3.png"
HTMLPicture("no4.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no4.png"
HTMLPicture("no5.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no5.png"
HTMLPicture("no6.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no6.png"
HTMLPicture("no7.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no7.png"
HTMLPicture("no8.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no8.png"
HTMLPicture("no9.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no9.png"
Layers.Clear()
Layers.Add("noBack")
{
	Left = "(width - (4 * 45 + 8))/2"
	Top = "(height - 94 * 1)/2"
	Width = "4 * 45 + 8"
	Height = "1 * 94"
	Transparency = 90
	Background.ExtraPicture("8000")
	{
		Name = "noBack.png"
		Left = "-4"
		Width = "70"
	}
	Background.ExtraPicture("0800")
	{
		Name = "noBack.png"
		Left = "-4 + 45"
		Width = 70
	}
	Background.ExtraPicture("0080")
	{
		Name = "noBack.png"
		Left = "-4 + 2*45"
		Width = 70
	}
	Background.ExtraPicture("0008")
	{
		Name = "noBack.png"
		Left = "-4 + 3*45"
		Width = 70
	}
'	Visible = False 
}
Layers.Add("noDigit")
{
	Left = "(width - (4 * 45 + 8))/2"
	Top = "(height - 94 * 1)/2"
	Width = "4 * 45 + 8"
	Height = "1 * 94"
	Background.ExtraPicture("8000")
	{
		Name = "no0.png"
		Left = "-4"
		Width = "70"
	}
	Background.ExtraPicture("0800")
	{
		Name = "no0.png"
		Left = "-4 + 45"
		Width = 70
	}
	Background.ExtraPicture("0080")
	{
		Name = "no0.png"
		Left = "-4 + 2*45"
		Width = 70
	}
	Background.ExtraPicture("0008")
	{
		Name = "no0.png"
		Left = "-4 + 3*45"
		Width = 70
	}
}
LayerOfValue = Me.Layers("noDigit").Index
Value = 1347
EndUpdate
17:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\speedmeter.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle MouseWheel(Delta)
{
	Value = Me.FormatABC("value + B", Me.Value, Delta)
}

handle Change(Layer)
{
	Me.Layers("arc").Clip.Value = Me.Layers("pointer").RotateAngle
}

BeginUpdate
DefaultLayer(18) = "width MAX height" ' exDefLayerWidth(18)
DefaultLayer(19) = "width MAX height" ' exDefLayerHeight(19)
AllowSmoothChange = 0 ' exSmoothChangeless(0)
HTMLPicture("noArcBack.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed\noArcBack.png"
HTMLPicture("noArc.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed\noArc.png"
HTMLPicture("noCap.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed\noCap.png"
HTMLPicture("noLine.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed\noLine.png"
Layers.Clear()
Layers.Add("arcBack")
{
	Background.Picture.Name = "noArcBack.png"
	Left = -2
	Clip.Pie
	{
		StartAngle = 240
		SweepAngle = 240
	}
}
Layers.Add("arc")
{
	Left = -2
	Background.Picture.Name = "noArc.png"
	Clip.Pie
	{
		StartAngle = 240
		SweepAngle = "value"
	}
}
Layers.Add("noCap")
{
	Background.Picture.Name = "noCap.png"
	Transparency = 45
}
Layers.Add("pointer")
{
	Left = -2
	RotateType = 2 ' exRotateBilinearInterpolation(2)
	Background.Picture.Name = "noLine.png"
	DefaultRotateAngle = 240
	RotateAngleToValue = "value/240 * 100"
	ValueToRotateAngle = "value / 100 * 240"
	RotateAngleValid = "value > 240 ? (value > 300 ? 0 : 240) : value"
	OnDrag = 2 ' exDoRotate(2)
}
LayerOfValue = Me.Layers("pointer").Index
Value = 25
EndUpdate
18:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\speedmeter.letter.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle MouseWheel(Delta)
{
	Value = Me.FormatABC("value + B", Me.Value, Delta)
}

handle Change(Layer)
{
	Me.Layers("arc").Clip.Value = Me.Layers("pointer").RotateAngle
	Me.Layers("noDigit").Background.ExtraPicture("80").Name = Me.FormatABC("`no` + int((value MIN 0 MAX 99)/10) + `.png`", Me.Value )	
	Me.Layers("noDigit").Background.ExtraPicture("08").Name = Me.FormatABC("`no` + int((value MIN 0 MAX 99) mod 10) + `.png`", Me.Value )	
}

BeginUpdate
DefaultLayer(18) = "width MAX height" ' exDefLayerWidth(18)
DefaultLayer(19) = "width MAX height" ' exDefLayerHeight(19)
AllowSmoothChange = 0 ' exSmoothChangeless(0)
HTMLPicture("noArcBack.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed\noArcBack.png"
HTMLPicture("noArc.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed\noArc.png"
HTMLPicture("noCap.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed\noCap.png"
HTMLPicture("noLine.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Led\Speed\noLine.png"
HTMLPicture("noBack.png") = "E:\Exontrol\ExGauge\design\Led\Speed\noBack.png"
HTMLPicture("no0.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no0.png"
HTMLPicture("no1.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no1.png"
HTMLPicture("no2.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no2.png"
HTMLPicture("no3.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no3.png"
HTMLPicture("no4.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no4.png"
HTMLPicture("no5.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no5.png"
HTMLPicture("no6.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no6.png"
HTMLPicture("no7.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no7.png"
HTMLPicture("no8.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no8.png"
HTMLPicture("no9.png") = "E:\Exontrol\ExGauge\design\Led\Speed\no9.png"
Layers.Clear()
Layers.Add("arcBack")
{
	Background.Picture.Name = "noArcBack.png"
	Left = -2
	Clip.Pie
	{
		StartAngle = 240
		SweepAngle = 240
	}
}
Layers.Add("arc")
{
	Left = -2
	Background.Picture.Name = "noArc.png"
	Clip.Pie
	{
		StartAngle = 240
		SweepAngle = "value"
	}
}
Layers.Add("noCap")
{
	Background.Picture.Name = "noCap.png"
	Transparency = 45
}
Layers.Add("noBack")
{
	Left = "(width - 55 * 2)/2"
	Top = "(height - 94 * 1)/2"
	Width = "2 * 45 + 8"
	Height = "1 * 94"
	Transparency = 90
	Background.ExtraPicture("80")
	{
		Name = "noBack.png"
		Left = "-4"
		Width = "70"
	}
	Background.ExtraPicture("08")
	{
		Name = "noBack.png"
		Left = "36"
		Width = 70
	}
'	Visible = False 
}
Layers.Add("noDigit")
{
	Left = "(width - 55 * 2)/2"
	Top = "(height - 94 * 1)/2"
	Width = "2 * 45 + 8"
	Height = "1 * 94"
	Background.ExtraPicture("80")
	{
		Name = "no0.png"
		Left = "-4"
		Width = "70"
	}
	Background.ExtraPicture("08")
	{
		Name = "no0.png"
		Left = "36"
		Width = 70
	}
}
Layers.Add("pointer")
{
	Left = -2
	RotateType = 2 ' exRotateBilinearInterpolation(2)
	Background.Picture.Name = "noLine.png"
	DefaultRotateAngle = 240
	RotateAngleToValue = "value/240 * 100"
	ValueToRotateAngle = "value / 100 * 240"
	RotateAngleValid = "value > 240 ? (value > 300 ? 0 : 240) : value"
	OnDrag = 2 ' exDoRotate(2)
}
LayerOfValue = Me.Layers("pointer").Index
Value = 25
EndUpdate
19:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\switch.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle DragEnd(DragInfo,Cancel)
{
	Value = Me.FormatABC("(value < 24 ? 0 : 1)", Me.Layers("knob").OffsetX)
}

handle MouseWheel(Delta)
{
	Value = Me.FormatABC("value > 0 ? 1 : 0", Delta)
}

handle Click()
{
	Value = Me.FormatABC("(value + 1) mod 2", Value)
}

BeginUpdate
HTMLPicture("background.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Switch\background.png"
HTMLPicture("Indicator_ON.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Switch\Indicator_ON.png"
HTMLPicture("Indicator_OFF.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Switch\Indicator_OFF.png"
HTMLPicture("knob.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Switch\knob.png"
Layers.Clear
Layers.Add("back").Background.Picture.Name = "background.png"
Layers.Add("on")
{
	Background.Picture
	{
		Name = "Indicator_ON.png"
		DisplayAs = 16 ' MiddleLeft(16)
	}
	OffsetXValid = 48
	OffsetYValid = 0
}
Layers.Add("off")
{
	Background.Picture
	{
		Name = "Indicator_OFF.png"
		DisplayAs = 18 ' MiddleRight(18)
	}
	OffsetXValid = -12
	OffsetYValid = 0
}
Layers.Add("knob")
{
	OnDrag = 1 ' exDoMove(1)
	Background.Picture
	{	
		Name = "knob.png"
		DisplayAs = 17 ' MiddleCenter(17)
	}
	DefaultOffsetY = "9"
	DefaultOffsetX = "-5"
	OffsetYValid = "0"
	ValueToOffsetX = "value = 0 ? 0 : 48"
	OffsetToValue = "value = 0 ? 0 : 1"
	OffsetXValid = "(value MIN 0 MAX 48)"
'	OffsetXValid = "(value < 24 ? 0 : 48)"
}
LayerOfValue = Me.Layers("knob").Index
Value = 1
EndUpdate
20:

Save the file, and call the AttachTemplate method as follows:
Gauge1.AttachTemplate("D:\Program Files\Exontrol\ExGauge\Sample\Template\indicator.exgauge.txt")
The AttachTemplate method changes the visual appearance and the behavior of the component as shown in the preview. The Template parameter of the AttachTemplate method can be a string ( that indicates the x-script code or a path to a file that includes the x-script code ) or a safe array of bytes ( that encodes the x-script code ).

handle MouseWheel(Delta)
{
	Value = Me.FormatABC("(value + B) MIN 0 MAX 100", Value, Delta)
}

handle Change(Layer)
{
	Value = FormatABC("value MIN 0 MAX 100",Value)
	Layers(1).Clip.Value = Me.Value
}

BeginUpdate
HTMLPicture("Background.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Indicator\Background.png"
HTMLPicture("Green_Lights.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Indicator\Green_Lights.png"
HTMLPicture("overlay_top_layer.png") = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Linear\Indicator\overlay_top_layer.png"
Layers.Clear()
Layers.Add("back").Background.Picture.Name = "Background.png"
Layers.Add("light")
{
	Background.Picture.Name = "Green_Lights.png"
	Clip
	{
		Rectangle
		{
			Height = "(100 - value)/100 * height"
			InverseClip = True 
		}
	}
}
Layers.Add("front")
{
	Visible = False 
	Background.Picture.Name = "overlay_top_layer.png"
}
LayerOfValue = Layers("light").Index
Value = 50
EndUpdate