Foxtable(狐表)用户栏目专家坐堂 → [求助]窗口控件只读属性设置


  共有2388人关注过本帖树形打印复制链接

主题:[求助]窗口控件只读属性设置

帅哥哟,离线,有人找我吗?
zcgmxf
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:七尾狐 帖子:1649 积分:14629 威望:0 精华:0 注册:2014/6/6 8:42:00
[求助]窗口控件只读属性设置  发帖心情 Post By:2016/5/16 13:57:00 [显示全部帖子]

老师,我以前的一个窗口的控件的“只读”属性设为“true”后,控件就不能直接编辑了。怎么现在不行了?

 回到顶部
帅哥哟,离线,有人找我吗?
zcgmxf
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:七尾狐 帖子:1649 积分:14629 威望:0 精华:0 注册:2014/6/6 8:42:00
  发帖心情 Post By:2016/5/16 14:43:00 [显示全部帖子]

红袍老师,我想也不可能,在窗口的全局事件(Enter),我加入了下面一段代码就不行了。我不明白,属性设置应该是最高的权限啊。

Dim r As Row = Tables("登记总表").current
Dim km As WinForm.CheckBox = e.Form.Controls("CheckBox1")
Dim cs As WinForm.CheckBox = e.Form.Controls("CheckBox2")
Dim sc As WinForm.CheckBox = e.Form.Controls("CheckBox3")
If r IsNot Nothing Then
    For Each ctl As WinForm.Control In e.Form.Controls
        If  r("确认收费") = True Then
            km.ReadOnly = BooleanEnum.False
            sc.ReadOnly = BooleanEnum.False
            cs.ReadOnly = BooleanEnum.False
            ctl.ReadOnly = BooleanEnum.True
        Else
            ctl.ReadOnly = BooleanEnum.False
        End If
    Next
End If


 回到顶部