Entering a number in a field with an existing number.

Kenneth Brody kenbrody at bestweb.net
Fri Oct 26 12:18:29 PDT 2007


Quoting Bob @ MidCity Office (Fri, 26 Oct 2007 14:37:38 -0400):

> Hi
>
> I 'm working on an instance where you may want to change a number in a field
> that already has a number in it.
[...]
> This works fine, however, I would like to trap each number until the user
> presses ENTER on top of the existing, or ahead if the right justified number
> didn't completely fill the field, without using an INPUT function. ex: If I
> entered 223 in a 6 character right justified field that already had 123, I
> would like the results to be 223 and not 223123.
[...]

 From the sound of it, what you're really looking for is a way to avoid
having to blank out the remnants of the old value if they enter a new
value which overlaps it.  Is that correct?

What about something like this?  (Assuming field 9 in this case.)

==========
@wef9::gosub DoNums ; end:
DoNums::show (@ro, at co) "":
again::cursor on ; xx = waitkey ; cursor default:
:( xx ge "0" and xx le "9" ) or xx = "-":pushkey "[CLEF]" & xx ; return:
:xx ne "":goto again:
::pushkey "[" & @SK & "]":
::return:
==========

-- 
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list