Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C#
  4. Ctrl+A short key in listview Box

Ctrl+A short key in listview Box

Scheduled Pinned Locked Moved C#
questiontutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    S K Y
    wrote on last edited by
    #1

    How can i select all the items in list box by pressing Ctrl+A i wrote the code to accept keys but i don't know how to highlite all the item in list view.

    if(e.Control == true & e.KeyCode == Keys.A)
    {
    listView1.....??????
    }

    A S E L A

    C S 2 Replies Last reply
    0
    • S S K Y

      How can i select all the items in list box by pressing Ctrl+A i wrote the code to accept keys but i don't know how to highlite all the item in list view.

      if(e.Control == true & e.KeyCode == Keys.A)
      {
      listView1.....??????
      }

      A S E L A

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      You can add to the SelectedItems collection.

      Christian Graus Driven to the arms of OSX by Vista. "I am new to programming world. I have been learning c# for about past four weeks. I am quite acquainted with the fundamentals of c#. Now I have to work on a project which converts given flat files to XML using the XML serialization method" - SK64 ( but the forums have stuff like this posted every day )

      1 Reply Last reply
      0
      • S S K Y

        How can i select all the items in list box by pressing Ctrl+A i wrote the code to accept keys but i don't know how to highlite all the item in list view.

        if(e.Control == true & e.KeyCode == Keys.A)
        {
        listView1.....??????
        }

        A S E L A

        S Offline
        S Offline
        sbscb
        wrote on last edited by
        #3

        for(int i = 0; i < listView1.items.count; i++) listView1.setSelected(i,true); Use the above loop to select each item.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups