none
sendmessage to select a treeview item? RRS feed

  • Question

  • hi..i have got a handle with me for a treeview. I have a text with me that corresponds to one of the node of the treeview. How can I with the help of that treeview handle select a node in treeview that matches with node text that I have. Searching some threads I need to use "sendmessage", but am not sure about the message type to be passed inside that.

    Can some one post a short code snippet....
    Monday, July 7, 2008 8:51 PM

Answers

  • Assuming that TreeView.SelectedNode is not accessible for some reason, look up TVM_SELECTITEM in the MSDN library.
    Hans Passant.
    • Marked as answer by Zhi-Xin Ye Monday, July 14, 2008 1:30 AM
    Wednesday, July 9, 2008 4:06 PM
    Moderator

All replies

  • Why are you considering SendMessage()?  Is this a TV in another application?
    Hans Passant.
    Monday, July 7, 2008 10:57 PM
    Moderator
  • actually, i need to write a small dll , that can augment a test tool which is unable to identify "treeviewadv" in its proper meaning. Hence, I need to programatically select certain nodes and its children, based on some input parameters.
    • Edited by js001 Monday, July 7, 2008 11:33 PM change of control name
    Monday, July 7, 2008 11:31 PM
  • do we have any help pointers for my question?
    Tuesday, July 8, 2008 4:13 PM
  • Who is "we"?  What is the proper meaning of "treeviewadv"?
    Hans Passant.
    Tuesday, July 8, 2008 6:03 PM
    Moderator
  • "treeviewadv" is a syncfusion  custom control. Its a control in their dll. It is somewhat similar to treeview.
    Tuesday, July 8, 2008 8:35 PM
  • So, why aren't you posting to a SyncFusion support forum?
    Hans Passant.
    Wednesday, July 9, 2008 12:12 AM
    Moderator
  • because i need to know how this is done for a "treeview", which is not syncfusion's control. Same approach can be used with a "treeviewadv". I am not sure on what mesage to be passed as an argument to sendmessage method in this case.
    Wednesday, July 9, 2008 3:45 PM
  • Assuming that TreeView.SelectedNode is not accessible for some reason, look up TVM_SELECTITEM in the MSDN library.
    Hans Passant.
    • Marked as answer by Zhi-Xin Ye Monday, July 14, 2008 1:30 AM
    Wednesday, July 9, 2008 4:06 PM
    Moderator