I am trying to custom draw a tabcontrol. When I draw the tabs using the dimensions returned by GetTabRect
, the tabs are drawn noticeably wider when compared to how they are normally drawn. I thought it was trying to make room for an image, but I have no images defined for the tabs. Why would GetTabRect
return a wider size?
Don't know if this has anything to do with it, but here is how I set it to owner draw in the custom TabControl constructor.
this.SetStyle(ControlStyles.UserPaint | ControlStyles.AllPaintingInWmPaint |
ControlStyles.DoubleBuffer | ControlStyles.ResizeRedraw |
ControlStyles.SupportsTransparentBackColor, true);