delphi - VirtualTreeView. How to modify child column width? -
my friend working in delphi virtualtreeview , has next problem: has 2 columns data , childs every row in first column. possible not changing first column width set maximum child column width?
so. circles nodes, rectangles text. (black rectangles of root nodes 2 column). how looks - child black reactangle. how have - red rectangle.
thanks
this called column spanning , yes, can done quite - set treeoptions -> autooptions -> toautospancolumns
option true
. way works if adjacent column empty caption of current 1 extended it. want work child columns have implement ongetcellisempty
event , return isempty := true
child nodes, ie like
procedure tform1.vt_getcellisempty(sender: tbasevirtualtree; node: pvirtualnode; column: tcolumnindex; var isempty: boolean); begin isempty := (sender.getnodelevel(node) > 0); end;
Comments
Post a Comment