Treeview - different pics for nodes?

Discussion in 'Questions (Windows Mobile)' started by token, Jul 14, 2007.

  1. token

    token Member Licensed User

    Hello,

    is it possible to change the picture of a single node in a treeview, or at least to deactivate the picture for single nodes? I plan to make some kind of file manager and listet files shouldn't have a directory symbol.

    Thanks for any help!
     
  2. Erel

    Erel Administrator Staff Member Licensed User

    You can set the image of each node.
    Use Node.ImageIndex and set it to the index of the image you want.
     
  3. token

    token Member Licensed User

    Thank you very much for your help, Erel but somehow it doesn't work for me. I'am using your treeview-example and tryed it with control(node).imageindex and node2.imageindex in the findfolders-sub, but without success. control(node).imageindex within the findfolders loop always changes the whole tree and node2.imageindex brings a compiler error.

    Perhaps you have some further adwise for me?

    Thanks in advance and nice regards:

    token
     
  4. Erel

    Erel Administrator Staff Member Licensed User

    Attached is a small modification to FolderChooser example which also shows files.
    The files icons are different than the folders icons.
     

    Attached Files:

    Last edited: Mar 21, 2008
  5. token

    token Member Licensed User

    Many thanks Erel! I'll try it now.
     
Loading...