TTReeView Dynamic popupmenu. lazarus / 31-LCL ---------------------------------------------------------------------- sergioantonio2013 · 2019-09-24 20:42 I want to have different menus popup depending on what item you right click on the TTReeView. any idea, how this can be done, the easy way if there is one. ---------------------------------------------------------------------- jamie · 2019-09-24 22:26 assuming you are having issues how to determine which node you are clicking on? 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 TForm1.TreeView1MouseDown(Sender: TObject; Button: TMouseButton;  Shift: TShiftState; X, Y: Integer);Var  N:TTreeNode;begin If Sender is TtreeView Then With TTreeView(Sender) do  Begin    N := GetNodeAt(X,Y);  if (N <> Nil)and (ssRight in Shift) then  Begin     Form1.Caption := N.Text;     { Call a PopUp Here using a Case to determine which one to call }     { Or Use the N.DATA pointer to point to a record containing info about it }     { The Record can hold the Instance for the Menu }  end; end;end;                                Hope that helps you get started. ---------------------------------------------------------------------- sergioantonio2013 · 2019-09-25 11:46 Thanks that worked.