Solved

How to iterating  through a visual net 2005 toolstrip

Posted on 2009-03-29
2
232 Views
Last Modified: 2013-12-26
Greetings,

First I need to iterate through the controls in a toolstrip.  Second, when the control is a combobox, I need to read the value.  

Thanks
0
Comment
Question by:vaughnwhitehead
2 Comments
 
LVL 3

Accepted Solution

by:
TommyTwoPints earned 500 total points
ID: 24014350
Hello vaughnwhitehead,

The below sample will help you achieve what you want.

Regards,

TommyTwoPints
    Sub LoopThroughToolStrip()
        Dim TS As ToolStrip = Me.ToolStrip1
        For Each item As ToolStripItem In TS.Items
            If TypeOf item Is ToolStripComboBox Then
                MessageBox.Show(DirectCast(item, ToolStripComboBox).Text)
            End If
        Next
    End Sub

Open in new window

0
 

Author Closing Comment

by:vaughnwhitehead
ID: 31564093
Greatly appreciate the fast response on such a basic question.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question