Forum > General
When does Menu OnDrawItem fire?
seany:
--- Quote from: Sieben on February 08, 2023, 01:21:05 am ---Did you try setting OwnerDraw to True for your menu to invoke the item's OnDrawItem?
--- End quote ---
Yes, of course
seany:
--- Quote from: dsiders on February 07, 2023, 11:54:11 pm ---
--- Quote from: Slawek on February 07, 2023, 11:38:14 pm ---I looked at the source code and no procedure seems to call OnDrawItem, either in TMenu or TMenuItem.
--- End quote ---
That's not correct. See TMenuItem.DoDrawItem.
--- End quote ---
Is DoDrawItem een defined for Linux?
The only example i can find is this:
https://fossies.org/linux/lazarus/lcl/interfaces/win32/win32wsmenus.pp
This page does not show how to call it:
https://lazarus-ccr.sourceforge.io/docs/lcl/menus/tmenuitem.dodrawitem.html
As I said above, I am on Lazarus 2.2.4 (rev Unknown) FPC 3.2.2 x86_64-linux-qt5
dsiders:
--- Quote from: seany on February 08, 2023, 02:07:28 pm ---
--- Quote from: dsiders on February 07, 2023, 11:54:11 pm ---
--- Quote from: Slawek on February 07, 2023, 11:38:14 pm ---I looked at the source code and no procedure seems to call OnDrawItem, either in TMenu or TMenuItem.
--- End quote ---
That's not correct. See TMenuItem.DoDrawItem.
--- End quote ---
Is DoDrawItem een defined for Linux?
The only example i can find is this:
https://fossies.org/linux/lazarus/lcl/interfaces/win32/win32wsmenus.pp
This page does not show how to call it:
https://lazarus-ccr.sourceforge.io/docs/lcl/menus/tmenuitem.dodrawitem.html
As I said above, I am on Lazarus 2.2.4 (rev Unknown) FPC 3.2.2 x86_64-linux-qt5
--- End quote ---
I overlooked that detail. My bad.
Navigation
[0] Message Index
[*] Previous page