Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm General / April 2005

Tip: Looking for answers? Try searching our database.

adjusting the propertygrid's help panel

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
cOdEmOnKeY - 25 Jan 2005 21:41 GMT
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?
Marc Orsouw - 05 Feb 2005 20:00 GMT
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
Marc Orsouw - 05 Feb 2005 21:57 GMT
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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.