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