B4J Question B4XTable header gradient color

Erel

B4X founder
Staff member
Licensed User
Longtime User
1602398690186.png


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.
B4X:
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
Top