DataGridView Row HotTracking

0
0

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.

  • You must to post comments
0
0

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

  • You must to post comments
0
0

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"


 

  • You must to post comments
0
0

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.
  • Cris
    • Cris
    • Jan 10, 2017 - 5:21 pm
    Hi Luca, I now see the difference when above three lines are commented out. Sorry.
  • You must to post comments
0
0

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.

 

 

 

  • You must to post comments
Showing 4 results
Your Answer

Please first to submit.