用过 True DBGrid Pro 7.0 的兄弟请帮帮忙!如何设定行的颜色?

BlackCodeBoy 2003-09-29 09:21:14
在True DBGrid Pro 7.0 中如何把一行的颜色设为红色?
...全文
69 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
watt 2003-09-29
  • 打赏
  • 举报
回复
还是用FetchRow比较好。
liuxum 2003-09-29
  • 打赏
  • 举报
回复
将True DBGrid 列的FetchStyle设置为true,让它可以触发Grdgrid_FetchCellStyle事件,然后在事件中:
Private Sub Grdgrid_FetchCellStyle(ByVal Condition As Integer, ByVal Split As Integer, Bookmark As Variant, ByVal Col As Integer, ByVal CellStyle As TrueOleDBGrid80.StyleDisp)

‘第二行设置为红色
If Bookmark = 2 Then
CellStyle.BackColor = vbRed
End If

End Sub

7,789

社区成员

发帖
与我相关
我的任务
社区描述
VB 基础类
社区管理员
  • VB基础类社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧