boten Active Member Licensed User Longtime User Dec 16, 2015 #1 ok, I can select a row in a tableview & scroll to it, but it is not highlighted with the same hues (lightblue) as per clicking a row. How to make the selected row stand up in the crowd in blue (and not in grey)
ok, I can select a row in a tableview & scroll to it, but it is not highlighted with the same hues (lightblue) as per clicking a row. How to make the selected row stand up in the crowd in blue (and not in grey)
Erel B4X founder Staff member Licensed User Longtime User Dec 17, 2015 #2 Check this thread: https://www.b4x.com/android/forum/threads/tableview-lost-focus-color-lightblue.52690/#content Upvote 0
Check this thread: https://www.b4x.com/android/forum/threads/tableview-lost-focus-color-lightblue.52690/#content
boten Active Member Licensed User Longtime User Dec 18, 2015 #3 When a row is selected via Code: Copy tv1.ScrollTo(j) tv1.SelectedRow=j the selected row has grey background adding : Code: Copy tv1.requestfocus paints it blue, like a clicked row my question: what css need i supply so that a selected row BUT NOT focused will have another color, not grey tried using: Code: Copy .table-row-cell:filled:selected { -fx-background-color: pink; } but that just replaced the blue with pink regardless if the tableview was clicked or just row-selected (without request focus) Upvote 0
When a row is selected via Code: Copy tv1.ScrollTo(j) tv1.SelectedRow=j the selected row has grey background adding : Code: Copy tv1.requestfocus paints it blue, like a clicked row my question: what css need i supply so that a selected row BUT NOT focused will have another color, not grey tried using: Code: Copy .table-row-cell:filled:selected { -fx-background-color: pink; } but that just replaced the blue with pink regardless if the tableview was clicked or just row-selected (without request focus)
Erel B4X founder Staff member Licensed User Longtime User Dec 20, 2015 #4 Check this answer: http://stackoverflow.com/questions/...able-after-its-been-selected-and-clicked-away Upvote 0
Check this answer: http://stackoverflow.com/questions/...able-after-its-been-selected-and-clicked-away
boten Active Member Licensed User Longtime User Dec 20, 2015 #5 The solution described in the link you provided changes the background for selected row REGARDLESS if the tableview is focused or not. the CSS below will have 2 color for selected rows: 1st for selected AND focused; 2nd for selected BUT NOT focused. Code: Copy .table-row-cell:selected { -fx-selection-bar: #0093ff; ' <---------------- the "default" blueish hue for selected & focused -fx-selection-bar-non-focused: #C0FFC0; '<---------- color for selected BUT NOT focused line } Upvote 0
The solution described in the link you provided changes the background for selected row REGARDLESS if the tableview is focused or not. the CSS below will have 2 color for selected rows: 1st for selected AND focused; 2nd for selected BUT NOT focused. Code: Copy .table-row-cell:selected { -fx-selection-bar: #0093ff; ' <---------------- the "default" blueish hue for selected & focused -fx-selection-bar-non-focused: #C0FFC0; '<---------- color for selected BUT NOT focused line }