Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > VCL

Lost Password?

Thread Tools Display Modes
Old 08-22-2011, 02:06 PM
Norrit Norrit is offline
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,333
Default adjust TTreeNode.Height and center text


I use a TTreeView, obviously populated with TTreeNodes.
Now I want my treenodes to have individual heights...

This can be done by using the following code:
    procedure SetTreeNodeHeight(ANode: TTreeNode);
      item: TTVItemEx;
      item.hItem := ANode.ItemId;
      item.iIntegral := 3;
      item.mask := TVIF_INTEGRAL;
      SendMessage(ANode.TreeView.Handle, TVM_SETITEM, 0, Longint(@item));
This will enhance the treenode with 2 extra lines, but I want it to center...

Now you get:
      <extra empty line>
      <extra empty line>
And what I would like:
      <extra empty line>
      <extra empty line>
Hope the question is clear enough and anybody has an idea on how to do this?
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 08:08 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.