Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- uses
- CommCtrl;
- procedure TForm1.Button1Click(Sender: TObject);
- var
- ItemEx: TTVItemEx;
- InsertStruct: TTVInsertStruct;
- begin
- ItemEx.mask := TVIF_TEXT or TVIF_INTEGRAL;
- ItemEx.pszText := PChar('This node is 3 times higher than default node height');
- // this is the multiplier of default node height, which you can set by sending
- // TVM_SETITEMHEIGHT message even to 1 pixel, but then the lines become broken
- // so if it's sufficient for you to use multiples of default node height, this
- // could be the way but it's "quite difficult" to modify the original VCL tree
- // view control to use the TTVItemEx structure for nodes
- ItemEx.iIntegral := 3;
- InsertStruct.hParent := nil;
- InsertStruct.hInsertAfter := TVI_LAST;
- InsertStruct.itemex := ItemEx;
- TreeView_InsertItem(TreeView1.Handle, InsertStruct);
- end;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement