virtualtreeview

Delphi VirtualStringTree - Check for Duplicates?

╄→гoц情女王★ 提交于 2019-12-12 21:17:17
问题 Yeah, I know I post a lot of questions, but thats because I either need assurance that I am doing it right, what I am doing wrong, or if I am totally clueless, and cant find anything in the documentation. Anyways, I am trying to check for duplicate nodes. Here is how I would want to do it: Loop thru my nodes, and compare each single node's text (record), but if I got many nodes, wouldnt that be too time and memory consuming? Would there be a better approach for this? Thanks! - Jeff. EDIT:

Delphi5 Virtual TreeView wanted

半腔热情 提交于 2019-12-12 18:17:12
问题 Does anyone happen to have a copy of the Virtual TreeView that is Delphi5 compatible? Or does anyone know where it can be downloaded from? Thanks in advance to any responses. 回答1: On the official site of virtual treeview creator : http://www.soft-gems.net/ just follow the link " All Downloads " Virtual treeview 4.5.2 is compatible with Delphi 5 来源: https://stackoverflow.com/questions/2551202/delphi5-virtual-treeview-wanted

VirtualTreeView copy tree with data

删除回忆录丶 提交于 2019-12-12 05:49:43
问题 How to copy all nodes from one VirtualTreeView to another? I tried to use CopyTo-function, but the Data was empty, why? Data contains reference to record (as usual). I've also tried to use the OnNodeCopying event as @Cosmin Prund suggested in his now deleted answer this way, but it crashes: procedure TDataBaseForm.SourceTreeViewNodeCopying(Sender: TBaseVirtualTree; Node, Target: PVirtualNode; var Allowed: Boolean); var SourceNodeData, DestNodeData: PNodeDataForCompare; begin SourceNodeData :=

Delphi VirtualStringTree Drawing

一个人想着一个人 提交于 2019-12-11 10:49:47
问题 I have been trying to figure these 2 things out: 1) How do I change the whole row's color in code? Like, when the VT looks like a ListView? 2) How do I make the Checkboxes indent aswell? My child checkboxes and on the same "indent?" as my root checkboxes. Thanks! 回答1: 1) procedure VSTBeforeItemErase( Sender: TBaseVirtualTree; TargetCanvas: TCanvas; Node: PVirtualNode; ItemRect: TRect; var ItemColor: TColor; var EraseAction: TItemEraseAction); begin EraseAction := eaColor; ItemColor := clLime;

Delphi VirtualTreeview.OnAfterItemPaint issue when scrolling?

无人久伴 提交于 2019-12-11 06:14:37
问题 I'm getting issues drawing using OnAfterItemPaint event when horizontal scrolling is performed. Basically what I want to achieve is the merging of selected cells effect, say for example 1 text for column 1 & 2, another text for column 3 & 4, etc... So far VT doesn't have any support for column merging, so I have to manually draw it. Is there a workaround or another event that I should use instead? Using: Delphi 7 + VirtualTreeview 4.8.5 Event source: begin TargetCanvas.TextOut(ItemRect.Left+

how to draw nodes inline in TvirualTree?

风流意气都作罢 提交于 2019-12-11 04:22:12
问题 I am currently drawing some images inside Tvirtualdrawtree using on before paint. Here is my drawing code procedure TForm2.VDTAniBeforeCellPaint(Sender: TBaseVirtualTree; TargetCanvas: TCanvas; Node: PVirtualNode; Column: TColumnIndex; CellPaintMode: TVTCellPaintMode; CellRect: TRect; var ContentRect: TRect); var Data: PAnimeData; NewRect: TRect; R: TRect; begin // if not Assigned(Node) then begin exit; end; Data := VDTAni.GetNodeData(Node); case Column of 0, 1 ,2, 3, 4, 5, 6, 7: begin

Saving VirtualStringTree Node Data

妖精的绣舞 提交于 2019-12-11 02:37:46
问题 I am trying to move a project from D6 to D-XE3. I am getting garbage when saving and loading the tree data in the OnSaveNode and OnLoadEvents using version 5.10 of VirtualStringTree. I'm probably not handling Unicode correctly, but there could be some other ignorance on my part: procedure TfMain.vstGridSaveNode(Sender: TBaseVirtualTree; Node: PVirtualNode; Stream: TStream); var Data: PStkData; begin Data := Sender.GetNodeData(Node); // Owned: boolean; Stream.Write(Data.Owned, SizeOf(boolean)

Multiple Expanding Nodes in Virtual TreeView possible?

拜拜、爱过 提交于 2019-12-10 17:44:43
问题 I am using a TVirtualStringTree (part of the Virtual TreeView Component) in my Delphi project and I would like to create a view where 2 columns can have children that are expandable/collapsable with [+] sign. In the picture below as sample I would like to have a [+] sign in the Server Column but also in the Image column. The idea is that the tree has several Server nodes that each have many process child's (which main colum is image) and some processes have sub-processes which are children of

How can I hide a TVirtualStringTree node?

北城以北 提交于 2019-12-10 15:14:09
问题 if I'm not mistaken it's not possible to have invisible nodes in a TVirtualStringTree treeview, as there are no enabled, visible or other properties to do so. Am I right about this? If yes, how did I manage to have a non visible node? Structure of my tree: One Node Another node Subnode 1 Subnode 2 ... Subnode 15 Subnode 16 (which is not visible!) Yet another node Subnode 1 from yet another node Subnode 2 from yet another node I can find Subnode 16 when I do a FirstNode/GetNextNode loop over

How to display an icon or image in a column of TVirtualStringTree?

末鹿安然 提交于 2019-12-10 14:43:47
问题 In a Delphi VCL project, I have created a simple TVirtualStringTree with two columns. The first column will contain text identifying the Name of the data being represented. The data record also contains a status field. The second column is intended to represent the status of the record using an image (16x16 pixel) w/o text. I have searched demos, but have not mastered the full process for how VTV displays a node, and have not been successful in getting an icon to display in the node of a