12-12-2013 12:10 PM - edited 12-12-2013 12:12 PM
How do I get leading zeros displayed in a RadixNumericTextBox when using a Hexadecimal RadixBase in Visual Studio 2010, C# and Measurement Studio 2012?
Solved! Go to Solution.
12-12-2013 02:23 PM
Besides the RadixBase property, there is no member available on RadixNumericTextBox to customize the display of the formatted value. However, you can override the FormatValue method to provide custom formatting logic:
public class CustomRadixNumericTextBox : RadixNumericTextBoxInt32 {
protected override string FormatValue( int value ) {
string formatted = base.FormatValue( value );
return formatted.PadLeft( 8, '0' );
}
}