Howdy, Stranger!

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

In this Discussion

TElTreeInplaceMemo: WantReturns & WantTabs: How to make work?

  with InplaceMemo.Editor do
  begin
    WantReturns := True;
    WantTabs    := True;
  end;

This does not, however, allow the user to use the Enter key for moving to the next line in the inplace memo editor.

These properties appear to have no affect.

Is there some setting that would enable these or is this a bug?

Raymond

Comments

  • 5 Comments sorted by Votes Date Added
  • >>Is there some setting that would enable these <<
    No. The internal control is a TMemo, hence original properties are available but have no effect. One could use TCustomMemo and make only possible properties public.

    >>Is there some setting that would enable these <<
    Not built in, but you can achieve it in several ways (either using hook component or derive your own control from MemoInplace-Editor (write a custom EditorWndProc method. Search for VK_RETURN and you will find built-in handling of Enter key). 

  • It is unusual for users to have to use Ctrl+ENTER and Ctrl+TAB to enter newlines and tabs into a memo.

    The default behaviour of a TMemo is WantReturns = True.

    The compiler accepts setting WantReturns to True, so the property WantReturns is already public?

    Wouldn't it be a simple matter for you to make the required properties public?

    Raymond
  • Posts: 0 Accepted Answer Vote Up0Vote Down
    >>Wouldn't it be a simple matter for you to make the required properties public?<<
    As I mentioned above - the "bug" is here that we did not use TCustomMemo as reference control (and publish only possible properties). Not all available properties in TMemo have actually an effect.
  • As we need a consistent technique for accepting an edited value, the Enter key is required for the inplace memo edit to close it and accept it.

    The dialog box provided by LMDMemoDlg can be used for better editing; this is provided with a Double+Click on the cell or the Return key when the cell is active.

    The Hint/Help specifies that Ctrl+Enter and Ctrl+TAB are required when editing inline, and the reason why.

    Raymond
Sign In or Register to comment.