Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > VCL

Lost Password?

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

Hi,

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:
Code:
    procedure SetTreeNodeHeight(ANode: TTreeNode);
    var
      item: TTVItemEx;
    begin
      item.hItem := ANode.ItemId;
      item.iIntegral := 3;
      item.mask := TVIF_INTEGRAL;
      SendMessage(ANode.TreeView.Handle, TVM_SETITEM, 0, Longint(@item));
    end;
This will enhance the treenode with 2 extra lines, but I want it to center...

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

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.