Applying a mixin for grid-less Listview

0
0

Hi, I want to create and apply a mixin so I can make use of Listviews with and without gridlines. I created a mixin for a grid-less LV, and added it to my Themes folder, and included it in the project. Then I set a listview’s .AppearanceKey property to “gridlesslv” , but it seems to have no effect.

Can you confirm my .mixin file is correct? I’ve experimented with a couple of variations. Thanks,

Andrew

 

 

  • You must to post comments
0
0

Hi Andrew,

GridLines property is now available in the latest Wisej development build (1.3.60).

Best regards
Frank

  • You must to post comments
0
0

Forgot to answer the question about grid-cell/widthRight and grid-row/widthBottom. Setting grid-cell/width:0 (as in the mixing I copied) sets to zero all four top, right, bottom, left. The “width” property is a “shorthand” for [top, right, bottom, left]. You can assign an array or a single number.

The grid-row/widthBottom is not set under “listview”, it is only set in ‘table-row” which is used by the DataGridView. If you want to remove the row lines from the DGV then yes, you’d have to change that as well. We are also adding the CellBorderStyle property to the DGV, with values that are slightly different from WinForms (and VWG) to be web “friendly”.

/Luca

  • You must to post comments
0
0

Hi Andrew,

We can add the GridLines property, it would be easier to tie it in the theme system since it would translate simply to a state, like the BorderStyle. I’ll log the enhancement and will also send you a cell renderer which can always be handy.

/Luca

  • You must to post comments
0
0

Hi Luca, from what I saw we would need to set listview/grid-cell.widthRight and also listview/grid-row.widthBottom, because the vertical and horizontal lines come these 2 places, respectively.

So to confirm, WiseJ currently does not support the simultaneous use of Listviews with different gridline styles, unless we override wisej.web.listview.CellRenderer.  I would definitely be interested in that because I hope to achieve this (some look better with lines, and some better without). Do you know when WiseJ might support this natively?

Another consideration would be for a Listview.Gridlines property like WinForms .. however its absence has encouraged me to look into how WiseJ themes work 🙂

  • You must to post comments
0
0

Hi Andrew,

Some complex widgets like the DataGridView and the ListView where they have inner components that are not really component, like the “grid-cell” aren’t able to override the child component by changing the name of the parent’s appearance key. Their appearance key is set in the cell renderers and it’s in the code as “listview/grid-cell” for the  listview cell renderer and “table-cell” (top level) for the datagridview cell renderer.

This is something that we’ll  improve. One of the issues was that cell renderers are created before the listview (or datagrid) widget have completed their initialization. If you need to have ListView controls with different themes, I can send you a simple javascript lib that overrides the built-in “wisej.web.listview.CellRenderer”. You can actually install custom cell renderers for each column or each cell.

You can change the appearance and attributes of the container “listview” but to change the cells you have to override the theme, like this:

{

“appearances”:{

“listview”: {

“inherit”:”listview”,

“components”:{

“grid-cell”:{

“states”:{

“default”:{

“styles”:{

“width”: 0

}

}

}

}

}

}

}

}

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.