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. Paint Event Handler [modified]

Paint Event Handler [modified]

Scheduled Pinned Locked Moved C#
debuggingjsonhelp
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
    printscreen12345
    wrote on last edited by
    #1

    The paint event is handled upon a form is loaded: Panel.Paint += new System.Windows.Forms.PaintEventHandler(Panel_Paint); And I have added the panel.Invalidate() method in the treeView1_AfterSelect event. There are unwanted text for the default node. But when I select another node and get back to the default node, the unwanted text is gone. I tried to debug it and accidentally found that the paint event is handled even without the Invalidate() method (well, it works for the first few nodes but not the rest). I'm just wondering how does the program know when to paint those text - ie. when it is triggered to paint. It seemed to me that only the text for the default node has been painted twice. So if I can understand how the paint event is triggered, that might help to confirm whether it has been painted twice. -- modified at 3:40 Friday 23rd June, 2006

    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