当我使用
请注意,所选内容从控件的左侧延伸到任何节点标题最右侧的位置;所有选择内容的宽度都相同。
我希望它看起来像这个图像(使用Virtual TreeView的他人项目),其中选择仅覆盖节点标题的文本:
除非Virtual TreeView中有退化(我正在使用5.2.2),否则这一定是可能的,但我找不到正确的选项组合。
这是我的设置代码:
TVirtualStringTree.PaintOptions
中的toUseExplorerTheme
时,它会像这样绘制选择内容:请注意,所选内容从控件的左侧延伸到任何节点标题最右侧的位置;所有选择内容的宽度都相同。
我希望它看起来像这个图像(使用Virtual TreeView的他人项目),其中选择仅覆盖节点标题的文本:
除非Virtual TreeView中有退化(我正在使用5.2.2),否则这一定是可能的,但我找不到正确的选项组合。
这是我的设置代码:
fTree := TVirtualStringTree.Create(Self);
fTree.Parent := Self;
fTree.Align := alClient;
fTree.OnGetText := TreeGetText;
fTree.OnInitNode := TreeInitNode;
fTree.OnInitChildren := TreeInitChildren;
fTree.OnChange := TreeSelectionChange;
fTree.RootNodeCount := 1;
fTree.DrawSelectionMode := smBlendedRectangle;
fTree.TreeOptions.PaintOptions := fTree.TreeOptions.PaintOptions
+ [toUseExplorerTheme];
fTree.TreeOptions.SelectionOptions := fTree.TreeOptions.SelectionOptions
+ [toMultiSelect];