Rss & SiteMap

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

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

标题:表样式跟系统样式

1楼
mamuaiqing 发表于:2023/10/15 0:38:00
窗口设置了Table系统样式代码:
DataTables("窗口_Table1").SysStyles("CurrentRow").FontBold = True '选定行字体加粗
也设置了表样式
DataTables("窗口_Table1").AddUserStyle("样式1", Color.AntiqueWhite, Color.Black)
在Table的DrawCell事件中设置了代码:
If e.Col.Name = "第二列" Then
    e.Style = "样式1"
End If

选定行后该行第二列的字体没有加粗,请教老师该怎么实现在设置了某列背景色的情况下,选定该行后,该行的字体加粗
2楼
有点蓝 发表于:2023/10/15 20:41:00
DrawCell事件会覆盖SysStyles的用法。不建议混用,全部放到DrawCell事件好了

DrawCell事件:
If e.Col.Name = "第二列" Then
    e.Style = "样式1"
End If
If e.row.index = e.table.rowsel Then
If e.Col.Name = "第二列" Then
    e.Style = "当前行第二列样式"
else
    e.Style = "当前行样式"
end if
End If
共2 条记录, 每页显示 10 条, 页签: [1]

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

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