Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共10 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]窗口表颜选中行颜色设置报错

1楼
81538475 发表于:2023/10/13 18:22:00
Tables("报价表信息核对_table1).SysStyles("CurrentRow").BackColor = Color.White
图片点击可在新窗口打开查看
2楼
有点蓝 发表于:2023/10/14 8:36:00
少个双引号

Tables("报价表信息核对_table1").SysStyles("CurrentRow").BackColor = Color.White
3楼
81538475 发表于:2023/10/16 9:41:00
嗯嗯。多谢,不过我发现这个并不能改变listmode 开启后的这个颜色, 这个是如何用代码修改呢
4楼
有点蓝 发表于:2023/10/16 9:45:00
改为其它颜色试试,表格默认背景默认就是白色的
5楼
81538475 发表于:2023/10/16 10:27:00
改成其他颜色了,但是listmode 的颜色还是没有变化。
6楼
有点蓝 发表于:2023/10/16 10:46:00
我测试没有问题

Tables("表A").ListMode = True
Tables("表A").SysStyles("CurrentRow").BackColor = Color.blue
7楼
81538475 发表于:2023/10/16 14:21:00
我发现是什么问题了。是drawcell里面的代码有影响,但是我吧这行代码放到drawcell 的最后一行的话,效果还是会被覆盖。有什么好的办法吗
8楼
有点蓝 发表于:2023/10/16 14:34:00
drawcell有什么代码
9楼
81538475 发表于:2023/10/16 14:35:00
If e.Row.IsNull("绑定编号") =False Then
    If e.Row("_identify") = e.Table.Current("_identify") Then
        e.style = "绑定2"
    Else
        e.style="绑定"
    End If
End If
e.Table.grid.Cols(0).widthdisplay = 4
If e.Row.IsNull("商务颜色记录") = False Then
    Dim n As String = "样式" & e.Row("_Identify") & "_" & e.Col.name
    Dim ary() As String = e.Row("商务颜色记录").split("|")
    For Each s As String In ary
        Dim a() As String = s.split(":")
        If a(0) = e.Col.name Then
            e.Table.DataTable.AddUserStyle(n, Color.FromARGB(a(1)), Color.black)
            e.Table.DataTable.Styles(n).BackColor = Color.FromARGB(a(1))
            e.style = n
            Exit For
        End If
    Next
End If
If e.Row("状态") = "客户通过" AndAlso e.Col.Name = "来源" Then
    e.style = "客户通过"
End If
If e.Row("状态") = "可开piao" AndAlso e.Col.Name = "来源" Then
    e.style = "可开piao"
End If
If e.Row("状态") = "长期未结算" AndAlso e.Col.Name = "来源" Then
    e.style = "长期未结算"
End If
If e.Row("状态") = "未付款" AndAlso e.Col.Name = "来源" Then
    e.style = "未付款"
End If
e.Table.SysStyles("CurrentRow").BackColor = Color.lightblue
10楼
有点蓝 发表于:2023/10/16 14:45:00
e.Table.SysStyles("CurrentRow").BackColor = Color.lightblue
改为
If e.Row.index = e.table.rowsel Then
    e.style = "当前行样式"
End If

添加一个当前行样式,去掉listmode ,设置为false
共10 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .04199 s, 2 queries.