[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How do I Iterate through the controls in a MultiView View

Posted on 2007-10-05
2
Medium Priority
?
257 Views
Last Modified: 2013-11-26
Hello Experts,

How do I Iterate through the controls in a MultiView View.  All the controls are user controls in an html table.

Thanks
Howard
0
Comment
Question by:Howard Katz
1 Comment
 
LVL 27

Accepted Solution

by:
planocz earned 2000 total points
ID: 20023916
Hi Howard,
I do not do alot of web, but here is some sample code that I use to move thru alot of controls at once.
'Place in page loading area
     KeyPress_Tabs(Me)
'Place in vb side area
  Private Sub KeyPress_Tabs(ByVal container As Control)
        For Each c As Control In container.Controls
            If c.HasChildren Then
                KeyPress_Tabs(c) ' recurse into another container
            Else
                Select Case TypeName(c)
                    Case "CheckBox"
                        AddHandler CType(c, CheckBox).KeyPress, AddressOf Controls_KeyPress
                    Case "ComboBox"
                        AddHandler CType(c, ComboBox).KeyPress, AddressOf Controls_KeyPress
                    Case "TextBox"
                        AddHandler CType(c, TextBox).KeyPress, AddressOf Controls_KeyPress
                End Select
            End If
        Next
    End Sub
    Private Sub Controls_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs)
        If e.KeyChar = Chr(13) Then
            MyBase.ProcessTabKey(True)
            e.Handled = True
        End If
    End Sub
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Screencast - Getting to Know the Pipeline
Suggested Courses
Course of the Month18 days, 18 hours left to enroll

834 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