The Ask: I cannot figure out where in the ListView’s .theme hierarchy to modify the icon’s color based on “hovered” and “selected” states. Any help on how/where to do this is greatly appreciated.
Background: I’m using WiseJ v2.2 and trying to set the icon color within the .theme file. My listView.View = “Details” (not SmallIcon, LargeIcon, or Tile).
I can set the color to purple for all icons in the listView by
“listview”: {
“states”: {
“default”: {
“properties”: {
“iconColor”: “purple”,
}
}
},
Deeper Background and things tried:
– I have an inheritable appearance “icon-dark” taken from the WiseJ provided themes (using “inherits” I’ve got this working for other control’s icons). Getting the icons in a list view to use this “inherit” feature would be the ideal solution!!!
– I’ve tried setting the “components”: { “icon” : { “inherit”: “icon-dark” } } } in just about every sub control I could think to try…
– “listview”: { “components”: {
– “icon”: {
– “item-view”: {
– “grid-view”: {
– “grid-row”: {
– “grid-cell”: {
– “item”: {
– “tools”: {
– I’ve tried setting the “iconColor” and “textColor” within —–> “states”: { “default: { “properties”: { of all the sections above (and adding subsection of “icon” within “components” to each component above… with no luck.
Side Note: Is there documentation anywhere that gives the full set of “valid” properties and sub properties. I’m using the wiseJ theme builder which seems to give a list of properties – but then i’ve found cases where i can add new properties not in the selectable drop downs examples that “take”.
Now to your question:
The content of the listview and the datagridview are not standard widgets since they are fully virtual and are rendered dynamically as html while scrolling. Each cell and row has a renderer javascript class which supports only certain states, styles and properties.
When the ListView is in item mode, you can set the states on the item or the item/icon like this
"icon": {
"states": {
"default": {
"properties": {
"scale": true,
"marginRight": 5,
"textColor": "iconDark"
},
"styles": {
}
},
"hovered": {
"styles": {
},
"properties": {
"textColor": "red"
}
}
}
}
When the listview is in details mode it’s a different thing since the inner part are not widgets.
Best regards
Frank
Hi Chad,
sorry for the late reply, bit please let me answer your Side Note first:
Side Note: Is there documentation anywhere that gives the full set of “valid” properties and sub properties. I’m using the wiseJ theme builder which seems to give a list of properties – but then i’ve found cases where i can add new properties not in the selectable drop downs examples that “take”.
There is no full set of valid properties since any widget can make any property themeable. It’s not limited to CSS styles, which are set in the styles section.
The properties suggested in the theme builder are the common properties documented in the docs. The only way is to look at the themeable properties in the public javascript code in wisej-js and wisej-qx.
Best regards
Frank
Please login first to submit.