Category / Section
How to reduce the size of the DigitalGauge below its MinimumSize?
1 min read
You can reduce the size of the DigitalGauge by specifying the required size as the Minimum size of the DigitalGauge. The DigitalGauge is initialized with the minimum size, by default.
The following code example demonstrates the same.
C#
//Initializes the MinimumSize of the Digital Gauge. this.digitalGauge1.MinimumSize = new Size(0, 0); //Sets the required size of the Digital Gauge. this.digitalGauge1.Size = new Size((int)this.integerTextBox1.IntegerValue, (int)this.integerTextBox2.IntegerValue);
VB
'Initializes the MinimumSize of the Digital Gauge. Me.digitalGauge1.MinimumSize = New Size(0, 0) 'Sets the required size of the Digital Gauge. Me.digitalGauge1.Size = New Size(CInt(Fix(Me.integerTextBox1.IntegerValue)), CInt(Fix(Me.integerTextBox2.IntegerValue)))
Note:
The “MinimumSize” property helps you to specify the lower limit of the Digital Gauge.
Figure 1: Digital Gauge with size specified
Figure 2: Digital Gauge specified with Default Size
Figure 3: Digital Gauge with Minimum size specified