Integer/Decimal control in Windows Froms
-
Am I going mad? Is there a control just for integer or decimal values? I have a form that is purely based on "controls" for decimal that result in Un-Editable "controls" as decimal results. The thing that concerns me is the amount of casting/parsing I am doing. Taking a text entry, parsing to decimal, doing my math then parsing back to decimal again to show in the results box. There is the numeric up/down control. But can you remove the up/down part of it to use it as a purely numeric control? Much appreciated Tony
-
Am I going mad? Is there a control just for integer or decimal values? I have a form that is purely based on "controls" for decimal that result in Un-Editable "controls" as decimal results. The thing that concerns me is the amount of casting/parsing I am doing. Taking a text entry, parsing to decimal, doing my math then parsing back to decimal again to show in the results box. There is the numeric up/down control. But can you remove the up/down part of it to use it as a purely numeric control? Much appreciated Tony
No, you can't. You can create a text box derived class that only accepts numbers and encapsulates the parsing, that's as good as it gets.
Christian Graus - Microsoft MVP - C++ Metal Musings - Rex and my new metal blog "I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )