RadioButtons无法正常突出显示 [英] RadioButtons Not Highlighting Normally

查看:86
本文介绍了RadioButtons无法正常突出显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的表单上,我有4个RadioButtons,每个都将其外观设置为'Button'。在我的程序中,我更改了每个RadioButton的ForeColour,BackColour和AutoCheck状态,如下所示:

On my form, I have 4 RadioButtons, each with it's appearance set to 'Button'. In my program, I change each of these RadioButtons' ForeColour, BackColour and AutoCheck status, as below:

ARadioButton.AutoCheck = False
ARadioButton.BackColor = Color.FromKnownColor(KnownColor.ControlLightLight)
ARadioButton.ForeColor = Color.FromKnownColor(KnownColor.ControlDark)



但是,稍后,我将这些属性重置为默认值:


However, later on, I reset these properties back to default:

ARadioButton.AutoCheck = True
ARadioButton.BackColor = DefaultBackColor
ARadioButton.ForeColor = DefaultForeColor



我的问题是,而不是整个按钮突出显示(点击后)这个变化,只有外部亮点,如下图所示。

最初:

http://i30.photobucket.com/albums/c339/JOFA666/Original_zpsd8b20ef3.png [ ^ ]

更改后,RadioButtons重置:

http://i30.photobucket.com/albums/c339/JOFA666/AfterChanges_zpsa23824c0。 png [ ^ ]

我知道这可能看起来很卑鄙,但我希望整个按钮突出显示用户点击RadioButton时,而不仅仅是外部。有没有办法我能以某种方式重置这个?

感谢您的帮助!


My issue is that instead of the entire button highlighting (when clicked on) after this change, only the outside highlights, as in the images below.
Originally:
http://i30.photobucket.com/albums/c339/JOFA666/Original_zpsd8b20ef3.png[^]
After changes made, and RadioButtons reset:
http://i30.photobucket.com/albums/c339/JOFA666/AfterChanges_zpsa23824c0.png[^]
I know this may seem menial, but I would like the entire button to highlight when the user clicks on the RadioButton, not just the outside. Is there a way I could somehow reset this?
Thanks for the help!

推荐答案

重置的解决方案很简单:

The solution for resetting is simply:
ARadioButton.BackColor = Color.Transparent


这篇关于RadioButtons无法正常突出显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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