Speedbuttons vs TfsSyntaxMemo

tomtom
edited 2:48PM in FastScript
Hi

1. Place a TfsSyntaxMemo on a form
2. Place a seedbutton on the same form
3. Set the caption of the speedbutton to "My&Button"
4. Run it, you will never be able to type a "B" into the Syntax Memo

This seems to a known Windows behaviour:

If the active control does not want keys, the accelerators of speedbuttons are active without alt key.

Putting DLGC_WANTCHARS into WMGetDlgCode solves the problem:

procedure TfsSyntaxMemo.WMGetDlgCode(var Message: TWMGetDlgCode);
begin
Message.Result := DLGC_WANTARROWS or DLGC_WANTTAB or DLGC_WANTALLKEYS or DLGC_WANTCHARS;
end;

Could you put this into the next release?

Yours

Tom

Comments

  • edited 2:48PM
    Thanks for the tip. This bug was on my todo list, you saved me quite some time.

    (No, i'm not part of FastReports)

    Marck

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.