Smobiler上海石磨_.NET移动开发平台
标题:
为何tableview可以设置背景色,但没有前景色接口...
[打印本页]
作者:
zoomify
时间:
2022-3-11 14:11
标题:
为何tableview可以设置背景色,但没有前景色接口...
本帖最后由 zoomify 于 2022-3-11 14:27 编辑
tableView1.Columns[0].BackColor
private void tableView1_RowBind(object sender, TableViewTemplateBindEventArgs e){
e.Row.BackColor = System.Drawing.Color.LightGray;
}
为何tableview具体的行可以设置背景色,但没有前景色接口呢?
作者:
Lula.Jin
时间:
2022-3-11 17:37
例如 ((TableViewTextCell)e.Row.Cells[1]).ForeColor = System.Drawing.Color.Green;,其中tableview第二列为 TableViewTextBoxColumn, 因此转换成 TableViewtextCell
或者可以在设计器中点击Columns,直接设置列属性
[attach]2423[/attach]
作者:
zoomify
时间:
2022-3-13 07:55
谢谢!
作者:
zoomify
时间:
2022-3-14 10:42
((TableViewButtonCell)e.Row.Cells[1]).ForeColor = System.Drawing.Color.White; 会出错
TableViewButtonCell这种对象没有字体颜色属性。
作者:
Lula.Jin
时间:
2022-3-15 10:02
TableViewButton是没有ForeColor属性,如有需要,请在季度贴中提出该需求
欢迎光临 Smobiler上海石磨_.NET移动开发平台 (https://www.smobiler.cn/)
Powered by Discuz! X3.2