在功能区控件上切换禁用/启用 [英] Toggling Disable/Enable on a Ribbon Control

查看:77
本文介绍了在功能区控件上切换禁用/启用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

新年快乐!

随着新年的开始,我正在努力解决回调问题。  我知道我可以使用Albert Kallal的RibbonClass,但我只需要一个控件,并想学习如何使用回调。  我给了我最好的镜头,然后再转到
论坛。

With the start of the new year I'm trying to tackle callbacks.  I know I could use Albert Kallal's RibbonClass but I only need one control and would like to learn how to work with callbacks.  I gave this my best shot before turning once again to the forum.

推荐答案

嗨Joe,

感谢您发布新年快乐!

我在您身边使用您的代码并确实重现了问题。我通过在激活程序中添加一行来更改这样的代码:

I use your code on my side and indeed reproduce the problem. I changed the code like this by adding a line in the Activate procedure:

Private Sub Form_Activate()

DoCmd.Maximize

bolEnabled = True

gobjRibbon.InvalidateControl" cmdCloseForm"

End Sub

Private Sub Form_Activate()
DoCmd.Maximize
bolEnabled = True
gobjRibbon.InvalidateControl "cmdCloseForm"
End Sub

这似乎运作良好。看看这对你有用,并在你尝试后随时跟进。

which seems work well. See wether this works well on your side and feel free to follow up after you have tried.

最好的问候,


这篇关于在功能区控件上切换禁用/启用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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