Want more information ?. Try the
Web
Home Page for this document.
PSPNum Keystrokes
This section discusses what you can key into the PSPNum edit box. We
have spent a great deal of time refining keystroke processing with users of our
Java and VBX/OCX PSPNum versions. The result, we sincerely hope, is intuitive
and productive. We welcome any further suggestions in this area.
Your keystrokes are processed according to the following rules:
Moving the caret:
- You can use the arrow keys to move the caret (position for next
keystroke) left or right. You can use the Home and End keys to jump the caret
left or right. Pressing the Home or End key repeatedly oscillates the caret
between the very first/last position in the Text and the first/last
input-capable position.
- You can move the caret to a position which is not input-capable i.e.
to non-numeric characters after the last digit 0-9. PSPNum rejects with a beep
any keystroke at this position. When you use the arrow keys, PSPNum skips the
caret over non input-capable positions between the first and last digits 0-9.
Value displayed:
- If the number has decimal places defined (DigitsAfterDP property is
positive) then:
- At least one non-blank character is displayed for the decimal
place. This is typically a single full-stop '.' but may be any other
character(s) depending upon what is set for the DP component in the edit
mask.
- The numeric value displayed always shows digits for all decimal
places. For example, if the number has three decimal places and the value is
zero, you see three 0's following the decimal place.
- The numeric value displayed always shows at least one digit before
the decimal place. If none have been defined for the number (DigitsBeforeDP
property is zero), a single 0 is displayed before the decimal place. You can
not change this single 0.
- Apart from a single 0 for the rule above, the displayed value never
includes leading 0's.
- In addition to the decimal place, the displayed value may include
other non-digit (not 0-9) characters depending upon the setting for edit
mask components other than DP e.g. 'CR' for the sign
of the number.
Your keystrokes:
- Any valid key immediately updates the Text property. There is no
'confirm input' in the number itself - although there may be a confirm/cancel
facility in your application.
- The only valid visible keystrokes are '+', '-', 0-9 and the input
decimal place i.e. the character determined by the DI component of the edit
mask. Any other visible character (e.g. A-Z) is
ignored.
- You change the sign of the number by keying plus '+' or minus '-'
anywhere in the displayed Text.
- You can change the relative position of the decimal place by keying a
new decimal place anywhere in the displayed value. If the number has no decimal
places (DigitsAfterDP is zero), the keyed decimal place is ignored with a beep.
- When you key digits (0-9) the value is always in 'insert' mode. That
is, the new digits are added to the existing digits. There is no 'overstrike'
mode i.e. where new digits replace existing digits.
- When you key digits (0-9) before the decimal place, the value scrolls
off to the left. That is, digits before the new digit are moved one place left.
This may mean that the left-most digit is lost because there are now more
digits than the DigitsBeforeDP property allows. In this case the OverflowKey
property setting determines how PSPNum responds.
- When you key digits (0-9) after the decimal place, the value scrolls
off to the right. That is, digits after the new digit are moved one place
right. This may mean that the right-most digit is lost because there are now
more decimal places than the DigitsAfterDP property allows. In this case the
numeric value is updated without a beep. Note that the value of the
Round property has no effect on this behaviour
because Round only applies to PSPNum operations e.g. when a new value is set in
your program code.
- You can use the Delete and Backspace keys to delete digits (0-9)
only. You can not delete any part of the displayed value (decimal place, sign
etc.) which are determined by the edit mask. You can
delete a number of digits at one time by selecting them first (e.g. by the
Shift and Arrow keys), then immediately hitting either Delete or Backspace or
by keying any new value.
System Clipboard support:
- You can select a range of Text using the Shift and Arrow keys or by
dragging the mouse over a range of digits.
- The range selection can be copied to the clipboard by the Ctrl+C or
Ctrl+Ins key combinations. The range selection will be deleted to the clipboard
(copied then deleted) by the Ctrl+X or Shift+Del key combinations.
- You can paste from the clipboard into the Text value using the Ctrl+V
or Shift+Ins key combinations. Any current range selection is first deleted
before pasting. Note that only numeric characters (0-9) are pasted from the
clipboard. Alphabetic characters in the clipboard string are ignored.