Hi,
I’ve been looking for a way on how to do hot-tracking a row when the mouse is over a row. I looked at appearance key Table Row in Theme Builder but didn’t find any style or properties for Hovered the way Treeview does.
Is it possible?
Thanks.
Hi Luca,
this mixin theme work only for over the last column, but not with the column with text on the cells
how do for full row?
thanks
Cristian
I copied the values from the theme since I thought that the mixin overrides the entire state. But it looks like it preserves the inherited styles. See
"inherit": "table-row"
Hi Luca,
This is great and works. Just wondering what are
"widthBottom": 1, "colorBottom": "table-row-line", "backgroundColor": "table-row-background", lines for in the under styles. I commented them out and still works. Am I missing something? Thanks.
Yes, it’s possible but in a slightly different way since rows and cells in a DGV are not widgets, they are rendered directly as html. The nodes in a treeview and items in a listbox are widgets so they have all the standard widget states and behavior. The theme states, styles and properties that a DGV cell recognizes are preset in the cell renderers (you can have customer renderers, but it’s a different topic and we’ll have an extension with some very cool DGV columns).
To make it short, you can always use normal CSS in a Wisej theme using the css value under styles. Try this mixin:
{
"name": "HotDGV",
"appearances": {
"table-row": {
"inherit": "table-row",
"states": {
"default": {
"styles": {
"widthBottom": 1,
"colorBottom": "table-row-line",
"backgroundColor": "table-row-background",
"css": "{\"hover\":{\"cursor\":\"pointer\", \"background-color\":\"red\"}}"
},
"properties": {
"textColor": "table-row"
}
}
}
}
}
}
You can also use any of the theme colors instead of red. The definition in “css” is translated to pure css by Wisej. Id you specify a child property (in the mixin above it’s “hover”, Wisej treates is a pseudo style and it prefixes it with “:”, so hover becomes “:hover”. If you used “:after”, it would becomes “::after” and you can add ::after and ::before pseudo elements.
Please login first to submit.