API Documentation > CorelDRAW > 2025-v26 > Dimension > IVGDimension
Dimension.LeadingZero property
Specifies whether a leading zero should be shown for fractional numbers
Syntax:
Property Get LeadingZero() As Boolean
Property Let LeadingZero(ByVal Value As Boolean)
Remarks:
The LeadingZero property specifies whether a text value displays a leading zero for numbers that are less than 1.0 and for which a decimal format is used. The default value is False.
Examples:
The following VBA example creates a rectangle and a linear dimension that is linked to the rectangle's snap points. The dimension value is displayed in decimal format with a leading zero, if necessary.
Sub Test()
Dim shp1 As Shape, shp2 As Shape
Set shp1 = ActiveLayer.CreateRectangle2(0, 0, 5, 2.5)
Set shp2 = ActiveLayer.CreateLinearDimension(cdrDimensionHorizontal, shp1.SnapPoints(1), shp1.SnapPoints(3))
shp2.Dimension.Linear.Style = cdrDimensionStyleDecimal
shp2.Dimension.LeadingZero = True 
End Sub