Articles in this section
Category / Section

How to set different forecolor for positive and negative numbers in WinForms DoubleTextBox?

1 min read

Foreground color

Double TextBox allows us to specify fore colors through PositiveColor and NegativeColor properties.

C#

this.doubleTextBox1.PositiveColor = System.Drawing.Color.MediumSpringGreen;
this.doubleTextBox1.NegativeColor =System.Drawing.Color.Blue;

 

VB

Private Me.doubleTextBox1.PositiveColor = System.Drawing.Color.MediumSpringGreen
Private Me.doubleTextBox1.NegativeColor =System.Drawing.Color.Blue

Page

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Please sign in to leave a comment
Access denied
Access denied