Forum > LCL
TRichMemo: Popup menu not shown when the Menu key is pressed
(1/1)
CM630:
Windows 10, 64 bit, Lazarus 4RC2, 32 bit.
I create a TRichMemo, then I add a popup and link the popup with the RichMemo.
When I right click the memo or I press “Shift + F10” the popup menu is shown.
When I press the menu key on the keyboard the popup menu is not shown, some small rectangle is shown on the place of the mouse instead.
I succeeded in making a workaround, which works:
--- Code: Pascal [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TForm1.RichMemo1KeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);begin if (Key = 93) then begin PopupMenu1.PopUp; //or maybe better TRichMemo(Sender).PopupMenu.PopUp; key := 0; end;end;So probably the Menu key invokes something which probably should not be invoked.
Navigation
[0] Message Index