How can I check if a user inserted value in a TextBox is a float value as I'm expecting. Thank you.
This is a discussion on Check if user inserted value in a TextBox is a float within the Windows Programming forums, part of the Platform Specific Boards category; How can I check if a user inserted value in a TextBox is a float value as I'm expecting. Thank ...
How can I check if a user inserted value in a TextBox is a float value as I'm expecting. Thank you.
* Debian 6.0.1 on Intel Core 2 DUO E6550 @ 2.33 GHz with 2 GB RAM.
* lighttpd, php5, perl, eruby, python.
* geany, XHTML & CSS & JavaScript, C, C++.
* GTK+ C & perl-gtk2
Thank for your replys. I'm programming in C++. The IDE is M. Visual Studio .NET 2008
Joelito, do you suggest me to parse all the text inside the textbox and check if each character is a digit or the decimal character ("." or "," - depending on my Windows configurations)? I could only accept one decimal character. There is no other solution? Thanks. Joao
My IDE is Microsoft Visual Studio .NET and I'm programming in C++.
I have solved my problem, as you can see below:
Code:using namespace System; bool good_parsing = Double::TryParse(TextBox->Text, my_double_result_value);