以文本方式查看主题

-  Foxtable(狐表)  (http://foxtable.com/bbs/index.asp)
--  专家坐堂  (http://foxtable.com/bbs/list.asp?boardid=2)
----  请教:备注列窗口的“自动隐藏”问题  (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=143590)

--  作者: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编辑过]

--  作者:有点蓝
--  发布时间:2019/11/29 9:11:00
--  
这玩意处理不了,我也搞不定
--  作者:y2287958
--  发布时间:2019/11/29 19:51:00
--  
有哪位玩非主流的大师看看?逛逛?先谢了