David Du

David Du

  • NA
  • 1
  • 24.1k

Help: Ownerdraw TabControl

Aug 26 2010 4:17 AM
Hi, nildo,
I want to create a MyTabControl based on TabControl. By rewriting OnPaint() I draw tabarea and tad head, all works but I can not make background transparent. The background is alway be filled by grey color. I can only fill it by other color but can not make it transparent. TabControl can make background transparent itself.

I tried the way as below.
            SetStyle(ControlStyles.SupportsTransparentBackColor, true);
            this.BackColor = Color.Transparent;
But it does not work. It looks like that the background is filled with grey by some code before my OnPaint() is called.

Thanks.
David.

Answers (1)