Problems with context menu lazarus / 43-Android ---------------------------------------------------------------------- tango13 · 2021-06-04 15:51 Hi all, I am trying to create a context menu but I don't seem to get it right, nothing shows up. The create procedure is very simple to start with, I just copied it from the menu demo Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i procedure TAndroidModule1.AndroidModule1CreateContextMenu(Sender: TObject;  jObjMenu: jObject);begin    if jObjMenu<>nil then    begin      jContextMenu1.SetHeader(jObjMenu, 'Context Menu!', '');      jContextMenu1.AddItem(jObjMenu, 10, 'Item 1', mitDefault);      jContextMenu1.AddItem(jObjMenu, 20, 'Item 2', mitDefault);      debugln('context menu created');    end;    debugln('context menu not created');end; I added the two debugln statements but I don't see any of them anywhere in the log, as if the event is never fired. What am I doing wrong? Thank you! ---------------------------------------------------------------------- jmpessoa · 2021-06-04 16:24 QuoteI just copied it from the menu demo... Maybe you need link/bind the code in Object Inspector (form event properties)... ---------------------------------------------------------------------- tango13 · 2021-06-05 05:41 Sorry, I forgot to mention that I already linked the procedures (create and click) to the respective form events OnCreateContextMenu and OnClickContextMenuItem, but still I don't get any sign of the code being executed. Thank you. ---------------------------------------------------------------------- tango13 · 2021-06-05 06:11 It seems like I cannot register a jdrawingview object for context menu, if I register a jbutton object it works. Is that correct?