View Full Version : Some cool desktop grid CSS
hmischel@diligentsystems.com
2018-04-03, 19:41
Here is the style
define class ogrid as grid
style='QTableWidget::item:selected{background-color:lightblue;} QTableWidget::item:hover{background-color: lightblue;} QTableWidget{selection-background-color:lightblue;show-decoration-selected: 1; font-size:15pt;} QTableWidget::item {background:black;background-color:black;color:white; border: 2px solid lightblue;}'
rowheight = 30
recordmark = .f.
readonly = .t.
actionbar = .f.
enddefine
You can see the video here.
https://youtu.be/W2M-Llne0ys
Herb
Hi Herb,
very cool. Yes, that is incredible.
Hank
Hello I try to use you´re example in a css archive but dont work. I use this:
lianja_ui_grid *{
lianja_ui_grid::item:selected{background-color:lightblue;}
lianja_ui_grid::item:hover{background-color: lightblue;}
lianja_ui_grid::item:selected{background-color:lightblue;}
lianja_ui_grid::item:hover{background-color: lightblue;}
lianja_ui_grid{selection-background-color:lightblue;show-decoration-selected: 1; font-size:15pt;}
lianja_ui_grid::item {background:black;background-color:black;color:white; border: 2px solid lightblue;}
}
What I doing wrong?
Thanks for the advice
barrymavin
2018-12-21, 20:30
The CSS is incorrect, try this:
QTableWidget::item:selected{background-color:lightblue;}
QTableWidget::item:hover{background-color: lightblue;}
QTableWidget::item:selected{background-color:lightblue;}
QTableWidget::item:hover{background-color: lightblue;}
QTableWidget {selection-background-color:lightblue;show-decoration-selected: 1; font-size:15pt;}
QTableWidget::item {background:black;background-color:black;color:white; border: 2px solid lightblue;}
hmischel@diligentsystems.com
2018-12-22, 19:12
Thanks Barry :)
Hello again , ok I see my error I use a canvas treegrid and this is for a gadget grid. If I use this in a gadget grid this works perfect.
How can I use this cool grid in treegrid object?
Thanks for the help
yvonne.milne
2019-01-04, 11:09
Hi Gontran,
You can use lianja_ui_tree, lianja_ui_tree::branch and lianja_ui_tree::item for a canvas treegrid.
https://www.lianja.com/doc/index.php/CSS#UI_Framework
Regards,
Yvonne