Bypassing the TreeView.ItemHeight Limitation

Environment: .NET, C#

The property ItemHeight of the "System.Windows.Forms.TreeView" .NET control allows you to set the height of each item in your TreeView. It's a bit surprising, but .NET libraries developers have set a maximum value for this property.

If you set an item's height to greater than 24 pixels, the value is automatically reduced to 24 pixels before being processed. To bypass this limitation, you can override the TreeView class and the WndProc method, and then modify the parameters of the TVM_SETITEMHEIGHT message.

The source code that can be downloaded will help you to better understand the concept.

Downloads

Download source - 1 Kb


Comments

  • How do you bypass the Menuitem bounds???

    Posted by Legacy on 07/29/2003 12:00am

    Originally posted by: Thomas Jacobsen

    when i override the menuitem onDrawitem(), I can't draw a selection bar to the edge , but if i can bypass the size in anyway.

    Reply
  • Can this be called an article? Boo...

    Posted by Legacy on 07/10/2003 12:00am

    Originally posted by: CodeGuru

    and no stuff what u did .... sign

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • This paper introduces IBM Java on the IBM PowerLinux 7R2 server and describes IBM's implementation of the Java platform, which includes IBM's Java Virtual Machine and development toolkit.

  • The explosion in mobile devices and applications has generated a great deal of interest in APIs. Today's businesses are under increased pressure to make it easy to build apps, supply tools to help developers work more quickly, and deploy operational analytics so they can track users, developers, application performance, and more. Apigee Edge provides comprehensive API delivery tools and both operational and business-level analytics in an integrated platform. It is available as on-premise software or through …

Most Popular Programming Stories

More for Developers

Latest Developer Headlines

RSS Feeds