Foxtable(狐表)用户栏目专家坐堂 → [求助]重设显示列后的自动行高


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

主题:[求助]重设显示列后的自动行高

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


加好友 发短信
等级:童狐 帖子:257 积分:4375 威望:0 精华:0 注册:2011/7/5 9:38:00
[求助]重设显示列后的自动行高  发帖心情 Post By:2020/7/1 17:15:00 [显示全部帖子]

如题:
Dim dts() As String = {"第一列","第三列","第四列","第七列"}
For Each cl As Col In Tables("表A").Cols
    If Array.IndexOf(dts, cl.Name) >= 0 Then
        Tables("表A").Cols(cl.Name).Visible = True
    Else
        Tables("表A").Cols(cl.Name).Visible = False
    End If
Next

For Each cl As Col In Tables("表A").Cols
    If Tables("表A").Cols(cl.Name).Visible = True
        仅对"表A"显示列的自动行高代码
    End If
Next


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


加好友 发短信
等级:童狐 帖子:257 积分:4375 威望:0 精华:0 注册:2011/7/5 9:38:00
  发帖心情 Post By:2020/7/2 8:22:00 [显示全部帖子]

谢谢老师,是我想多了,把问题搞复杂了,重新自动行高即可。
Dim dts() As String = {"第一列","第三列","第四列","第七列"}
For Each cl As Col In Tables("表A").Cols
    If Array.IndexOf(dts, cl.Name) >= 0 Then
        Tables("表A").Cols(cl.Name).Visible = True
    Else
        Tables("表A").Cols(cl.Name).Visible = False
    End If
Next
Tables("表A").AutoSizeRows()

 回到顶部