Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

TElInplaceCurrencyEditor: Does the Delete key delete a character?

Does the Delete key work in the InplaceCurrency Editor as currently implemented?

It does not delete a digit here.

Raymond

Comments

  • 4 Comments sorted by Votes Date Added
  • edited August 2013 Posts: 0 Accepted Answer Vote Up0Vote Down
    Don't understand the question. Currency Inplace-Editor is a special masked control, so it has very special deletion logic (e.g. after seperator no characters are "deleted" but set to "0", same with the first character before decimal character). Simply check out the ElCurrencyEditor to learn behaviour.
    If you need a special editor class, derive your own inplace editor from TElTreeInplaceEditor, which is fairly simple.

    Note: Please make sure to use correct category (ElPack instead of NG Controls).
  • In the ELXTree demo for Inplace Editors, add the control ElTreeInplaceCurrencyEdit and connect to the tree ElXTreeInplaceEdit.

    In the DM unit d_LMDElXTree_Dm add the following line to the procedure BuildHeader(...):

      ATree.Header.Sections[3].FieldType := Eltreeinplaceeditors.TElFieldType.sftCurrency;

    Add Eltreeinplaceeditors to the Uses clause.

    Execute the program.

    The Currency Inplace Editor works with the Delete key very nicely - as expected.
    The special deletion logic works well.

    However, on my form it doesn't. I'll investigate and get back to you.

    Raymond
  • Explanation:

    An Action on the form has Del as its shortcut. I had disabled the Action in BeforeOperation and enabled it again in AfterOperation.

    However, although the Action is not enabled, the Del key is still captured by the Action manager.

    Setting the Action's ShortCut in Before/After operation works.

    The Currency Inplace Editor works quite nicely.

    Sorry about wasting your time on this.

    Raymond
Sign In or Register to comment.