Got It !!
Public Class PropertyGridEx
Inherits PropertyGrid
Public Function getlines()
Dim a As Object
Dim b As Object
Dim iHeight As Integer
For Each a In Me.Controls
If a.GetType.FullName =
"System.Windows.Forms.PropertyGridInternal.DocComment" Then
a.set_lines(15)
Exit For
Else
iHeight += a.height
End If
Next
Me.OnMouseDown(New MouseEventArgs(MouseButtons.Left, 1, 0, iHeight, 0))
Me.OnMouseUp(New MouseEventArgs(MouseButtons.Left, 1, 0, iHeight, 0))
End Function
End Class
Just call the Setlines, (simulate the mousclick does the trick)
gr /\/\o\/\/
Ryan McFarren - 27 Apr 2005 18:34 GMT
I created a PropertyGridEx user control that consists of a PG with the help
turned off (HelpVisible == false), and a user control for the help panel
that looks exactly like the PG's own help panel. This gives me complete
control over the size. It also allows me to provide help text when the
user selects a Category in the PG, not just a property.