Results 1 to 7 of 7

Thread: List View

  1. #1

    Thread Starter
    Junior Member
    Join Date
    May 2004
    Posts
    24

    List View

    Hi All!!

    I have this list view. How can i prevent a user from selecting items?

    Code:
    Mylistview.NoSelectItemsSomething = true;

    Thanks

  2. #2
    Fanatic Member brown monkey's Avatar
    Join Date
    Jun 2004
    Location
    Cebu
    Posts
    552
    mylistview.enabled=false???

  3. #3

    Thread Starter
    Junior Member
    Join Date
    May 2004
    Posts
    24
    No quite, because it gets shaded... i just want to disable that blue rectangle that appears when a user clicks an item.

  4. #4
    Hyperactive Member Sgt-Peppa's Avatar
    Join Date
    Mar 2003
    Location
    Munich - Germany
    Posts
    476
    Here you go!
    Code:
    listBox1.Items.Add("Hello");
    listBox1.Items.Add("World");
    listBox1.SelectionMode=System.Windows.Forms.SelectionMode.None;
    Stephan
    Keep Smiling - even if its hard
    Frankie Says Relax, wossname Says Yeah!
    wossname:--Currently I'm wearing a gimp suit and a parachute.
    C# - Base64 Blog

  5. #5

    Thread Starter
    Junior Member
    Join Date
    May 2004
    Posts
    24
    Thanks Peppa.



    But that doens't work on list views...

    It works perfectly on listboxes, problem is i need to uselist view to see the columns description....


    Is there a similar property on list views? I can't find it...


  6. #6
    Hyperactive Member Sgt-Peppa's Avatar
    Join Date
    Mar 2003
    Location
    Munich - Germany
    Posts
    476
    Oh I am sorry, I should have read more closely

    No I dont think there is something similar on Listview, but then again I am an amateur in GUI things!

    This will hide your selection once your listview looses focus:
    Code:
    lstView.HideSelection = true;
    Other than that, I am sorry I dont know!

    Stephan
    Keep Smiling - even if its hard
    Frankie Says Relax, wossname Says Yeah!
    wossname:--Currently I'm wearing a gimp suit and a parachute.
    C# - Base64 Blog

  7. #7

    Thread Starter
    Junior Member
    Join Date
    May 2004
    Posts
    24
    np Peppa,


    I try to use a listbox with labels for columns!



    Just want to congratulate you on your excelente base 64 Enconder - Decoder. I'm using parts of your code now.


    Thanks!!! Nice work there!!

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