Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Add Menu items at runtime?
Message
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00404608
Message ID:
00404860
Vues:
11
>>>How can I add menu items at runtime?
>>>
>>>(I'd like to load items to the menu from a table.)
>>
>>Look at [Creating and Modifying Menus at Run Time] in the VB help.
>
>I have seen how to create a control array in the menu editor. But I do not see how to create or extend this array in code.

In this topic, they talk about creating a control array with a menu element. Then in your code, you must do something like:
Private Sub Command1_Click()
    Load mnuItem(1)
    mnuItem(1).Caption = "Item 2"
End Sub
I have a small question for you: How will you call action related to your selected item?
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform