Controls on the Panel
懐かしいメモ発見。
パネル上のコントロールをすべて取得して
それぞれのコントロールに対して何らかの処理を行う場合のメモ
'タブコントロール上のコントロールを格納
Dim lib As ListBox = Nothing
Dim Pnl As Panel = Nothing
'全体パネルコントロールの全コントロールを取得
For Each ctl As Control In Me.CtlPnlCondition.Controls
'パネルコントロールにキャスト
Pnl = TryCast(ctl, Panel)
If Not (Pnl Is Nothing) Then
'個別パネルコントロールの全コントロールを取得
For Each ctl2 As Control In Pnl .Controls
lib = TryCast(ctl2, Listbox )
If Not (objlib Is Nothing) Then
lib .Items.Clear()
End If
Next
End If
Next