Click here to Skip to main content
15,889,116 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionSharing window folder Pin
helelark12318-Sep-07 19:36
helelark12318-Sep-07 19:36 
AnswerRe: Sharing window folder Pin
Dave Kreskowiak19-Sep-07 2:01
mveDave Kreskowiak19-Sep-07 2:01 
GeneralRe: Sharing window folder Pin
helelark12319-Sep-07 3:15
helelark12319-Sep-07 3:15 
GeneralRe: Sharing window folder Pin
Dave Kreskowiak20-Sep-07 10:28
mveDave Kreskowiak20-Sep-07 10:28 
QuestionComboBox With PropertyGrid Control Pin
VB 8.018-Sep-07 18:00
VB 8.018-Sep-07 18:00 
AnswerRe: ComboBox With PropertyGrid Control Pin
Dave Kreskowiak19-Sep-07 1:56
mveDave Kreskowiak19-Sep-07 1:56 
GeneralRe: ComboBox With PropertyGrid Control Pin
VB 8.019-Sep-07 4:47
VB 8.019-Sep-07 4:47 
GeneralRe: ComboBox With PropertyGrid Control Pin
Dave Kreskowiak19-Sep-07 7:16
mveDave Kreskowiak19-Sep-07 7:16 
dvsriram wrote:
Private Sub Properties_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

Dim al As New ArrayList

For Each ctr As Control In whitepage.Controls
ComboBox1.Items.Add(ctr)
MessageBox.Show(ctr.ToString())
Next

End Sub


This is because you only added the top level controls contained by whatever whitepage is. You didn't enumerate throught the child controls of each control.
Private Sub AddControlsToPropertyCombo(ByVal container As Control)
    ' Enumerate the controls in the root container
    For Each ctr As Control In container.Controls
        ' adding each to the ComboBox
        ComboBox1.Items.Add(ctr)
 
        ' If this control has child controls
        If ctr.HasChildren Then
            ' Call this sub again using this control as the new parent container
            AddControlsToPropertyCombo(ctr)
        End If
    Next



A guide to posting questions on CodeProject[^]

Dave Kreskowiak
Microsoft MVP
Visual Developer - Visual Basic
     2006, 2007


GeneralRe: ComboBox With PropertyGrid Control Pin
VB 8.020-Sep-07 2:42
VB 8.020-Sep-07 2:42 
GeneralRe: ComboBox With PropertyGrid Control Pin
Dave Kreskowiak20-Sep-07 9:44
mveDave Kreskowiak20-Sep-07 9:44 
GeneralRe: ComboBox With PropertyGrid Control Pin
VB 8.026-Sep-07 4:46
VB 8.026-Sep-07 4:46 
GeneralRe: ComboBox With PropertyGrid Control Pin
Dave Kreskowiak26-Sep-07 12:59
mveDave Kreskowiak26-Sep-07 12:59 
GeneralRe: ComboBox With PropertyGrid Control Pin
VB 8.026-Sep-07 21:09
VB 8.026-Sep-07 21:09 
GeneralRe: ComboBox With PropertyGrid Control Pin
VB 8.027-Sep-07 0:24
VB 8.027-Sep-07 0:24 
GeneralRe: ComboBox With PropertyGrid Control [modified] Pin
Dave Kreskowiak27-Sep-07 1:42
mveDave Kreskowiak27-Sep-07 1:42 
QuestionSystem.drawing.bitmap Pin
plural18-Sep-07 8:58
plural18-Sep-07 8:58 
AnswerRe: System.drawing.bitmap Pin
Guffa18-Sep-07 9:29
Guffa18-Sep-07 9:29 
QuestionAppleScript guy asks "Can VB.NET --------?" Pin
@largeinsd18-Sep-07 7:27
@largeinsd18-Sep-07 7:27 
AnswerRe: AppleScript guy asks "Can VB.NET --------?" Pin
Guffa18-Sep-07 9:41
Guffa18-Sep-07 9:41 
Questionaccessing mdi child Pin
Sai Yasodharan18-Sep-07 5:45
Sai Yasodharan18-Sep-07 5:45 
AnswerRe: accessing mdi child Pin
Dave Kreskowiak18-Sep-07 6:11
mveDave Kreskowiak18-Sep-07 6:11 
GeneralRe: accessing mdi child Pin
Sai Yasodharan18-Sep-07 6:28
Sai Yasodharan18-Sep-07 6:28 
QuestionIs there anyway vb.net can use to extract image feature? Pin
TeiUKei18-Sep-07 4:26
TeiUKei18-Sep-07 4:26 
AnswerRe: Is there anyway vb.net can use to extract image feature? Pin
DanB198318-Sep-07 5:50
DanB198318-Sep-07 5:50 
AnswerRe: Is there anyway vb.net can use to extract image feature? Pin
Dave Kreskowiak18-Sep-07 5:56
mveDave Kreskowiak18-Sep-07 5:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.