virtualtreeview

Is it safe to access VT data from the other thread?

时光总嘲笑我的痴心妄想 提交于 2019-12-21 17:52:10
问题 Is it safe to change VirtualTreeView data from the secondary thread ? And if yes, should I use critical sections (or even Synchronize method) ? I'm afraid that when I'll be writing to the VT's data record from the other thread, main thread invokes its repaint meanwhile and this refresh will cause reading of the same record at one time. I would supplement I'm using only 2 threads in the application. Something like ... type PSomeRecord = ^TSomeRecord; TSomeRecord = record SomeString: string;

Is it possible to display one object multiple times in a VirtualStringTree?

早过忘川 提交于 2019-12-21 06:18:41
问题 I realize that I really need to rewrite my programs data structure (not now, but soon, as the deadline is monday), as I am currently using VST (VirtualStringTree) to store my data. What I would like to achieve, is a Contact List structure. The Rootnodes are the Categories, and the children are the Contacts. There is a total of 2 levels. The thing is though, that I need a contact to display in more than 1 category, but they need to be synchronized. Particularly the Checkstate . Currently, to

How to reliably scroll Virtual TreeView to the bottom?

左心房为你撑大大i 提交于 2019-12-19 02:51:45
问题 A TVirtualStringTree object with custom node height, How to reliably scroll Virtual TreeView to the bottom (i.e. the scrollbar gets to the bottom)? I tried calling tree1.FullExpand then tree1.ScrollIntoView.(tree1.GetLast) , but it does not work. Thank you in advance. 回答1: ScrollIntoView works well for me. You can also try tree1.FocusedNode := tree1.GetLast; Are you setting custom node height in OnMeasureItem event? If it doesn't work, try to set tree's DefaultNodeHeight to the bigger value

How do you drag and drop a file from Explorer Shell into a VirtualTreeView control in a Delphi application?

拟墨画扇 提交于 2019-12-18 12:32:37
问题 There is extensive drag and drop support in VirtualTreeView by Mike Lischke, and I am using TVirtualStringTree, which has some on-drag-and-drop events, but I can not figure out how to get it to accept a shell drag-and-drop of some files from the windows explorer shell, into my application. I want to load the files, when they are dragged onto the drop control. I tried using a third-party set of code from Anders Melander, to handle drag and drop, but because VirtualTreeView already registers

Tree-like Datastructure (for use with VirtualTreeview)

纵饮孤独 提交于 2019-12-18 03:47:17
问题 I have come to the point where I need to stop storing my data in a VCL component, and have an "underlying datastructure", as Mr. Rob Kennedy suggested. First of all, this question is about "how do I make an underlying datastructure". :) My hierachy consists of 2 levels of nodes. Right now, I go thru my stuff by looping rootnodes, wherein I loop thru the rootnode's childnodes, to get what I need (Data). I would love to be able to store all my data in a so-called Underlying Datastructure, so

When to redraw VirtualTreeView after OnNewText event?

旧巷老猫 提交于 2019-12-14 03:49:25
问题 I use this code to fill VirtualStringTree and allow renaming items: //--------------------------------------------------------------------------- // Structure for the tree //--------------------------------------------------------------------------- struct TVSTdata { UnicodeString Name; }; //--------------------------------------------------------------------------- // Initialization of the tree //--------------------------------------------------------------------------- __fastcall TForm1:

TVirtualStringTree. How to check a node and its children with a single confirmation?

偶尔善良 提交于 2019-12-13 03:29:46
问题 I have a component of type TVirtualStringTree . The option toCheckSupport is enabled. The options related to the propagation of checkstates are also enabled, because the propagation is needed. I want to implement checking a node with a confirmation ("Are you sure you want to check... ?"). Unfortunately, if the options for propagation are enabled, the events OnCheck and OnChecking are triggered including for the child nodes. Therefore, placing the message in the event procedures make it show

NTWaitforMultipleObjects error when freeing DLL in Delphi with TVirtualTreeView

[亡魂溺海] 提交于 2019-12-13 02:47:33
问题 TVirtualTreeview is pretty much awesome, but many times when I close an window referenced by a DLL in my project that has a TVirtualTreeview in it I get the NTWaitForMultipleObjects error. The problem is somewhere deep in TVirtualTreeview and other guys in the office have tried lots of stuff to fix it, I was just wondering if anyone else has had a similar issue in Delphi 7. Or if it's fixed in 2009, because we've got that and are planning on upgrading our code (err.. beating our heads into

Icon position in Virtual Treeview

删除回忆录丶 提交于 2019-12-13 02:38:14
问题 I'm setting the icon in a Virtual Treeview in its OnGetImageIndex event. It works, but the icon is positioned directly at the left edge of the node (x=0). I'd like to move it a little bit to the right, but I can't find any way to do this. An alternative would be to draw the icon manually, but I'm wondering if there's an easy way to position the icon that I'm overseeing. 来源: https://stackoverflow.com/questions/37167702/icon-position-in-virtual-treeview

Virtual StringTree's hint windows are left out on the screen

南楼画角 提交于 2019-12-13 01:25:44
问题 See this screenshot, in the middle it's the small hint windows that are generated by a TVirtualStringTree control and were left out on the screen, these hint windows will remain there until the application exits. the problem happens when the treeview's hint is shown and the mouse leaves quickly to the window next to it. Any idea about how to avoid this or how to clear those un-erased hint windows if it's difficult to avid this? Few days ago I asked a similar question, while the hint windows