简体   繁体   English

C#TabControl更改标题栏背景色

[英]C# TabControl change headers bar backcolor

I figured out, with the help of a post in this website, how to redraw each item in a TabControl, which gave me a very satisfying result. 我在该网站上的帖子的帮助下弄清楚了如何在TabControl中重新绘制每个项目,这给了我非常令人满意的结果。

There is just one thing i need to change, and i can't figure out where exactly to look.. The background color of the headers bar. 我只需要更改一件事,我就无法弄清楚到底要看哪里。标题栏的背景色。

Like this 像这样

Does anyone know how to change that ? 有谁知道该如何改变? Thanks in advance ! 提前致谢 !

sorry for the delay. 抱歉耽搁了。 I got it working by adding 我通过添加来使其工作

this.SetStyle(ControlStyles.UserPaint,true);

So that i control the OnBackgroundPaint. 这样我就可以控制OnBackgroundPaint。 Then i override the method to draw the TabControl myself ^^ 然后我重写了自己绘制TabControl的方法^^

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM