Chris Guanzon Active Member Licensed User Longtime User Oct 9, 2020 #1 Is it possible to add a gradient color in B4XTable header?
Erel B4X founder Staff member Licensed User Longtime User Oct 11, 2020 #2 There are all kinds of ways to do it. A simple B4J only solution: 1. Add an invisible pane with the designer and set its background to GradientDrawable. Set the orientation to TOP_BOTTOM. 2. Code: Copy For Each col As B4XTableColumn In B4XTable1.VisibleColumns Dim p As B4XView = col.CellsLayouts.Get(0) CSSUtils.SetStyleProperty(p, "-fx-background-color", CSSUtils.GetStyleProperty(Pane1, "-fx-background-color")) 'Pane1 is the hidden panel. Next Upvote 0
There are all kinds of ways to do it. A simple B4J only solution: 1. Add an invisible pane with the designer and set its background to GradientDrawable. Set the orientation to TOP_BOTTOM. 2. Code: Copy For Each col As B4XTableColumn In B4XTable1.VisibleColumns Dim p As B4XView = col.CellsLayouts.Get(0) CSSUtils.SetStyleProperty(p, "-fx-background-color", CSSUtils.GetStyleProperty(Pane1, "-fx-background-color")) 'Pane1 is the hidden panel. Next