Click here to Skip to main content
15,900,461 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Is there any predefined property by which I can set the DisplayFormat/DisplayStyle of a textbox? Suppose I want a textbox to hold the actual value 888888888888.88 and show it formatted as 888,888,888,888.88. In short it should hold 'Double' data type value and show it with thousand separators and decimal places upto two digits. If text is cleared from the textbox, it should have 0 as value and 0.00 as displayed value. Also the number of digits in the textbox may vary accordingly. So how can it be done? Please help. Regards.
Posted

 
Share this answer
 
Write you own custom control that inherits from the standard TextBox and make it work as you need. This[^] and This[^] should help you to get started.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900