Type | Description | |||
String | A String expression that defines the layer's HTML tooltip that's displayed when the cursor hovers the layer. |
The following screen shot shows the current value as a tooltip :
The ToolTip supports the following built-in HTML format:
Newer HTML format supports decorative text like follows:
or "<font ;31><sha 404040;5;0><fgcolor=FFFFFF>outline anti-aliasing</fgcolor></sha></font>" gets:
The following samples display the current value, when cursor hover the know:
VBA (MS Access, Excell...)
' MouseIn event - Notifies that the cursor enters the layer. Private Sub Gauge1_MouseIn(ByVal Layer As Long) With Gauge1 .Layers.Item(9).ToolTip = Gauge1.FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",Gauge1.Value) End With End Sub With Gauge1 .BeginUpdate .PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob" .PicturesName = "`Layer` + str(value + 1) + `.png`" .Layers.Count = 10 With .Layers.Item(9) .DefaultRotateAngle = -126 .OnDrag = 3 .RotateAngleToValue = "100 - value / 360 * 100" .ValueToRotateAngle = "(value)/100 * 360" End With .Layers.Item(3).Visible = False .Layers.Item(4).Visible = False .Layers.Item(9).Value = 25 .EndUpdate End With
VB6
' MouseIn event - Notifies that the cursor enters the layer. Private Sub Gauge1_MouseIn(ByVal Layer As Long) With Gauge1 .Layers.Item(9).ToolTip = Gauge1.FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",Gauge1.Value) End With End Sub With Gauge1 .BeginUpdate .PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob" .PicturesName = "`Layer` + str(value + 1) + `.png`" .Layers.Count = 10 With .Layers.Item(9) .DefaultRotateAngle = -126 .OnDrag = exDoRotamove .RotateAngleToValue = "100 - value / 360 * 100" .ValueToRotateAngle = "(value)/100 * 360" End With .Layers.Item(3).Visible = False .Layers.Item(4).Visible = False .Layers.Item(9).Value = 25 .EndUpdate End With
VB.NET
' MouseIn event - Notifies that the cursor enters the layer. Private Sub Exgauge1_MouseIn(ByVal sender As System.Object,ByVal Layer As Integer) Handles Exgauge1.MouseIn With Exgauge1 .Layers.Item(9).ToolTip = Exgauge1.FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",Exgauge1.Value) End With End Sub With Exgauge1 .BeginUpdate() .PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob" .PicturesName = "`Layer` + str(value + 1) + `.png`" .Layers.Count = 10 With .Layers.Item(9) .DefaultRotateAngle = -126 .OnDrag = exontrol.EXGAUGELib.OnDragLayerEnum.exDoRotamove .RotateAngleToValue = "100 - value / 360 * 100" .ValueToRotateAngle = "(value)/100 * 360" End With .Layers.Item(3).Visible = False .Layers.Item(4).Visible = False .Layers.Item(9).Value = 25 .EndUpdate() End With
VB.NET for /COM
' MouseIn event - Notifies that the cursor enters the layer. Private Sub AxGauge1_MouseIn(ByVal sender As System.Object, ByVal e As AxEXGAUGELib._IGaugeEvents_MouseInEvent) Handles AxGauge1.MouseIn With AxGauge1 .Layers.Item(9).ToolTip = AxGauge1.FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",AxGauge1.Value) End With End Sub With AxGauge1 .BeginUpdate() .PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob" .PicturesName = "`Layer` + str(value + 1) + `.png`" .Layers.Count = 10 With .Layers.Item(9) .DefaultRotateAngle = -126 .OnDrag = EXGAUGELib.OnDragLayerEnum.exDoRotamove .RotateAngleToValue = "100 - value / 360 * 100" .ValueToRotateAngle = "(value)/100 * 360" End With .Layers.Item(3).Visible = False .Layers.Item(4).Visible = False .Layers.Item(9).Value = 25 .EndUpdate() End With
C++
// MouseIn event - Notifies that the cursor enters the layer. void OnMouseInGauge1(long Layer) { /* 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->GetLayers()->GetItem(long(9))->PutToolTip(_bstr_t(spGauge1->FormatABC(L"`The current value is: <br><c><b>` + ((100 - A) format ``)",spGauge1->GetValue(),vtMissing,vtMissing))); } EXGAUGELib::IGaugePtr spGauge1 = GetDlgItem(IDC_GAUGE1)->GetControlUnknown(); spGauge1->BeginUpdate(); spGauge1->PutPicturesPath(L"C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob"); spGauge1->PutPicturesName(L"`Layer` + str(value + 1) + `.png`"); spGauge1->GetLayers()->PutCount(10); EXGAUGELib::ILayerPtr var_Layer = spGauge1->GetLayers()->GetItem(long(9)); var_Layer->PutDefaultRotateAngle(-126); var_Layer->PutOnDrag(EXGAUGELib::exDoRotamove); var_Layer->PutRotateAngleToValue(L"100 - value / 360 * 100"); var_Layer->PutValueToRotateAngle(L"(value)/100 * 360"); spGauge1->GetLayers()->GetItem(long(3))->PutVisible(VARIANT_FALSE); spGauge1->GetLayers()->GetItem(long(4))->PutVisible(VARIANT_FALSE); spGauge1->GetLayers()->GetItem(long(9))->PutValue(long(25)); spGauge1->EndUpdate();
C++ Builder
// MouseIn event - Notifies that the cursor enters the layer. void __fastcall TForm1::Gauge1MouseIn(TObject *Sender,long Layer) { Gauge1->Layers->get_Item(TVariant(9))->ToolTip = PChar(Gauge1->FormatABC(L"`The current value is: <br><c><b>` + ((100 - A) format ``)",TVariant(Gauge1->get_Value()),TNoParam(),TNoParam())); } Gauge1->BeginUpdate(); Gauge1->PicturesPath = L"C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob"; Gauge1->PicturesName = L"`Layer` + str(value + 1) + `.png`"; Gauge1->Layers->Count = 10; Exgaugelib_tlb::ILayerPtr var_Layer = Gauge1->Layers->get_Item(TVariant(9)); var_Layer->DefaultRotateAngle = -126; var_Layer->OnDrag = Exgaugelib_tlb::OnDragLayerEnum::exDoRotamove; var_Layer->RotateAngleToValue = L"100 - value / 360 * 100"; var_Layer->ValueToRotateAngle = L"(value)/100 * 360"; Gauge1->Layers->get_Item(TVariant(3))->Visible = false; Gauge1->Layers->get_Item(TVariant(4))->Visible = false; Gauge1->Layers->get_Item(TVariant(9))->set_Value(TVariant(25)); Gauge1->EndUpdate();
C#
// MouseIn event - Notifies that the cursor enters the layer. private void exgauge1_MouseIn(object sender,int Layer) { exgauge1.Layers[9].ToolTip = exgauge1.FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",exgauge1.Value,null,null).ToString(); } //this.exgauge1.MouseIn += new exontrol.EXGAUGELib.exg2antt.MouseInEventHandler(this.exgauge1_MouseIn); exgauge1.BeginUpdate(); exgauge1.PicturesPath = "C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob"; exgauge1.PicturesName = "`Layer` + str(value + 1) + `.png`"; exgauge1.Layers.Count = 10; exontrol.EXGAUGELib.Layer var_Layer = exgauge1.Layers[9]; var_Layer.DefaultRotateAngle = -126; var_Layer.OnDrag = exontrol.EXGAUGELib.OnDragLayerEnum.exDoRotamove; var_Layer.RotateAngleToValue = "100 - value / 360 * 100"; var_Layer.ValueToRotateAngle = "(value)/100 * 360"; exgauge1.Layers[3].Visible = false; exgauge1.Layers[4].Visible = false; exgauge1.Layers[9].Value = 25; exgauge1.EndUpdate();
JScript/JavaScript
<BODY onload="Init()"> <SCRIPT FOR="Gauge1" EVENT="MouseIn(Layer)" LANGUAGE="JScript"> Gauge1.Layers.Item(9).ToolTip = Gauge1.FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",Gauge1.Value,null,null); </SCRIPT> <OBJECT CLASSID="clsid:91628F12-393C-44EF-A558-83ED1790AAD3" id="Gauge1"></OBJECT> <SCRIPT LANGUAGE="JScript"> function Init() { Gauge1.BeginUpdate(); Gauge1.PicturesPath = "C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob"; Gauge1.PicturesName = "`Layer` + str(value + 1) + `.png`"; Gauge1.Layers.Count = 10; var var_Layer = Gauge1.Layers.Item(9); var_Layer.DefaultRotateAngle = -126; var_Layer.OnDrag = 3; var_Layer.RotateAngleToValue = "100 - value / 360 * 100"; var_Layer.ValueToRotateAngle = "(value)/100 * 360"; Gauge1.Layers.Item(3).Visible = false; Gauge1.Layers.Item(4).Visible = false; Gauge1.Layers.Item(9).Value = 25; Gauge1.EndUpdate(); } </SCRIPT> </BODY>
VBScript
<BODY onload="Init()"> <SCRIPT LANGUAGE="VBScript"> Function Gauge1_MouseIn(Layer) With Gauge1 .Layers.Item(9).ToolTip = Gauge1.FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",Gauge1.Value) End With End Function </SCRIPT> <OBJECT CLASSID="clsid:91628F12-393C-44EF-A558-83ED1790AAD3" id="Gauge1"></OBJECT> <SCRIPT LANGUAGE="VBScript"> Function Init() With Gauge1 .BeginUpdate .PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob" .PicturesName = "`Layer` + str(value + 1) + `.png`" .Layers.Count = 10 With .Layers.Item(9) .DefaultRotateAngle = -126 .OnDrag = 3 .RotateAngleToValue = "100 - value / 360 * 100" .ValueToRotateAngle = "(value)/100 * 360" End With .Layers.Item(3).Visible = False .Layers.Item(4).Visible = False .Layers.Item(9).Value = 25 .EndUpdate End With End Function </SCRIPT> </BODY>
C# for /COM
// MouseIn event - Notifies that the cursor enters the layer. private void axGauge1_MouseIn(object sender, AxEXGAUGELib._IGaugeEvents_MouseInEvent e) { axGauge1.Layers[9].ToolTip = axGauge1.FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",axGauge1.Value,null,null).ToString(); } //this.axGauge1.MouseIn += new AxEXGAUGELib._IGaugeEvents_MouseInEventHandler(this.axGauge1_MouseIn); axGauge1.BeginUpdate(); axGauge1.PicturesPath = "C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob"; axGauge1.PicturesName = "`Layer` + str(value + 1) + `.png`"; axGauge1.Layers.Count = 10; EXGAUGELib.Layer var_Layer = axGauge1.Layers[9]; var_Layer.DefaultRotateAngle = -126; var_Layer.OnDrag = EXGAUGELib.OnDragLayerEnum.exDoRotamove; var_Layer.RotateAngleToValue = "100 - value / 360 * 100"; var_Layer.ValueToRotateAngle = "(value)/100 * 360"; axGauge1.Layers[3].Visible = false; axGauge1.Layers[4].Visible = false; axGauge1.Layers[9].Value = 25; axGauge1.EndUpdate();
X++ (Dynamics Ax 2009)
// MouseIn event - Notifies that the cursor enters the layer. void onEvent_MouseIn(int _Layer) { COM com_Layer; anytype var_Layer; ; var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer = var_Layer; com_Layer.ToolTip(exgauge1.FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",exgauge1.Value())); } public void init() { COM com_Layer,com_Layer1; anytype var_Layer,var_Layer1; ; super(); exgauge1.BeginUpdate(); exgauge1.PicturesPath("C:\\Program Files\\Exontrol\\ExGauge\\Sample\\Design\\Circular\\Knob"); exgauge1.PicturesName("`Layer` + str(value + 1) + `.png`"); exgauge1.Layers().Count(10); var_Layer = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer = var_Layer; com_Layer.DefaultRotateAngle(-126); com_Layer.OnDrag(3/*exDoRotamove*/); com_Layer.RotateAngleToValue("100 - value / 360 * 100"); com_Layer.ValueToRotateAngle("(value)/100 * 360"); var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(3)); com_Layer1 = var_Layer1; com_Layer1.Visible(false); var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(4)); com_Layer1 = var_Layer1; com_Layer1.Visible(false); var_Layer1 = COM::createFromObject(exgauge1.Layers()).Item(COMVariant::createFromInt(9)); com_Layer1 = var_Layer1; com_Layer1.Value(COMVariant::createFromInt(25)); exgauge1.EndUpdate(); }
Delphi 8 (.NET only)
// MouseIn event - Notifies that the cursor enters the layer. procedure TWinForm1.AxGauge1_MouseIn(sender: System.Object; e: AxEXGAUGELib._IGaugeEvents_MouseInEvent); begin with AxGauge1 do begin Layers.Item[TObject(9)].ToolTip := AxGauge1.FormatABC('`The current value is: <br><c><b>` + ((100 - A) format ``)',AxGauge1.Value,Nil,Nil); end end; with AxGauge1 do begin BeginUpdate(); PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob'; PicturesName := '`Layer` + str(value + 1) + `.png`'; Layers.Count := 10; with Layers.Item[TObject(9)] do begin DefaultRotateAngle := -126; OnDrag := EXGAUGELib.OnDragLayerEnum.exDoRotamove; RotateAngleToValue := '100 - value / 360 * 100'; ValueToRotateAngle := '(value)/100 * 360'; end; Layers.Item[TObject(3)].Visible := False; Layers.Item[TObject(4)].Visible := False; Layers.Item[TObject(9)].Value := TObject(25); EndUpdate(); end
Delphi (standard)
// MouseIn event - Notifies that the cursor enters the layer. procedure TForm1.Gauge1MouseIn(ASender: TObject; Layer : Integer); begin with Gauge1 do begin Layers.Item[OleVariant(9)].ToolTip := Gauge1.FormatABC('`The current value is: <br><c><b>` + ((100 - A) format ``)',Gauge1.Value,Null,Null); end end; with Gauge1 do begin BeginUpdate(); PicturesPath := 'C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob'; PicturesName := '`Layer` + str(value + 1) + `.png`'; Layers.Count := 10; with Layers.Item[OleVariant(9)] do begin DefaultRotateAngle := -126; OnDrag := EXGAUGELib_TLB.exDoRotamove; RotateAngleToValue := '100 - value / 360 * 100'; ValueToRotateAngle := '(value)/100 * 360'; end; Layers.Item[OleVariant(3)].Visible := False; Layers.Item[OleVariant(4)].Visible := False; Layers.Item[OleVariant(9)].Value := OleVariant(25); EndUpdate(); end
VFP
*** MouseIn event - Notifies that the cursor enters the layer. *** LPARAMETERS Layer with thisform.Gauge1 .Layers.Item(9).ToolTip = thisform.Gauge1.FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",thisform.Gauge1.Value) endwith with thisform.Gauge1 .BeginUpdate .PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob" .PicturesName = "`Layer` + str(value + 1) + `.png`" .Layers.Count = 10 with .Layers.Item(9) .DefaultRotateAngle = -126 .OnDrag = 3 .RotateAngleToValue = "100 - value / 360 * 100" .ValueToRotateAngle = "(value)/100 * 360" endwith .Layers.Item(3).Visible = .F. .Layers.Item(4).Visible = .F. .Layers.Item(9).Value = 25 .EndUpdate endwith
dBASE Plus
/* with (this.EXGAUGEACTIVEXCONTROL1.nativeObject) MouseIn = class::nativeObject_MouseIn endwith */ // Notifies that the cursor enters the layer. function nativeObject_MouseIn(Layer) oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject oGauge.Layers.Item(9).ToolTip = Str(oGauge.FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",oGauge.Value)) return local oGauge,var_Layer oGauge = form.EXGAUGEACTIVEXCONTROL1.nativeObject oGauge.BeginUpdate() oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob" oGauge.PicturesName = "`Layer` + str(value + 1) + `.png`" oGauge.Layers.Count = 10 var_Layer = oGauge.Layers.Item(9) var_Layer.DefaultRotateAngle = -126 var_Layer.OnDrag = 3 var_Layer.RotateAngleToValue = "100 - value / 360 * 100" var_Layer.ValueToRotateAngle = "(value)/100 * 360" oGauge.Layers.Item(3).Visible = false oGauge.Layers.Item(4).Visible = false oGauge.Layers.Item(9).Value = 25 oGauge.EndUpdate()
XBasic (Alpha Five)
' Notifies that the cursor enters the layer. function MouseIn as v (Layer as N) oGauge = topparent:CONTROL_ACTIVEX1.activex oGauge.Layers.Item(9).ToolTip = oGauge.FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",oGauge.Value) end function Dim oGauge as P Dim var_Layer as P oGauge = topparent:CONTROL_ACTIVEX1.activex oGauge.BeginUpdate() oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob" oGauge.PicturesName = "`Layer` + str(value + 1) + `.png`" oGauge.Layers.Count = 10 var_Layer = oGauge.Layers.Item(9) var_Layer.DefaultRotateAngle = -126 var_Layer.OnDrag = 3 var_Layer.RotateAngleToValue = "100 - value / 360 * 100" var_Layer.ValueToRotateAngle = "(value)/100 * 360" oGauge.Layers.Item(3).Visible = .f. oGauge.Layers.Item(4).Visible = .f. oGauge.Layers.Item(9).Value = 25 oGauge.EndUpdate()
Visual Objects
METHOD OCX_Exontrol1MouseIn(Layer) CLASS MainDialog // MouseIn event - Notifies that the cursor enters the layer. oDCOCX_Exontrol1:Layers:[Item,9]:ToolTip := AsString(oDCOCX_Exontrol1:FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",oDCOCX_Exontrol1:Value,nil,nil)) RETURN NIL local var_Layer as ILayer oDCOCX_Exontrol1:BeginUpdate() oDCOCX_Exontrol1:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob" oDCOCX_Exontrol1:PicturesName := "`Layer` + str(value + 1) + `.png`" oDCOCX_Exontrol1:Layers:Count := 10 var_Layer := oDCOCX_Exontrol1:Layers:[Item,9] var_Layer:DefaultRotateAngle := -126 var_Layer:OnDrag := exDoRotamove var_Layer:RotateAngleToValue := "100 - value / 360 * 100" var_Layer:ValueToRotateAngle := "(value)/100 * 360" oDCOCX_Exontrol1:Layers:[Item,3]:Visible := false oDCOCX_Exontrol1:Layers:[Item,4]:Visible := false oDCOCX_Exontrol1:Layers:[Item,9]:Value := 25 oDCOCX_Exontrol1:EndUpdate()
PowerBuilder
/*begin event MouseIn(long Layer) - Notifies that the cursor enters the layer.*/ /* oGauge = ole_1.Object oGauge.Layers.Item(9).ToolTip = String(oGauge.FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",oGauge.Value)) */ /*end event MouseIn*/ OleObject oGauge,var_Layer oGauge = ole_1.Object oGauge.BeginUpdate() oGauge.PicturesPath = "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob" oGauge.PicturesName = "`Layer` + str(value + 1) + `.png`" oGauge.Layers.Count = 10 var_Layer = oGauge.Layers.Item(9) var_Layer.DefaultRotateAngle = -126 var_Layer.OnDrag = 3 var_Layer.RotateAngleToValue = "100 - value / 360 * 100" var_Layer.ValueToRotateAngle = "(value)/100 * 360" oGauge.Layers.Item(3).Visible = false oGauge.Layers.Item(4).Visible = false oGauge.Layers.Item(9).Value = 25 oGauge.EndUpdate()
Visual DataFlex
// Notifies that the cursor enters the layer. Procedure OnComMouseIn Integer llLayer Forward Send OnComMouseIn llLayer Variant voLayers Get ComLayers to voLayers Handle hoLayers Get Create (RefClass(cComLayers)) to hoLayers Set pvComObject of hoLayers to voLayers Variant voLayer Get ComItem of hoLayers 9 to voLayer Handle hoLayer Get Create (RefClass(cComLayer)) to hoLayer Set pvComObject of hoLayer to voLayer Variant v Variant vA Get ComValue to vA Get ComFormatABC "`The current value is: <br><c><b>` + ((100 - A) format ``)" vA Nothing Nothing to v Set ComToolTip of hoLayer to v Send Destroy to hoLayer Send Destroy to hoLayers End_Procedure Procedure OnCreate Forward Send OnCreate Send ComBeginUpdate Set ComPicturesPath to "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob" Set ComPicturesName to "`Layer` + str(value + 1) + `.png`" Variant voLayers1 Get ComLayers to voLayers1 Handle hoLayers1 Get Create (RefClass(cComLayers)) to hoLayers1 Set pvComObject of hoLayers1 to voLayers1 Set ComCount of hoLayers1 to 10 Send Destroy to hoLayers1 Variant voLayers2 Get ComLayers to voLayers2 Handle hoLayers2 Get Create (RefClass(cComLayers)) to hoLayers2 Set pvComObject of hoLayers2 to voLayers2 Variant voLayer1 Get ComItem of hoLayers2 9 to voLayer1 Handle hoLayer1 Get Create (RefClass(cComLayer)) to hoLayer1 Set pvComObject of hoLayer1 to voLayer1 Set ComDefaultRotateAngle of hoLayer1 to -126 Set ComOnDrag of hoLayer1 to OLEexDoRotamove Set ComRotateAngleToValue of hoLayer1 to "100 - value / 360 * 100" Set ComValueToRotateAngle of hoLayer1 to "(value)/100 * 360" Send Destroy to hoLayer1 Send Destroy to hoLayers2 Variant voLayers3 Get ComLayers to voLayers3 Handle hoLayers3 Get Create (RefClass(cComLayers)) to hoLayers3 Set pvComObject of hoLayers3 to voLayers3 Variant voLayer2 Get ComItem of hoLayers3 3 to voLayer2 Handle hoLayer2 Get Create (RefClass(cComLayer)) to hoLayer2 Set pvComObject of hoLayer2 to voLayer2 Set ComVisible of hoLayer2 to False Send Destroy to hoLayer2 Send Destroy to hoLayers3 Variant voLayers4 Get ComLayers to voLayers4 Handle hoLayers4 Get Create (RefClass(cComLayers)) to hoLayers4 Set pvComObject of hoLayers4 to voLayers4 Variant voLayer3 Get ComItem of hoLayers4 4 to voLayer3 Handle hoLayer3 Get Create (RefClass(cComLayer)) to hoLayer3 Set pvComObject of hoLayer3 to voLayer3 Set ComVisible of hoLayer3 to False Send Destroy to hoLayer3 Send Destroy to hoLayers4 Variant voLayers5 Get ComLayers to voLayers5 Handle hoLayers5 Get Create (RefClass(cComLayers)) to hoLayers5 Set pvComObject of hoLayers5 to voLayers5 Variant voLayer4 Get ComItem of hoLayers5 9 to voLayer4 Handle hoLayer4 Get Create (RefClass(cComLayer)) to hoLayer4 Set pvComObject of hoLayer4 to voLayer4 Set ComValue of hoLayer4 to 25 Send Destroy to hoLayer4 Send Destroy to hoLayers5 Send ComEndUpdate End_Procedure
XBase++
PROCEDURE OnMouseIn(oGauge,Layer) oGauge:Layers:Item(9):ToolTip := Transform(oGauge:FormatABC("`The current value is: <br><c><b>` + ((100 - A) format ``)",oGauge:Value()),"") RETURN #include "AppEvent.ch" #include "ActiveX.ch" PROCEDURE Main LOCAL oForm LOCAL nEvent := 0, mp1 := NIL, mp2 := NIL, oXbp := NIL LOCAL oGauge LOCAL oLayer 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:MouseIn := {|Layer| OnMouseIn(oGauge,Layer)} /*Notifies that the cursor enters the layer.*/ oGauge:BeginUpdate() oGauge:PicturesPath := "C:\Program Files\Exontrol\ExGauge\Sample\Design\Circular\Knob" oGauge:PicturesName := "`Layer` + str(value + 1) + `.png`" oGauge:Layers():Count := 10 oLayer := oGauge:Layers:Item(9) oLayer:DefaultRotateAngle := -126 oLayer:OnDrag := 3/*exDoRotamove*/ oLayer:RotateAngleToValue := "100 - value / 360 * 100" oLayer:ValueToRotateAngle := "(value)/100 * 360" oGauge:Layers:Item(3):Visible := .F. oGauge:Layers:Item(4):Visible := .F. oGauge:Layers:Item(9):Value := 25 oGauge:EndUpdate() oForm:Show() DO WHILE nEvent != xbeP_Quit nEvent := AppEvent( @mp1, @mp2, @oXbp ) oXbp:handleEvent( nEvent, mp1, mp2 ) ENDDO RETURN