按钮仍然显示为“突出显示”。点击后 [英] Buttons still appear "highlighted" after being clicked

查看:92
本文介绍了按钮仍然显示为“突出显示”。点击后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含一些按钮的表单。按钮使用访问2003附带的一些标准图像(例如,移动下一个记录图像,或排序升序/降序图像)。访问的默认行为是给按钮一个突出显示按钮。按钮悬停在鼠标上时的外观。


我的问题是这些按钮永久地具有突出显示的按钮。点击后的外观。使用我的XP主题,恰好是橙色边框。


奇怪的是,如果我有另一个控件略微重叠,我可以让按钮恢复正常状态。这在大多数情况下有效,但不是一个令人满意的解决方案。


所有按钮都在我的表单标题中。我不认为我在代码中做任何事情导致这种情况发生,但为了以防万一,我已经为下面的一个按钮添加了代码。


以前有没有人碰过这个?有谁知道如何确保按钮回到他们的正常状态。单击它们后的外观?

I have a form which contains some buttons. The buttons use some of the standard images that come with access 2003 (e.g., the move next record image, or the sort ascending/descending images). The default behavior for access is to give the button a "highlighted" appearance when the button is hovered with the mouse.

My problem is that these buttons permanently have that "highlighted" appearance after they have been clicked. With my XP theme, that happens to be an orange border.

Oddly enough, I can get the buttons to go back to their normal appearance if I have another control slightly overlapping them. This works in most cases, but is not a satisfactory solution.

All the buttons are in my form header. I don''t think I''m doing anything in code to cause this to happen, but just in case, I''ve included code for one of the buttons below.

Has anyone run across this before? Does anyone know how to ensure the buttons go back to their "normal" appearance after they have been clicked?

展开 | 选择 | Wrap | 行号

推荐答案

不确定为什么会这样。尝试在按钮点击事件代码的末尾添加Me.Refresh。


Mary
Not sure why this is happening. Try adding and Me.Refresh at the end of the button click event code.

Mary


玛丽,


感谢您的回复。不幸的是,没有运气.Re.Reresh。还有其他想法吗?


即使将Visible属性设置为False然后再返回True也不会重置它们的显示方式,它们仍会显示突出显示。他们被点击后永久存在。我也尝试了Me.Repaint,但也没用。


谢谢,

Dana
Mary,

Thanks for responding. No luck with the Me.Refresh, unfortunately. Any other ideas?

Even setting the Visible property to False and then back to True doesn''t reset the way they''re displayed, they still show that "highlight" permanently after they''ve been clicked. I also tried Me.Repaint, and that did not work either.

Thanks,
Dana


一件事似乎工作似乎是禁用/启用按钮。再说一次,这不是一个很好的解决方案...


但我想如果我们不能弄清楚为什么行为发生在一开始就行了。

One thing that does appear to work is to disable/enable the button. Again, this isn''t really a good solution...

But I guess it will work if we can''t figure out why the behaviour is happening in the first place.

展开 | 选择 < span class =codeDivider> | Wrap | 行号


这篇关于按钮仍然显示为“突出显示”。点击后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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