NEW: Liberation of LGauges source code in the post #35
The purpose of the library LGauges, is simply to show gauges for measurement.
Attention: you need to load the library Base64Image, to use LGauges
LGauges
Author: Vampirbcn
Version: 2.0
LGauges
Methods:
Image examples:
Example code:
-. Sorry for my bad English. -
The purpose of the library LGauges, is simply to show gauges for measurement.
Attention: you need to load the library Base64Image, to use LGauges
LGauges
Author: Vampirbcn
Version: 2.0
LGauges
Methods:
Initialize (thepanel As Panel, x As Int, y As Int)
-Initialize the object
SelectGauge(model as int)
-Select gauge dessign
SetTBorder(Thickness As Int)
-Set the gauge border width
SetSize(Thesize As Int)
-Set the gauge size
ActivateBorderAutoColor(activate as boolean)
-Enable or disable the automatic generation of color on the border
SetBorderColor(Thecolor As Int)
-Set the fixed border color
SetHandColor(Thecolor As Int)
-Set the hand color
SetValuesColor(Thecolor As Int)
-Set the color of values of gauge
SetFirstValue(value As Int)
-Set the first number of the displayed values
SetLastValue(value As Int)
-Set the last number of the displayed values
ChangeValue(value As Int)
-Change the value represented by the hand
-Initialize the object
SelectGauge(model as int)
-Select gauge dessign
SetTBorder(Thickness As Int)
-Set the gauge border width
SetSize(Thesize As Int)
-Set the gauge size
ActivateBorderAutoColor(activate as boolean)
-Enable or disable the automatic generation of color on the border
SetBorderColor(Thecolor As Int)
-Set the fixed border color
SetHandColor(Thecolor As Int)
-Set the hand color
SetValuesColor(Thecolor As Int)
-Set the color of values of gauge
SetFirstValue(value As Int)
-Set the first number of the displayed values
SetLastValue(value As Int)
-Set the last number of the displayed values
ChangeValue(value As Int)
-Change the value represented by the hand
Image examples:
Example code:
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim thegauge As LGauges
Dim Panel1 As Panel
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("Main")
thegauge.Initialize(Panel1,40,40)
thegauge.SelectGauge(1)
End Sub
-. Sorry for my bad English. -
Attachments
Last edited: