Is there a way to color tabs of a tabpage in winforms?

后端 未结 3 697
醉酒成梦
醉酒成梦 2020-12-14 01:16

I am struggling to find a way to color the tab headers of a tabpage in WinForms. There are solutions to color the current indexed tab using the OnDrawItem event

3条回答
  •  Happy的楠姐
    2020-12-14 01:54

    Using the current tab control, if it is possible you'd need to hook a lot of win-32 events (there may be a pre-wrapped implementation out there). Another alternative would be a 3rd-party tabbed control replacement; I'm sure plenty of vendors will sell you one.

    IMO, you might find it less pain to look at WPF; it is a big change, but has more control over things like this. You can host WPF inside winforms if needed (if you can't justify a full make-over, which is a pretty common reality).

提交回复
热议问题