B4J Question [B4XTable] Set Horizontal Scrollbar Size

aeric

Expert
Licensed User
Longtime User
I use the following code to set the scrollbar size for CustomListView but it failed on B4XTable.
https://www.b4x.com/android/forum/threads/scrollbar-size.97757/#content

If I am not mistaken, B4XTable uses a CustomListView name clvData but not sure why it behaves differently. Example code attached.

1647008123040.png
 

Attachments

  • Example.zip
    10.3 KB · Views: 228
Solution
CSS:
 .scroll-bar .increment-arrow,
 .scroll-bar .decrement-arrow{
    -fx-shape : " ";   
    -fx-padding :0.3em 0.0;
}

 .scroll-bar:vertical .increment-arrow,
 .scroll-bar:vertical .decrement-arrow{
    -fx-shape : " ";   
    -fx-padding :0.0 0.3em;
}

1647020249722.png

TILogistic

Expert
Licensed User
Longtime User
CSS:
 .scroll-bar .increment-arrow,
 .scroll-bar .decrement-arrow{
    -fx-shape : " ";   
    -fx-padding :0.3em 0.0;
}

 .scroll-bar:vertical .increment-arrow,
 .scroll-bar:vertical .decrement-arrow{
    -fx-shape : " ";   
    -fx-padding :0.0 0.3em;
}

1647020249722.png
 
Upvote 0
Solution

TILogistic

Expert
Licensed User
Longtime User
see css:
EDIT
CSS:
 .scroll-bar .increment-arrow,
 .scroll-bar .decrement-arrow{
    /* -fx-shape : " ";     */
    -fx-padding :0.8em 0.4em;
}

 .scroll-bar:vertical .increment-arrow,
 .scroll-bar:vertical .decrement-arrow{
    /* -fx-shape : " ";     */
    -fx-padding :0.4em 0.8em;
}
1647022269565.png
 

Attachments

  • B4XTableHorizontalScrollbarHeight2.zip
    4.3 KB · Views: 200
Last edited:
Upvote 0

aeric

Expert
Licensed User
Longtime User
To load the stylesheet on page other than MainPage, use the following:
B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
    Root = Root1
    Root.LoadLayout("SecondPage")
    B4XPages.GetNativeParent(Me).Stylesheets.Add(File.GetUri(File.DirAssets, "Style.css"))
    CreateColumns
    CreatePanels
End Sub
 
Upvote 0

TILogistic

Expert
Licensed User
Longtime User
tips:
sorry spanish
 
Upvote 0
Top