Results 1 to 5 of 5

Thread: Delphi 7 > Treeview help

  1. #1

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253

    Delphi 7 > Treeview help

    Last thread....promise

    Ok, ive assigned a TImagelist which contains 3 images. (Index 0,1,2) to a TTreeview. The screenshot shown gives you an idea of what im doing.

    I have managed to get the correct picture of the root node, and the sub one. If you notice on the root node, the icon is a closed folder. What i want, is to determine if the root node is open (showing sub items), and if so i want to change the closed folder to open a folder.

    Index 0 = Closed folder
    Index 1 = Open folder
    Attached Images Attached Images  

  2. #2

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    And also, how to count how many sub items there are in a Treeview, and display the number in a Statusbar

  3. #3
    Retired VBF Adm1nistrator plenderj's Avatar
    Join Date
    Jan 2001
    Location
    Dublin, Ireland
    Posts
    10,359
    1) Could you check the current image of the node - and if its open, then you know its open ....

    2) Use a recursive algorithm
    Microsoft MVP : Visual Developer - Visual Basic [2004-2005]

  4. #4

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    1) thanks for the reply

    2) I can get it to change when the node is open, but cant change the image back when its closed

    3) Dont knw how, simply put

    4) Make a delphi forum, and it will keep the chit-chat people happy

  5. #5

    Thread Starter
    Supreme User Madboy's Avatar
    Join Date
    Oct 2003
    Location
    England
    Posts
    3,253
    And how to use a TEdit textbox to search through each node to find a match?

    U here Corona

    EDIT: Alternatively, does anoybody know how to do this in VB? If so, please share code and ill try converting it to Delphi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width