Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
MM Security question
Message
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Divers
Thread ID:
01315681
Message ID:
01335568
Vues:
26
Kevin,
How do I get to the menu pads controlID?
its an extended property and when I loop through the menu items what can I cast the item to to get to that property?

The code Im using looks something like this.
Private Sub resetstrip(ByVal itemcollection As ToolStripItemCollection)
        Dim itemindex As Int32
        For itemindex = 0 To itemcollection.Count - 1
            itemcollection.Item(itemindex).Visible = True
           
            If Not TypeOf itemcollection.Item(itemindex) Is ToolStripSeparator Then

                Dim menuitem As ToolStripMenuItem = TryCast(itemcollection.Item(itemindex), ToolStripMenuItem)
                If Not (menuitem Is Nothing) Then
                    Dim MMmenuItem As <SOMETHING> = CType(itemcollection.Item(itemindex),<SOMETHING>)
                    MMmenuItem.ControlID = MMmenuItem.ControlID

                    If menuitem.DropDownItems.Count > 0 Then
                        resetstrip(menuitem.DropDownItems)
                    End If
                End If
            End If
        Next 
I' cant seem to find what I should be casting to in order to have the ControlID property available.

Thanks
Brian Grant
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform