virtualtreeview

How to Auto Update the CheckState of the parent nodes When Child's Changed Programmingly?

a 夏天 提交于 2021-02-08 09:12:59
问题 I am using Delphi XE3 with Virtual TreeView. I have enabled the toAutoTristateTracking option. WHen I try to change the check state of a node manually, then the affected node's checkstate will change as well. However, when I do the same thing programmingly, for example PNode^.CheckState := csMixedNormal; or PNode^.CheckState := csCheckedNormal; Only PNode check state will be changed. The affected nodes will not change their states. Why? 回答1: Don't access CheckState of a node directly. Use

How to know a node is root in Virtual TreeView?

倖福魔咒の 提交于 2021-01-27 07:27:46
问题 I am using Virtual Tree View. Is there a reliable way to know if a node is root or not? I try to use if not Assigned(Node.Parent) then Output('This is root') else Output('This is not root') But does not work. I try to use if Node = tvItems.RootNode then Output('This is root') else Output('This is not root') But does not work either. 回答1: The ultimate root node in VTV (or VST ) is a special invisible node, which acts as parent for all user created root nodes (nodes created with parent = nil ).

Implementing VirtualTreeView TVTDefaultAccessibleProvider in C++ Builder

时光总嘲笑我的痴心妄想 提交于 2020-02-25 23:06:28
问题 When using VirtualStringTree to add accessibility support it is required to include the unit VirtualTrees.Accessibility in the uses section. This works in Delphi. The equivalent of this in C++ Builder would be to include the #include "VirtualTrees.Accessibility.hpp" . But including the include file doesn't have any effect. I've traced the problem to the VirtualTrees.Accessibility.pas file and it executes a few lines of code to register the default accessibility provider in Delphi while this

The initialization part is not called

≡放荡痞女 提交于 2020-02-23 10:29:32
问题 I'm maintaining the VirtualTreeView component for Delphi and C++Builder. With Delphi everything is okay but when I compile the packages with the C++Builder the code in the initialization part in the Delphi units is not called. Any ideas? 回答1: When a Delphi unit's initialization / finalization sections are not being called in a C++Builder project, it usually means the Delphi unit is not being linked into the final executable, typically because the C++ code is not directly referencing any code

example “virtual treeview” IterateSubtree in C++Builder XE-XE7

有些话、适合烂在心里 提交于 2020-01-07 22:59:35
问题 I need an example how to use "virtual treeview" IterateSubtree in C++ Embarcadero Xe1-7. I have the problem with this code: void __fastcall TMyForm::BuSearchClick(TObject *) { MyTreeView->IterateSubtree(NULL, SearchDataSomeId, (void*)&PNodeData, TVirtualNodeStates(), false, false); } void __fastcall TMyForm::SearchDataSomeId(TBaseVirtualTree*, PVirtualNode Node, void *Data, bool &Abort) { } The compiler gives the following error: [bcc32 Error] MyFile.cpp(363): E2034 Cannot convert 'void (

How to select all root or all child nodes in VirtualStringTree?

一曲冷凌霜 提交于 2020-01-03 15:15:53
问题 I would like to select either all root nodes or all child nodes (not all nodes in a VirtualTreeView). I've tried to use this code to select all root nodes: procedure SelectAllRoots; var Node: PVirtualNode; begin Form1.VirtualStringTree1.BeginUpdate; Node := Form1.VirtualStringTree1.GetFirst; while True do begin if Node = nil then Break; if not (vsSelected in Node.States) then Node.States := Node.States + [vsSelected]; Node := Form1.VirtualStringTree1.GetNext(Node); end; Form1

virtualtreeview add icon fail

微笑、不失礼 提交于 2020-01-03 03:04:11
问题 here my simple code to add filename and their associated icon to virtualtreeview PFileInfoRec = ^TFileInfoRec; TFileInfoRec = record strict private vFullPath: string; vFileName: string; vFileIcon: hIcon; public constructor Create(const FullPath: string); property FullPath: string read vFullPath; property FileNam : string read vFileName; property FileIcon: hIcon read vFileIcon; end; after i got the icon handle using shGetFileInfo Api procedure TMainFrm.VSTGetImageIndex(Sender: TBaseVirtualTree

virtualtreeview add icon fail

故事扮演 提交于 2020-01-03 03:04:09
问题 here my simple code to add filename and their associated icon to virtualtreeview PFileInfoRec = ^TFileInfoRec; TFileInfoRec = record strict private vFullPath: string; vFileName: string; vFileIcon: hIcon; public constructor Create(const FullPath: string); property FullPath: string read vFullPath; property FileNam : string read vFileName; property FileIcon: hIcon read vFileIcon; end; after i got the icon handle using shGetFileInfo Api procedure TMainFrm.VSTGetImageIndex(Sender: TBaseVirtualTree

VirtualTreeView with UseExplorerThemes

牧云@^-^@ 提交于 2019-12-29 08:03:25
问题 I just discovered that using the Option toUseExplorerTheme allows to produce a nice selection rectangle for a VirtualStringTree. However, if the Option toGridExtensions is set and there are several columns in the tree, the vertical border of the selection is not drawn for the inner cells, and the rounded corners are missing as well. Only the outermost edges and corners of the left- and right-most columns are drawn correctly. It looks as if the selection rectangle is drawn between the

Virtual StringTree: Text returned by the OnGetHint event handler is not shown in the hint window

[亡魂溺海] 提交于 2019-12-24 00:57:48
问题 I wrote a handler for the OnGetHint event of the Virtual StringTree control, and I'm sure that the hint text is returned, but the hint window is blank, see the screenshot below, what might caused this problem? thank you in advance. The settings of the control: AnimationDuration := 0; ClipboardFormats.Clear; ClipboardFormats.Add('HTML Format'); ClipboardFormats.Add('Plain text'); ClipboardFormats.Add('Rich Text Format'); ClipboardFormats.Add('Rich Text Format Without Objects');