我有一个qx.ui.table.Table,当一行获得焦点时,它变得很难阅读。我使用qx.ui.table.cellrenderer.Date作为基类来覆盖单元格的背景颜色,尽管它看起来不像是在
focusCellOnPointerMove : true触发事件。
那么,当一行获得焦点时,表格的样式在哪里呢?

这是我的覆盖:
// Overridden
_getCellStyle : function(cellInfo)
{
var diff = 5; // Example
if (diff < 60)
{
var color = '#8cff5e';
return this.base(arguments, cellInfo) + "background-color:" + color + ";";
} else if (diff < 60 * 5)
{
var color = '#ffff00';
return this.base(arguments, cellInfo) + "background-color:" + color + ";";
} else
{
return cellInfo.style || "";
}
},使用scro34的建议:

发布于 2017-03-12 05:54:43
如果只想在表行指向某个表行时更改其背景颜色,可以使用qooxdoo的主题化功能并覆盖应用程序的主题附带的颜色声明。
当指针悬停在某一行上时,表格构件使用两个颜色键来控制背景颜色:表格-行-背景-焦点(未选定行)和表格-行-背景-焦点-选定(选定行)。
要覆盖预定义的值,请打开位于应用程序的"theme“文件夹中的Color.js,并向文件的"colors”部分添加两个条目,例如:
qx.Theme.define("myApp.theme.Color",
{
extend : qx.theme.indigo.Color,
colors :
{
"table-row-background-focused" : "#8cff5e",
"table-row-background-focused-selected" : "#ffff00"
}
});更多关于qooxdoo主题的信息:http://www.qooxdoo.org/current/pages/desktop/ui_theming.html
关于表格样式的教程:http://www.qooxdoo.org/5.0.1/pages/desktop/ui_table_styling.html
https://stackoverflow.com/questions/42738567
复制相似问题