在我的表单上,我有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我的问题是,而不是整个按钮突出显示(点击后)这个变化,只有外部亮点,如下图所示。 最初: i30.photobucket/albums/c339/JOFA666/Original_zpsd8b20ef3.png [ ^ ] 更改后,RadioButtons重置: i30.photobucket/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: i30.photobucket/albums/c339/JOFA666/Original_zpsd8b20ef3.png[^] After changes made, and RadioButtons reset: i30.photobucket/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无法正常突出显示
发布评论