10-24-2011 01:36 PM
I am in the process of writing a driver for some hardware and I am not sure how to do something.
There is a timing parameter that can a adjust a couple of different things, and the format of the string commnd looks like RDVALXXXXYY.
The string is build with 3 user controls, one is a menu ring that picks the "RDVAL" out of a list, the next one is a number control that has to be 4 digits long (no more, no less) and the last one is another number control that needs to be 2 digits long, no more, no less.
I could just make instructions that describes the fact that the numbers have to be a certain length, but I need a way to require the numerical control to only accept a 4 digit number (and a 2 digit number in the other case).
Solved! Go to Solution.
10-24-2011 01:53 PM - edited 10-24-2011 01:55 PM
10-24-2011 01:55 PM
Thanks for the tip, will that prevent it from being more than 4 digits though? That looks like it only prevents it from being under 4 digits.
10-24-2011 01:55 PM
woops my bad, the rest of your post must not have loaded when I posted a reply.
10-24-2011 02:02 PM
10-25-2011 09:34 AM
Hmmm, the max number has me a little confused. If I don't want it to be more than 4 digits, shouldn't it be 9999? Unless I am misunderstanding what the "max value" is...
10-25-2011 09:39 AM
Do you want a 4 digit decimal string or a 4 digit hexadecimal string? All the earlier posts were working in hexadecimal. The max 4digit value would be FFFF which is 65535. For a max 4 digit value in decimal, then it would be 9999.