Foxtable(狐表)用户栏目专家坐堂 → [求助]如何用系统命令点击调用筛选功能


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

主题:[求助]如何用系统命令点击调用筛选功能

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


加好友 发短信
等级:幼狐 帖子:60 积分:522 威望:0 精华:0 注册:2020/6/30 15:06:00
[求助]如何用系统命令点击调用筛选功能  发帖心情 Post By:2021/4/28 16:05:00 [只看该作者]

如何用系统命令点击调用筛选功能
图片点击可在新窗口打开查看

 回到顶部
帅哥,在线噢!
有点蓝
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:111393 积分:567029 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/4/28 16:13:00 [只看该作者]


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


加好友 发短信
等级:幼狐 帖子:60 积分:522 威望:0 精华:0 注册:2020/6/30 15:06:00
  发帖心情 Post By:2021/4/28 16:15:00 [只看该作者]

我已经有了自定义菜单了,但是现在右键的筛选功能看不到了,现在想通过系统命令调用筛选功能

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


加好友 发短信
等级:狐精 帖子:3223 积分:21401 威望:0 精华:0 注册:2016/3/28 16:57:00
  发帖心情 Post By:2021/4/28 16:28:00 [只看该作者]

筛选功能代码没加进去吧,如果调用系统的,可以用系统的代码:

'...
Dim t As Table = CurrentTable
Dim m As RibbonMenu.MenuButton = e.MenuButton
Dim c As Col = t.Cols(t.ColSel)
Dim Less As RibbonMenu.Button = CType(m.Items("Less"), RibbonMenu.Button)
Dim LessOrEqual As RibbonMenu.Button = CType(m.Items("LessOrEqual"), RibbonMenu.Button)
Dim More As RibbonMenu.Button = CType(m.Items("More"), RibbonMenu.Button)
Dim MoreOrEqual As RibbonMenu.Button = CType(m.Items("MoreOrEqual"), RibbonMenu.Button)
Dim Equal As RibbonMenu.Button = CType(m.Items("Equal"), RibbonMenu.Button)
Dim NotEqual As RibbonMenu.Button = CType(m.Items("NotEqual"), RibbonMenu.Button)
Dim SamePeriod As RibbonMenu.MenuButton = CType(m.Items("SamePeriod"), RibbonMenu.MenuButton)
Dim Period As RibbonMenu.MenuButton = CType(m.Items("Period"), RibbonMenu.MenuButton)
Dim Separator As RibbonMenu.Separator = CType(m.Items("Separator"), RibbonMenu.Separator)
Dim StringFilter As RibbonMenu.MenuButton = CType(m.Items("StringFilter"), RibbonMenu.MenuButton)
Dim ValueFilter As RibbonMenu.MenuButton = CType(m.Items("ValueFilter"), RibbonMenu.MenuButton)
Dim FilterTrue As RibbonMenu.Button = CType(m.Items("FilterTrue"), RibbonMenu.Button)
Dim FilterFalse As RibbonMenu.Button = CType(m.Items("FilterFalse"), RibbonMenu.Button)
Dim Null As RibbonMenu.Button = CType(m.Items("Null"), RibbonMenu.Button)
Dim NotNull As RibbonMenu.Button = CType(m.Items("NotNull"), RibbonMenu.Button)
If c.IsDate Then
    ValueFilter.Text= "日期筛选"
ElseIf c.IsNumeric Then
    ValueFilter.Text= "数值筛选"
End If
If t.Position < 0 Then
    FilterTrue.Visible = False
    FilterFalse.Visible = False
    Less.Visible = False
    LessOrEqual.Visible = False
    More.Visible = False
    MoreOrEqual.Visible = False
    Equal.Visible = False
    NotEqual.Visible = False
    SamePeriod.Visible = False
    Separator.Visible = False
    Period.Visible = c.IsDate
    Return
Else
    Period.Visible = c.IsDate
    SamePeriod.Visible = c.IsDate
    Separator.Visible = c.IsDate Or c.IsString Or c.IsNumeric
    StringFilter.Visible = c.IsString
    ValueFilter.Visible = c.IsDate Or c.IsNumeric
    If c.IsDate Then
        SamePeriod.Items("Hour").Visible = (c.DataCol.DateTimeFormat <> DateTimeFormatEnum.Date)
        SamePeriod.Items("Minute").Visible = (c.DataCol.DateTimeFormat <> DateTimeFormatEnum.Date)
    End If
End If
If c.IsBoolean Then
    FilterTrue.Visible = True
    FilterFalse.Visible = True
    Equal.Visible = False
    NotEqual.Visible = False
    Less.Visible = False
    More.Visible = False
    LessOrEqual.Visible = False
    MoreOrEqual.Visible = False
    Null.Visible = False
    NotNull.Visible = FAlse
Else
    FilterTrue.Visible = False
    FilterFalse.Visible = False
    Equal.Visible = True
    NotEqual.Visible = True
    Null.Visible = True
    NotNull.Visible = True
    If t.Current.IsNull(t.ColSel) OrElse c.IsString Then
        Less.Visible = False
        More.Visible = False
        LessOrEqual.Visible = False
        MoreOrEqual.Visible = False
    Else
        Less.Visible = True
        More.Visible = True
        LessOrEqual.Visible = True
        MoreOrEqual.Visible = True
    End If
End If
If t.Current.IsNull(t.ColSel) Then
    Equal.Visible = False
    NotEqual.Visible = False
    m.Items("SamePeriod").Visible = False
ElseIf c.IsString Then
    Dim v As String = t.Text
    If v > "" AndAlso v.Length > 15 then
        v = v.SubString(0,15) & "..."
    End If
    Equal.Text = "等于 """ & v  & """"
    NotEqual.Text = "不等于 """ & v & """"
ElseIf c.IsNumeric Then
    Equal.Text = "等于 " & t.Text
    NotEqual.Text = "不等于 " & t.Text
    Less.Text = "小于 " & t.Text
    LessOrEqual.Text = "不大于 " & t.Text
    More.Text = "大于 " & t.Text
    MoreOrEqual.Text = "不小于 " & t.Text
ElseIf c.IsDate Then
    Equal.Text = "等于 " & t.Text
    NotEqual.Text = "不等于 " & t.Text
    Less.Text = "早于 " & t.Text
    More.Text = "晚于 " & t.Text
    LessOrEqual.Text = "不晚于 " & t.Text
    MoreOrEqual.Text = "不早于 " & t.Text
End If


 回到顶部
帅哥,在线噢!
有点蓝
  5楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:111393 积分:567029 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/4/28 16:38:00 [只看该作者]

新建一个项目,导入系统菜单,可以查看原系统菜单的代码

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


加好友 发短信
等级:幼狐 帖子:60 积分:522 威望:0 精华:0 注册:2020/6/30 15:06:00
  发帖心情 Post By:2021/4/28 16:46:00 [只看该作者]

如何导入系统菜单呢

 回到顶部
帅哥,在线噢!
有点蓝
  7楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:111393 积分:567029 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/4/28 16:48:00 [只看该作者]

菜单设计-》左下角模板按钮-》从模板导入

模板在foxtable安装目录

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


加好友 发短信
等级:幼狐 帖子:60 积分:522 威望:0 精华:0 注册:2020/6/30 15:06:00
  发帖心情 Post By:2021/4/28 16:50:00 [只看该作者]

Dim m As RibbonMenu.MenuButton = e.MenuButton
这句话什么意思, 这个报错

 回到顶部
帅哥,在线噢!
有点蓝
  9楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:超级版主 帖子:111393 积分:567029 威望:0 精华:9 注册:2015/6/24 9:21:00
  发帖心情 Post By:2021/4/28 16:54:00 [只看该作者]

这个代码是放在菜单筛选按钮的MouseEnter事件里的,不能放到其它地方使用

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


加好友 发短信
等级:幼狐 帖子:60 积分:522 威望:0 精华:0 注册:2020/6/30 15:06:00
  发帖心情 Post By:2021/4/28 16:57:00 [只看该作者]

嗯,我试试

 回到顶部
总数 11 1 2 下一页