如何在 vb.net 中为按钮设置自定义制表位颜色
我在 Windows 应用程序表单上放置了背景图像,当制表符停止到特定按钮时,它的颜色会发生变化并且看起来很尴尬...谁能告诉我如何为制表符设置一些自定义颜色或将其值设置为 null? ???
我已经尝试过 BalaR ie button.ShowFocusCues = falase in the load event of the form 的答案,但它说它不能像这样使用并且它受到保护
I have placed a background image on my windows application form and when tab stops to a particular button it's color is changed and looks awkward...Can anyone tell me that how can I set some customized color for tabstop or set its value to null????
I've tried the answer from BalaR i.e. button.ShowFocusCues = falase in load event of the form but it says that it can't be used like this and it is protected
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试ShowFocusCues
为 false隐藏焦点矩形。我没有注意到它是受保护的成员。您有两种选择
创建派生类并根据需要设置受保护成员。 (正确的方法)
您还可以设置
TabStop
为 false。如果您不希望按钮在选项卡循环期间获得焦点。
tryShowFocusCues
to falseto hide focus rectangle.I didn't notice it was a protected member. You have two options
create a derived class and set the protected member as you'd like. (the right way)
You can also set
TabStop
to false.if you don't want the button to obtain focus during tab cycle.