|
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
PropertyGrid1.CollapseAllGridItems()
ExpandGridItem("Appearance Shape", PropertyGrid1)
End Sub
' Find the GridItem
Private Sub ExpandGridItem(ByVal Search_grid_item As String, ByVal pg As PropertyGrid)
' Find the GridItem root.
Dim root As Object
root = pg.SelectedGridItem
Do Until root.Parent Is Nothing
root = root.Parent
Loop
' Search the grid.
Dim childgriditem As New Collection
childgriditem.Add(root)
Do Until childgriditem.Count = 0
Dim test As GridItem = childgriditem(1)
childgriditem.Remove(1)
If test.Label = Search_grid_item Then test.Expanded = True
For Each obj As Object In test.GridItems
childgriditem.Add(obj)
Next obj
Loop
End Sub
End Class
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I first got hooked on programing with the TI994A. After it finally lost all support I reluctantly moved to the Apple IIe. Thank You BeagleBros for getting me through. I wrote programs for my Scuba buisness during this time. Currently I am a Database manager and software developer. I started with VBA and VB6 and now having fun with VB.NET/WPF/C#...