Any idea for xplat tpopupmenu replacement that not closes when checking items lazarus / 31-LCL ---------------------------------------------------------------------- MISV · 2019-08-20 19:24 Has anyone in LCL/lazarus community developed a replacement tpopupmenu that does not close when checking items? (e.g. if you have a ton of options shown in a menu) I guess the common solution is making a window form that reads the menu and generates a tree structure or similar... So that is on my todo list if there isn't already a better solution available ---------------------------------------------------------------------- jamie · 2019-08-20 20:51 Use a tool Window.. that more or less floats on top. I guess in Lazarus its a StayOnTop window. ---------------------------------------------------------------------- lucamar · 2019-08-20 20:59 AFAIK there's no popup-menu substitute that can do that. What I do for those cases is either show an "Options" form or a panel where the user can select the options, like in the attached image (a generic base program for tests) ---------------------------------------------------------------------- winni · 2019-08-20 21:00 Yes - ToolWindow with StayOnTop. I did that many times. And dont forget the "close"  option ...... Winni ---------------------------------------------------------------------- MISV · 2020-02-15 18:48 I am thinking about making a custom form that can read a popupmenu. I have a popupmenu consisting of multiple levels and about 70 menuitem checkbox (for controlling which data columns are visible) I would almost have though some had made tpoupmenu replacement (form) that could at runtime create checkboxes and other controls + call events etc. so one could reuse TPopupMenu. Does anyone know of any such? Otherwise I will try roll my own ... Maybe a form with a treeview showing all the nested options ---------------------------------------------------------------------- jamie · 2020-02-15 20:22 There are a lot of ways of doing what you want that already exists TtreeView, especially in custom draw mode can do that... etc TCheckBoxList can also be wedged in there as a popup item in the list and so on.. its a matter of how created you want to be but its all there without creating special controls that will use existing installed components..  Use a TFRAME to build such an item if you wish. That is the next best thing of creating a special control but without installing it. ---------------------------------------------------------------------- lucamar · 2020-02-15 20:45 Another possible way of doing it might be implementing a helper for TCheckGroup with a method called, say, BuildFromMenu. Building the check group would just be a question of adding an item for each of the menu(item) Items[]. We do something similar to build dynamic check groups from arrays of (string, boolean) pairs and it works quite nicely