Speedbuttons vs TfsSyntaxMemo
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
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
(No, i'm not part of FastReports)
Marck