10-15-2012 01:35 PM
Our software validation folks are banging on my latest app. One of them went to a numeric control and tried to input text. He said it's"weird". I think it looks like garbage. I have never noticed this before. Any way I can get rid of it?
10-15-2012 01:44 PM
This is a silver control, do you want to go back to modern, system or classic? Maybe adding the index will help.
10-15-2012 01:44 PM - edited 10-15-2012 01:46 PM
duplicate
10-15-2012 01:52 PM
Yep, you can type anything into a numeric control (silver, modern, classic, and system). But when you hit enter or click out, it goes to 0. I don't know of any way to get rid of this.
10-15-2012 02:08 PM
@crossrulz wrote:
Yep, you can type anything into a numeric control (silver, modern, classic, and system). But when you hit enter or click out, it goes to 0. I don't know of any way to get rid of this.
No, you can't type "anything". Some of it appears in the control and some of it doesn't. It looks like garbage.
10-15-2012 02:29 PM
@PaulG. wrote:
@crossrulz wrote:
Yep, you can type anything into a numeric control (silver, modern, classic, and system). But when you hit enter or click out, it goes to 0. I don't know of any way to get rid of this.
No, you can't type "anything". Some of it appears in the control and some of it doesn't. It looks like garbage.
Sorry, any alpha, numeric, plus, minus, period, and/or space.
Probably has something to do with being able to handle all of the formats (hex, exponential, decimal).
10-15-2012 04:15 PM
the numeric allows any valid althanumeric that has a meaining to numbers such as a-f for hex, e, k as in 1k = 1000, it is a very complex solution to a numeric control.
You coulkd handle the key down? events and filter out any key events you dont want but it is most likelyt not worth it (from a cost benifit stand point).
10-15-2012 04:40 PM
PaulG,
Maybe you can try doing some validation in software. If something gets typed into the control which does not translate to a "reasonable" numeric value for the situation, then write a zero or the previous valid value to a local variable. Or pop up a dialog box which says "Only validation testers would try something like this!"
Lynn
10-16-2012 07:09 AM
If you are really motivated and this is a real problem, I would make an x control that filtera all except +,- 0-9 and . (also must allow delete and return). You can have this xControl tested and validated seperatly then replace the numerics with the new xcontrol. Again, check the cost benifits since this does have some effort involved.