B4A Library [B4X] [XUI] Gauge View

Erel

Administrator
Staff member
Licensed User
Custom views classes are not views by themselves.

Make those changes in the class:
1. Make mBase a public variable - line 21.
2. Add this line to DesignerCreateView after mBase is set:
B4X:
mBase.Tag = Me
Now you can get reference to the gauge class like this:
B4X:
Dim objGague As Gauge = p.GetView(0).Tag
 

Alberto Iglesias

Well-Known Member
Licensed User
Custom views classes are not views by themselves.

Make those changes in the class:
1. Make mBase a public variable - line 21.
2. Add this line to DesignerCreateView after mBase is set:
B4X:
mBase.Tag = Me
Now you can get reference to the gauge class like this:
B4X:
Dim objGague As Gauge = p.GetView(0).Tag
Works like a charm! thanks @Erel
 

foretek

Member
Licensed User
Some gauges require the warning(orange) and alarm (red) at low end area . e.g. fuel tank.. can this indication be customizable?
 

themr23

Member
Licensed User
I combined this with (an offsetted) radial gradient to get a highlighted edge effect.
Incomplete project, so a few details left to adjust.
1586204469792.png
 
Last edited:
Top