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. C#
  4. Bug in ListView .NET 2.0?

Bug in ListView .NET 2.0?

Scheduled Pinned Locked Moved C#
helpcsharpalgorithmsbeta-testingquestion
2 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.
  • G Offline
    G Offline
    gumi_r msn com
    wrote on last edited by
    #1

    Or am I doing something wrong? I'm creating a column sortable Listview and I want to give the user some visual feedback on which column is sorted and all that stuff, aka a sorting arrow. In order to do that I'm activating OwnerDraw and then in all the protected overriden methods (OnDrawItem, OnDrawSubItem, etc) I'm setting DefaultDraw=true; The only painting I'm really handling is inside OnDrawColumnHeader. I have everything working fine with XP themes and all using the VisualStyle namespace but there's one bug I can't seem to fix: The DrawListViewColumnHeaderEventArgs has a property which gives you the ListViewItemStates of the header. The ones I'm interested in are Default, Hot and Selected. The bug is that the Hot state never seems to activate, when you mouse over the header, the e.State property does not change and remains 0 or default. This makes it imposible to correctly render a themed header as it I can't detect when I have to paint a hot header. I've tried using Rectancle.Contains(Cursor) but that runs into tons of problems when moving cursor from one header to another. Anyone know if this is a known issue or am I doing something wrong? thanks

    G 1 Reply Last reply
    0
    • G gumi_r msn com

      Or am I doing something wrong? I'm creating a column sortable Listview and I want to give the user some visual feedback on which column is sorted and all that stuff, aka a sorting arrow. In order to do that I'm activating OwnerDraw and then in all the protected overriden methods (OnDrawItem, OnDrawSubItem, etc) I'm setting DefaultDraw=true; The only painting I'm really handling is inside OnDrawColumnHeader. I have everything working fine with XP themes and all using the VisualStyle namespace but there's one bug I can't seem to fix: The DrawListViewColumnHeaderEventArgs has a property which gives you the ListViewItemStates of the header. The ones I'm interested in are Default, Hot and Selected. The bug is that the Hot state never seems to activate, when you mouse over the header, the e.State property does not change and remains 0 or default. This makes it imposible to correctly render a themed header as it I can't detect when I have to paint a hot header. I've tried using Rectancle.Contains(Cursor) but that runs into tons of problems when moving cursor from one header to another. Anyone know if this is a known issue or am I doing something wrong? thanks

      G Offline
      G Offline
      gumi_r msn com
      wrote on last edited by
      #2

      bump! Anyhelp plz?

      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