Merlin's Blog
Just record something
Toggle navigation
Merlin's Blog
Home
Scratch基础教程
About Me
Archives
Tags
改变wxGrid指定行颜色
wxWidgets
c++
wxGrid
2017-01-26 12:52:53
213
0
0
merlin
wxWidgets
c++
wxGrid
试了好久,颜色一直没改变,原来需要对表格进行单击、双击或拖拽等操作,这样才能刷新页面 ``` wxGridCellAttr* attr; attr = new wxGridCellAttr; attr->SetBackgroundColour(wxColour(255,255,0)); m_grid1->SetRowAttr(row, attr); //改变指定行属性 m_grid1->SelectRow(row,true); //需要点击或拖拽才能看到效果,所以这里用程序模拟选择动作 m_grid1->ClearSelection(); //取消选择效果 ```
Pre:
wxDateTime日期格式化用法
Next:
wxWidgets计时器用法
0
likes
213
Weibo
Wechat
Tencent Weibo
QQ Zone
RenRen
Table of content