• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 150
  • Last Modified:

Popup menus

Quite simple... How do I know how many Items does a TMenu or TPopupMenu contain? I wished the Item property was an array, but it's rather an indexed property... Just can't figure it out...
0
Nando
Asked:
Nando
1 Solution
 
javiertbCommented:
You can know how many menu items you have this way:

PopUpMenu1.Items.Count

And you can access any item by means of:

i.e.: PopupMenu1.Items[1].Enabled:=False; //Disable first                                                     menuitem
0
 
NandoAuthor Commented:
I just can't find such a property in the help... I should have tried by myself...
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now