PopupMenu on dock menu lazarus / 31-LCL ---------------------------------------------------------------------- systemgvp · 2026-05-17 01:35 I created this little dock menu, now I would like that clicking on a Timage opens a menu like TPopupMenu, but with a default position (above the dock, not towards the bottom) and that each item contains a non-small icon. ---------------------------------------------------------------------- systemgvp · 2026-05-17 12:43 If I use GTK2 the size appears correct, but if I use QT it is stuck at 16, it does not change. ---------------------------------------------------------------------- zeljko · 2026-05-17 13:14 Without single line of code (example project) nobody can help you. ---------------------------------------------------------------------- systemgvp · 2026-05-17 13:19 the code is in the image ---------------------------------------------------------------------- zeljko · 2026-05-17 14:07 You want me to re-type your code ? Really funny. Also what is your system ? x11 or wayland ? What is your lazarus version ? ---------------------------------------------------------------------- wp · 2026-05-17 14:13 You are calling PopupMenu.Popup, but there is also a PopupMenu.Popup(X, Y) where you can control the position at which the menu is supposed to appear. Note that X,Y are screen coordinates. If you want to have icons next to the menu items, you must add a TImageList to which you add all icons, assign the imagelist to the Images property of the PopupMenu, and each MenuItem gets the index of its icon into the image list in the ImageIndex property. ---------------------------------------------------------------------- systemgvp · 2026-05-17 16:59 thanks, I use lazarus 4.6 on kubuntu with QT6. I use TImageList, but with GTK2 the images are 48x48 (ok) but with QT6 dont change from 16x16 ---------------------------------------------------------------------- wp · 2026-05-17 17:45 Set the Width and Height of the ImageList, before adding images, to 48 and add use 48x48 images. Note that such icons are rarely found... The Lazarus general purpose icon collection (folder "images/general_purpose") does have them, though. ---------------------------------------------------------------------- systemgvp · 2026-05-17 18:32 I did exactly this, but it only works if I use GTK, while on QT6 I can set whatever size I want, but it always shows me 16x16.