This doesn't seem to work in version 20.9 in a TDBWPRichText unless there as a property that disables it?
Ken
This doesn't seem to work in version 20.9 in a TDBWPRichText unless there as a property that disables it?
Ken
Hi,
Please check if your menu uses a shortcut which overwrites it.
Julian
Not using any menus, also it does not work in the demo I tried.
Ken
Nor with a simple app with only your component on it.
Ken
Hi,
It seems so this code was cut out in unit WPCtrMemo, KeyPress
#3:
if (GetKeyState(VK_SHIFT) >= 0) then
begin
CopyToClipboard; key := #0;
ShowCursor;
end;
#22:
if (GetKeyState(VK_SHIFT) >= 0) and CheckHasBody then
begin
if Changing then
begin
PasteFromClipboard;
ChangeApplied;
key := #0;
ChangeApplied;
ShowCursor;
end;
end;
#24:
if (GetKeyState(VK_SHIFT) >= 0) then
begin
if Changing then
begin
CutToClipboard;
FMemo.RePaint;
ChangeApplied;
end else CopyToClipboard;
key := #0;
ShowCursor;
end;
Alles anzeigen
Regards,
Julian
Thanks Julian.
Julian,
I echo Ken's sentiment. Thank you..:)
richard diamond
Julian,
Could you please post the entite procedure as it is not clear to me exactly where this should go.
Thanks,
Ken
Ken,
Within WPCTRMemo's TWPCustomRtfEdit.KeyPress() procedure, there's a case statement that starts off:
try
if not FMemo.HasData or (Readonly and (Key <> #3)) then
begin
exit;
end;
FMemo._InKeyIn := TRUE;
if Key < #32 then
begin
case Key of
// <--------- or insert Julian's code here
#27:
begin
if FJustCreatedAutomaticHyperlink then CloseAutoLink;
HideSelection;
FMemo._FMouseDown := FALSE; // Disable selection if any
end;
// <--------- or insert Julian's code here
end;
end
Alles anzeigen
It's at either point shown within that Case statement that Julian's code should be inserted.
I believe the try statement at the top of that block of code shown starts, in R20.9, at around line 4866.
I hope that helps...:)
Regards,
richard diamond
Richard,
Many thanks,
Ken