LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sloppy text ... in numeric control

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?

 

control snip.png

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 1 of 9
(2,683 Views)

This is a silver control, do you want to go back to modern, system or classic?    Maybe adding the index will help.

-------
Mark Ramsdale
-------
0 Kudos
Message 2 of 9
(2,677 Views)

duplicate

 

-------
Mark Ramsdale
-------
0 Kudos
Message 3 of 9
(2,677 Views)

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 4 of 9
(2,670 Views)

@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.

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 5 of 9
(2,664 Views)

@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).


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 6 of 9
(2,653 Views)

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).

 

 

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
Message 7 of 9
(2,620 Views)

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

Message 8 of 9
(2,612 Views)

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.

Paul Falkenstein
Coleman Technologies Inc.
CLA, CPI, AIA-Vision
Labview 4.0- 2013, RT, Vision, FPGA
0 Kudos
Message 9 of 9
(2,578 Views)