我如何更改选定的标题页颜色vb.net ?? [英] how do i change selected tab header color vb.net ??

查看:79
本文介绍了我如何更改选定的标题页颜色vb.net ??的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好。我自己创建了一个自定义tabcontrol。现在问题是,我希望活动标签的标题颜色为蓝色,非活动标签的标题颜色为黑色

hello.I have created a custom tabcontrol myself.Now the problem is, i want the active tab's header color to be blue and the inactive tab's header color to be black

这是我的代码:

我做错了什么?

推荐答案

你制作了这段代码?当你在绘画事件中使用e.graphics绘制时,你不必制作位图。

You made this code? You don't have to make a bitmap when you have e.graphics to draw upon in a paint event.

            If TabControl1.SelectedIndex = e.Index Then
                g.FillRectangle(New SolidBrush(Color.Blue), x1)
            Else
                g.FillRectangle(New SolidBrush(Color.Black), x1)

            End If





这篇关于我如何更改选定的标题页颜色vb.net ??的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆