-- 作者:y2287958
-- 发布时间:2019/11/28 21:16:00
-- 请教:备注列窗口的“自动隐藏”问题
因项目需要,用以下代码替代备注列原有的“自动隐藏”功能
For Each a As object In Tables("表A").grid.parent.controls For Each b As object In a.controls If Tables("表A").Cols.Contains(b.text) b.AutoHiding = not b.AutoHiding Exit For End If Next Next
以上代码如果备注列窗口不临时打开时操作很正常,但是一但鼠标停留在列窗口标题处列窗口临时打开时(如下图),再执行以上代码便出现以下提示,无法执行,请问如何避免?谢谢! --------------------------- 版本:2019.11.3.1 --------------------------- 代码执行出错,错误信息: System.MissingMemberException: 未找到类型"C1DockingTabPage"的公共成员"AutoHiding". 在 Microsoft.VisualBasic.CompilerServices.Symbols.Container.GetMembers(String& MemberName, Boolean ReportErrors) 在 Microsoft.VisualBasic.CompilerServices.NewLateBinding.ObjectLateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) 在 Microsoft.VisualBasic.CompilerServices.NewLateBinding.LateGet(Object Instance, Type Type, String MemberName, Object[] Arguments, String[] ArgumentNames, Type[] TypeArguments, Boolean[] CopyBack) 在 UserCode.Test() --------------------------- 确定 ---------------------------
此主题相关图片如下:1574946457(1).png

[此贴子已经被作者于2019/11/28 21:23:13编辑过]
|