Foxtable(狐表)用户栏目专家坐堂 → 如何根据条件显示快捷菜单


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

主题:如何根据条件显示快捷菜单

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


加好友 发短信
等级:九尾狐 帖子:2609 积分:16926 威望:0 精华:11 注册:2011/9/20 16:13:00
如何根据条件显示快捷菜单  发帖心情 Post By:2012/9/26 8:57:00 [显示全部帖子]

With Tables("凭证")
    If .Current IsNot Nothing
        If .Current.IsNull("经手人") Then
            MessageBox.Show("请先选择经手人","提示",MessageBoxButtons.OK,MessageBoxIcon.Information)
            For Each itm As RibbonMenu.ContextCommand In e.ContextMenu.Items
                itm.Visible = False
            Next
        Else
            For Each itm As RibbonMenu.RibbonItem In e.ContextMenu.Items
                itm.Visible = True
            Next
        End If
    End If
End With

 

上面的代码是不是繁琐了,还有别的写法吗?


 回到顶部