adjusting the propertygrid's help panel

G

Guest

Does anyone know how to adjust the size of the propertygrid's help panel
programmatically? I want to increase/decrease the size of the help panel
when I load a specific object into the propertygrid.

I tried getting the help panel in the propertygrid's control collection and
adjusting the size that way, but it did nothing. Is the size property
readonly?

Any ideas?
 
M

Marc Orsouw via DotNetMonster.com

CodeMonkey,

I have the same problem,
i have managed to set the lines using code below,
and at the moment I touch the splitter with the mouse the splitter will
Jump to 15 lines height of the help pane.

I still can't get it to update before i touch it with the mouse, did try
some updates and invalidates but they did not do the trick.
(the propertygridview as an
(see commented lines)

if someone knows how to force the update ....

greetings /\/\o\/\/


dim a as object
For Each a In Me.PropertyGrid1.Controls
If a.GetType.FullName =
"System.Windows.Forms.PropertyGridInternal.DocComment" Then
a.set_lines(15)
'a.invalidate()
'a.update()
'a.refresh()
'Me.PropertyGrid1.Invalidate()
'Me.PropertyGrid1.Refresh()
'Me.PropertyGrid1.Update()
End If
If a.GetType.FullName =
"System.Windows.Forms.PropertyGridInternal.PropertyGridView" Then
'a.invalidate()
'a.update()
'a.refresh()
End If
Next
 
M

Marc Orsouw via DotNetMonster.com

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\/\/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top