Click to See Complete Forum and Search --> : Ownerdraw TabControls, what's the secret?


Jay Tautges
February 20th, 2006, 12:57 PM
Hello everyone,

Personalizing the look of controls is something I like to do - so I'm trying it with the TabControl in my program. I've set the control's DrawMode to OwnerDrawFixed, and have added a DrawItem event handler.

But in the OnDrawItem function when I simply fill the tab with a solid color, there is still a 3D edge around the tab. Is there any way to stop the base class from drawing those edges, so we can draw it ourself?

Thanks,

Jay

stepi
February 21st, 2006, 03:17 PM
Hello,
I think the only way you get rid of those is set the control style UserPaint to true and then do the all the drawing by yourself.

MadHatter
February 21st, 2006, 04:49 PM
http://www.codeproject.com/cs/miscctrl/flattabcontrol.asp

Jay Tautges
February 22nd, 2006, 01:18 AM
Thanks,

UserPaint looks like what I was missing.