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. Owner-Drawn TabControl

Owner-Drawn TabControl

Scheduled Pinned Locked Moved C#
helpcomtutorial
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.
  • D Offline
    D Offline
    Darryl Borden
    wrote on last edited by
    #1

    I am trying to program an owner-drawn tabcontrol. I am trying to enable the user of my tabcontrol the ability to specify a text color for the selected tab so that the selected tab stands out better. I have overridden the OnDrawItem method and am receiving the events just fine, but my problem is determining what tab that the OnDrawItem method is being called for. I just can't figure out how to take an x,y coordinate and turn it into which tab it corresponds to (expecially taking into account that there may be multiple rows of tabs and the tabs may be on the top or side of the tab control, etc). Any help would be greatly appreciated! Darryl Borden Principal IT Analyst dborden@eprod.com

    D 1 Reply Last reply
    0
    • D Darryl Borden

      I am trying to program an owner-drawn tabcontrol. I am trying to enable the user of my tabcontrol the ability to specify a text color for the selected tab so that the selected tab stands out better. I have overridden the OnDrawItem method and am receiving the events just fine, but my problem is determining what tab that the OnDrawItem method is being called for. I just can't figure out how to take an x,y coordinate and turn it into which tab it corresponds to (expecially taking into account that there may be multiple rows of tabs and the tabs may be on the top or side of the tab control, etc). Any help would be greatly appreciated! Darryl Borden Principal IT Analyst dborden@eprod.com

      D Offline
      D Offline
      Darryl Borden
      wrote on last edited by
      #2

      Never mind - I figured it out. It is passed as "Index" in the event args object! dpb Darryl Borden Principal IT Analyst dborden@eprod.com

      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