How to notify the WinForms LinearGauge pointer value?
Notify the LinearGauge pointer value
You can display the pointer value at the top middle of the WinForms LinearGauge by placing the label and assigning the Gauge value to it.
C#
private void trackBarEx1_ValueChanged(object sender, EventArgs e) { //Changes the LinearGauge value according to the value of the TrackBarEx. this.linearGauge1.Value = this.trackBarEx1.Value; } private void linearGauge1_ValueChanged(object sender, EventArgs e) { //Assigns the LinearGauge value to the label. this.label1.Text = this.linearGauge1.Value.ToString(); }
VB
Private Sub trackBarEx1_ValueChanged(ByVal sender As Object, ByVal e As EventArgs) Handles trackBarEx1.ValueChanged 'Changes the LinearGauge value according to the value of the TrackBarEx. Me.linearGauge1.Value = Me.trackBarEx1.Value End Sub Private Sub linearGauge1_ValueChanged(ByVal sender As Object, ByVal e As EventArgs) Handles linearGauge1.ValueChanged 'Assigns the LinearGauge value to the label. Me.label1.Text = Me.linearGauge1.Value.ToString() End Sub
The values can be displayed in the LinearGauge and specified by using the “Minimumvalue” and “MaximumValue” properties. The data type is float.
Figure 1: Pointer value at top middle of the LinearGauge
Samples:
C#: LinearGauge_LabelPlacement_C#
VB: LinearGauge_LabelPlacement_VB
Reference link: https://help.syncfusion.com/windowsforms/radial-gauge/linear-gauge
Conclusion
I hope you enjoyed learning how to notify the WinForms LinearGauge pointer value.
Refer to our WinForms LinearGauge’s feature tour page for its other groundbreaking feature representations. You can also explore our WinForms LinearGauge documentation to understand how to present and manipulate data.
For current customers, check out our WinForms components from the License and Downloads page. If you are new to Syncfusion, try our 30-day free trial to check out our WinForms LinearGauge and other WinForms components.
Please let us know in the following comment section if you have any queries or require clarifications. Contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!