B4J Question Hide vertical scrollbar for HTMLeditor

ThRuST

Well-Known Member
Licensed User
Longtime User
I want to make the vertical scrollbar disappear in the HTMLeditor so how is this done in B4J?
 

ThRuST

Well-Known Member
Licensed User
Longtime User
CSS should do the trick.
This makes the scroll-bar transparent while leaving the position marker visible, which makes it a nice solution visually.

B4X:
.
/* ------------------------------------ */
/* -   HTML-editor Hide Scroll-Bar    - */
/* ------------------------------------ */
html-editor .scroll-bar:horizontal ,
.html-editor .scroll-bar:vertical {

        -fx-background-color:transparent;
        -fx-pref-width: 0;
        -fx-padding: 0;

}

You might want to style the position marker this way. This will affect all scroll-bar controls it's not specific for HTML-editor. You can easily adjust that.

B4X:
/* ----------------------------- */
/* -    Scroll-Bar Vertical    - */
/* ----------------------------- */
.scroll-bar:vertical {

      -fx-background-color: #1a1a1a;
      -fx-pref-width: 20;
      -fx-padding: 0;

}

/* ----------------------------- */
/* -   Scroll-Bar Horizontal   - */
/* ----------------------------- */
.scroll-bar:horizontal {

    -fx-background-color: #1a1a1a;
    -fx-pref-height: 20;
    -fx-padding: 0;

}
 
Last edited:
Upvote 0

ThRuST

Well-Known Member
Licensed User
Longtime User
HTML-editor view example using the CSS above

upload_2019-4-19_18-46-19.png
 
Upvote 0
Top