JamesC Posted November 26, 2022 Share Posted November 26, 2022 Tried to move treenode in first level of a treeview, exception raised with ACCESS_VIOLATION message. Code is shown below and it can be run properly in VCL application (change variables from TUniTreeNode to TTreeNode). // Move up TreeNode in same level procedure TFrameMachineGroup.UniToolButton1Click(Sender: TObject); var tnSrc, tnDst: TUniTreeNode; begin tnSrc := UniTreeView1.Selected; tnDst := tnSrc.GetPrevSibling; if tnDst <> nil then tnSrc.MoveTo(tnDst, naInsert); tnSrc.Selected := True; end; This code can run properly for other nodes under first level. Any mistake in my code? Thanks. Testing with 1.90.0.1555 Trial. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.