Speedbuttons vs TfsSyntaxMemo

tomtom
edited 8:10PM 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 8:10PM
    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