キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

numeric in table

Hello,
I want to use a table in LV which allows only to insert numeric values.
does anyone know a solution

markus
0 件の賞賛
メッセージ1/13
4,906件の閲覧回数
Hi Markus
 
I think this is what you are looking for.
 
Oops - I just saw that you just want to type in numbers. So you either could use the array as mentioned in the next message or you change the boolean flags in the case structure of my vi, so that just numbers are accepted.
 
Thomas

Message Edited by becktho on 03-21-2006 02:02 PM

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 件の賞賛
メッセージ2/13
4,893件の閲覧回数
Hi Marcus:

You can build a 2D numeric Array.

If you want to show a table, instead of an array, you can check the values on change event. The user shall insert no-numeric values, but as in the event you have the previous value (with only numeric), you can set that value again

Hope it helps,
Aitortxo.
0 件の賞賛
メッセージ3/13
4,891件の閲覧回数
Hello Markus,

I think it depends more on your application than on anything else...

Maybe a 2D array would do the job, or image something like a numeric control and a clickable button "add ta table", or maybe a programatic control that would remove any character wich not a number (to do this a match pattern with some "[0-9]" should work...)

Sorry I was just brain storming.... I hope this quick reflection will bright your light !

WOW... when I saw the thread there was no answer... and by the time I finished my post... 2 answer... We have a very reactive community here スマイリー ハッピー

Message Edité par TiTou le 03-21-2006 02:05 PM


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 件の賞賛
メッセージ4/13
4,889件の閲覧回数
If you want to use a table or listbox, you are going to have to convert the numerics to a string.  Or you can create a "table" using an array, and then you could use numerics.

It is nto hard to convert from a numeric to a string using the different format string vi's.  It is not too hard to implement some error checking either to make sure that the user actually entered a number instead of something else.

Kenny
Kenny

0 件の賞賛
メッセージ5/13
4,884件の閲覧回数
thanks for this answers,
but I think it won't help me.

In my application there will be a database with different types like numeric,string,... .
So i want to ban wrong characters in the table.
another point is that it is not allowed to write a value two lines after the last line.

i hope anyone has an idea.

markus
0 件の賞賛
メッセージ6/13
4,878件の閲覧回数

Hi Markus

If you have a look at the vi I attached, you can see that I used filter events (those containing a "?"). Using these, you can check the data in every way you want to and discard the event or accept it.

I think this is the way you should follow.

Thomas

Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 件の賞賛
メッセージ7/13
4,867件の閲覧回数
Hello Thomas,

I can't find your attached VI.

Markus
0 件の賞賛
メッセージ8/13
4,846件の閲覧回数
Hello Thomas,

if you mean your vi attached before it won't work right.

if i press a character for a second or two the character is filled in.

markus
0 件の賞賛
メッセージ9/13
4,845件の閲覧回数
Hi Markus
 
As I said - I made it work the wrong way. Characters are accepted and numbers are omitted. But you can get the idea out of it.
 
Thomas
Using LV8.0
--------------------------------------------------------------------
Don't be afraid to rate a good answer... 😉
--------------------------------------------------------------------
0 件の賞賛
メッセージ10/13
4,842件の閲覧回数