1
I have the following code snippet:
if TMenuItem(fmPrincipal.FindComponent('teste')) <> nil then
if TMenuItem(fmPrincipal.FindComponent('teste')).Visible then
...
I’m looking for a menu item and I’m checking to see if it’s visible. However my code is growing and I’m having to add more checks if the item is enabled etc.
How could I use a pointer to point to this object and use the pointer from then on, without having to keep doing the FindComponent
all the time?