![]() |
#1
|
|||
|
|||
![]()
Hi and thanks in advanced for your help.
I have this function and procedure that finds a node based on a text, however after is found I need to simulate a mouse left clicking on the found item. Can anyone help me out on how to accomplish this is code Here is the link of the example http://delphi.about.com/od/vclusing/l/aa010703a.htm Now, once is found I need to click on this found item. Thanks |
#2
|
|||
|
|||
![]()
Please disregard I got the fix based on this post
http://stackoverflow.com/questions/1...r-intervention |
#3
|
|||
|
|||
![]()
I see you marked that you got the answer, but I'm not sure it's applicable to the question you asked. You asked to simulate a left click on the Node that is found. Not sure why you need to. If it's solely to have that node selected, then the code you linked to in your first post already does that...
Code:
procedure TForm1.Button1Click(Sender: TObject); var tn : TTreeNode; begin tn:=GetNodeByText(TreeView1,Edit1.Text,CheckBox1.Checked); ///**call the function that returns a TTreeNode ***/// if tn = nil then ///***if the TTreeNode is nil - No node found ***/// ShowMessage('Not found!') else begin ///*** Node was found if you get here ***/// TreeView1.SetFocus; tn.Selected := True; ///***as long as the function actually found a node ***/// ///*** set it as the selected node - this makes the ***/// ///** simulated left click irrelevant ***/// end; end; |
#4
|
|||
|
|||
![]()
Hi Major,
Sorry for the late reply. I thank you for the help. No, I know how to select the node, and based on the link I posted, that helped me to create the self click on the node. Once again, thank you for your help. Best regards |
![]() |
Thread Tools | |
Display Modes | |
|
|