Results 1 to 9 of 9

Thread: Listview Disabling

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    UK
    Posts
    78
    When you:

    Listview1.Enabled = False

    it will obviously disable the 'Listview1' preventing anymore selecting e.t.c. of it's contents (report view).

    But this causes the listview display to be 'greyed' out.

    Is it possible to still disable the listview but NOT have it greyed out, so it's still white ?

    TIA

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    A simple way :
    Code:
    Private Sub ListView1_GotFocus()
      Command1.SetFocus
    End Sub
    or any other control on your form...
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    UK
    Posts
    78
    That doesn't work.

    If 3 items were selected from list, a certain operation is on item 1, clicking item 4 using above method would still deselect items 2 and 3.

    I still need it disabled so nothing else can be selected/de-selected......

    Anyone ?
    TIA

  4. #4
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    what is wrong with just disabling it? Just a visual preference?
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    UK
    Posts
    78
    yes

  6. #6
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Try subclassing the window and catching when the control receives the focus.

  7. #7
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Sydney Australia
    Posts
    804
    As a suggestion can you make the listbox the child of a picturebox?

    Code:
    Me.Picture1.Enabled = False

  8. #8

    Thread Starter
    Lively Member
    Join Date
    Aug 2000
    Location
    UK
    Posts
    78
    Ahh that's it.
    As it happens it was already a child in a picture box, disable the picture box disables clicking of the listview but left it 'normal' looking, thanks JamesM.

  9. #9
    Fanatic Member
    Join Date
    Nov 2000
    Location
    Sydney Australia
    Posts
    804

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