Results 1 to 10 of 10

Thread: [Help...] A problem with treeview.

  1. #1

    Thread Starter
    Fanatic Member manhit45's Avatar
    Join Date
    May 2009
    Location
    Ha noi - Viet Nam
    Posts
    826

    [Help...] A problem with treeview.

    I have a treeview which have a listimage. And it has imageselectindex property (image is yellow ball)

    My problem is : When i click any node, the image of that node shows imageselectindex . I only want thirth child node will show it. I dont want when i click at first node (rootnode) or child of roodnode , the yellow ballon shows.

    Last edited by manhit45; Jul 19th, 2009 at 12:43 PM.
    --***----------***-----

    If i help you please rate me.

    Working with Excel * Working with String * Working with Database * Working with array *

    K51 ĐH BÁCH KHOA HÀ NỘI - Khoa CNTT pro.

  2. #2
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [Help...] A problem with treeview.

    You might need to stop using the SelectedImageIndex property, and instead handle the AfterSelect method, and "manually" set the image of the selected node, and reset the image of the previously selected node, depending on its "level" in the tree.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  3. #3

    Thread Starter
    Fanatic Member manhit45's Avatar
    Join Date
    May 2009
    Location
    Ha noi - Viet Nam
    Posts
    826

    Re: [Help...] A problem with treeview.

    Quote Originally Posted by Atheist View Post
    You might need to stop using the SelectedImageIndex property, and instead handle the AfterSelect method, and "manually" set the image of the selected node, and reset the image of the previously selected node, depending on its "level" in the tree.
    I though same you. But i cant stop this propety .

    There is not none option for SelectedImageIndex. I used :

    Code:
      TreeView1.SelectedNode.ImageIndex = Nothing
    But it didnt work. Please tell me.
    --***----------***-----

    If i help you please rate me.

    Working with Excel * Working with String * Working with Database * Working with array *

    K51 ĐH BÁCH KHOA HÀ NỘI - Khoa CNTT pro.

  4. #4
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [Help...] A problem with treeview.

    I believe -1 would be the default value for that property.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  5. #5

    Thread Starter
    Fanatic Member manhit45's Avatar
    Join Date
    May 2009
    Location
    Ha noi - Viet Nam
    Posts
    826

    Re: [Help...] A problem with treeview.

    Quote Originally Posted by Atheist View Post
    I believe -1 would be the default value for that property.

    All values of that property is a list of image of listimage.
    --***----------***-----

    If i help you please rate me.

    Working with Excel * Working with String * Working with Database * Working with array *

    K51 ĐH BÁCH KHOA HÀ NỘI - Khoa CNTT pro.

  6. #6
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [Help...] A problem with treeview.

    What do you mean? You mentioned the SelectedImageIndex/ImageIndex properties, which are Integer properties.
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  7. #7

    Thread Starter
    Fanatic Member manhit45's Avatar
    Join Date
    May 2009
    Location
    Ha noi - Viet Nam
    Posts
    826

    Re: [Help...] A problem with treeview.

    Quote Originally Posted by Atheist View Post
    What do you mean? You mentioned the SelectedImageIndex/ImageIndex properties, which are Integer properties.
    Yes. But values of it is a list of images of listimage.
    --***----------***-----

    If i help you please rate me.

    Working with Excel * Working with String * Working with Database * Working with array *

    K51 ĐH BÁCH KHOA HÀ NỘI - Khoa CNTT pro.

  8. #8
    Raging swede Atheist's Avatar
    Join Date
    Aug 2005
    Location
    Sweden
    Posts
    8,018

    Re: [Help...] A problem with treeview.

    How can the values of an Integer property be anything else than integers? I'm getting confused... Are you thinking about the ImageList property?
    Rate posts that helped you. I do not reply to PM's with coding questions.
    How to Get Your Questions Answered
    Current project: tunaOS
    Me on.. BitBucket, Google Code, Github (pretty empty)

  9. #9

    Thread Starter
    Fanatic Member manhit45's Avatar
    Join Date
    May 2009
    Location
    Ha noi - Viet Nam
    Posts
    826

    Re: [Help...] A problem with treeview.

    Quote Originally Posted by Atheist View Post
    How can the values of an Integer property be anything else than integers? I'm getting confused... Are you thinking about the ImageList property?
    You try create a Imagelist named Imagelist1 and add some picture in it. Then You choose Imagelist treeview 's property is Imagelist1 '.
    Then all images of Imagelist1 will load to Selectedimageindex property.

    Please try and help me.
    --***----------***-----

    If i help you please rate me.

    Working with Excel * Working with String * Working with Database * Working with array *

    K51 ĐH BÁCH KHOA HÀ NỘI - Khoa CNTT pro.

  10. #10

    Thread Starter
    Fanatic Member manhit45's Avatar
    Join Date
    May 2009
    Location
    Ha noi - Viet Nam
    Posts
    826

    Re: [Help...] A problem with treeview.

    Any body met same problem with me. HELP ME PLEASE.
    --***----------***-----

    If i help you please rate me.

    Working with Excel * Working with String * Working with Database * Working with array *

    K51 ĐH BÁCH KHOA HÀ NỘI - Khoa CNTT pro.

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