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
  1. Home
  2. General Programming
  3. .NET (Core and Framework)
  4. Listview and Event on Compact .net fw

Listview and Event on Compact .net fw

Scheduled Pinned Locked Moved .NET (Core and Framework)
questioncsharphelp
1 Posts 1 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.
  • P Offline
    P Offline
    Paolo Ponzano
    wrote on last edited by
    #1

    Hello, I'm trying to develop a simple Explorer, just to kill time, I've got a problem for what concern context menu and listview's item. I try to explain at my best. I tryied to use this.listView1.ItemActivate += new System.EventHandler(this.item_Selected); to catch ItemActivate event and here's the function's code private void item_Selected(object sender, System.EventArgs e) { try { ListViewItem currentItem = this.listView1.FocusedItem; ---> currentItem.ListView.ContextMenu = itemMenu; FileInfo f = new FileInfo(currentItem.Text); //FileInfo f = new FileInfo(currentItem.Text); if(f.Attributes == System.IO.FileAttributes.Directory) how do I reset the context to default one when no item are selected? and why I've difficulties to unselect the line I checked?? is a problem of itemactivate event?? Thanks Paolo

    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