Solved

How to iterating  through a visual net 2005 toolstrip

Posted on 2009-03-29
2
234 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Interactive Way of Training for the AWS CSA Exam

An interactive way of learning that will help you visualize core concepts so that you can be more effective when taking your AWS certification exam.  Built for students by a student to help them understand the concepts that they are being taught.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month10 days, 15 hours left to enroll

628 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