When set to -1, the control will use the default padding.
Private Sub GetTextPaddingInfo() Dim info As String = String.Empty ' See if the TextPadding property has been explicitly set if it hasn't, it will ' be set to the special "use default" setting, which is -1. info += "The text padding height is currently set to " If (Me.ultraCalendarCombo1.TextPadding.Height = -1) Then info += "the default value, " End If info += Me.ultraCalendarCombo1.TextPaddingResolved.Height.ToString() + vbCrLf info += "The text padding width is currently set to " If (Me.ultraCalendarCombo1.TextPadding.Width = -1) Then info += "the default value, " End If info += Me.ultraCalendarCombo1.TextPaddingResolved.Width.ToString() + vbCrLf MessageBox.Show(info, "GetTextPaddingInfo", MessageBoxButtons.OK) End Sub
private void GetTextPaddingInfo() { string info = string.Empty; // See if the TextPadding property has been explicitly set; if it hasn't, it will // be set to the special "use default" setting, which is -1. info += "The text padding height is currently set to "; if ( this.ultraCalendarCombo1.TextPadding.Height == -1 ) info += "the default value, "; info += this.ultraCalendarCombo1.TextPaddingResolved.Height.ToString() + "\n"; info += "The text padding width is currently set to "; if ( this.ultraCalendarCombo1.TextPadding.Width == -1 ) info += "the default value, "; info += this.ultraCalendarCombo1.TextPaddingResolved.Width.ToString() + "\n"; MessageBox.Show( info, "GetTextPaddingInfo", MessageBoxButtons.OK ); }
Target Platforms: Windows 10, Windows 8.1, Windows 8, Windows 7, Windows Server 2012, Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2