VirtualTreeView what simple way to edit RootNode lazarus / 5-Lazarus Extra Components ---------------------------------------------------------------------- Shebuka · 2011-07-01 10:40 Hi, I have a tree with no columns, only 2 levels (root and a child of root) and i need to rename the root node and i can't come out on how to convalidate the editing. On popup click i take the first selected root node and call VST_UserContacts.EditNode(Node, -1); In VST_UserContactsEditing i assign Allowed := True; (because user can't 'click edit' the nodes, only from popup). Then i don't know how to get the edited text and assign it to the data record (it has RootNode, Name and Status fileds) associated with the node. Con you help me? p.s. I'v seen the demo, but it seems to be too complicated for my use, i don't need stringpick, combobox, memo or data calendar, only edit a generic string. ---------------------------------------------------------------------- LuizAmérico · 2011-07-04 20:34 Unfortunately VirtualTreeView has an steep learn curve So my advices: - Read the docs http://www.soft- gems.net/index.php?option=com_content&task=view&id=30&Itemid=35 - Study the demos - Search in the net ---------------------------------------------------------------------- IPguy · 2011-07-08 00:47 Shebuka, As I do not have your code, I'm going to guess at what you are attempting to do. In general: - Get the node id of the node you want to edit  "Node" - get the data handle associated with it "Data" - set the individual data fields from the user edited field or entry method. Code: [Select]Procedure TfSNMPGet.vstContextPopup( .... var   Node : pVirtualNode;   Data : pDevTreeData;    begin ...   // this returns the node under the cursor   Node := vst.GetNodeAt(MousePos.X, MousePos.Y);    // This gets the data structure associated with the above node   Data := vst.GetNodeData(Node);    Data.Column0 := Edit1.Text;  //  This might have to be ...Data^.C.... end;