Validating user input in a TSringGrid Cell? :: WDSibyl :: Visual Development Environment
Benutzer registrieren

Validating user input in a TSringGrid Cell?  Unten

  • Hi All

    I'm trying to validate user input in a stringgrid cell.

    I've tried to use OnKeyPress but there is a problem in that after the first keypress further keys are not processed by OnKeyPress.

    I have noticed that OnKeyPress only works (for the first key) if the cell is highlighted. If I doubleclick the cell the highlight disappears and the editor cursor is visible; if I press a key OnKeyPress is not called.

    So, How can I validate user input in a stringgrid cell?

    Thanks for any help

    Pete
  • Hi All

    The answer seems to be FORGET using "in place editing" in the stringgrid as it does NOT work properly.

    To edit items in the stringgrid I have resorted to creating a menu option "Modify Line" which, when selected, opens another window with the contents of the selected line displayed in Edit boxes.

    The values in the Edit boxes can be changed and Validated without the problems displayed by stringgrid "in place editing" and the new values are copied to the stringgrid when OK button is clicked in the Modify Line window.

    This, at least, works - it just should not be necessary.

    Pete
  • 0 Benutzer

Diese Angaben basieren auf den Useraktivitäten der letzten 30 Minuten.