How can I hide the scroll bar in TextArea?

How can I hide the scroll bar in TextArea?

Hi. To remove the horizontal scrollbar you can do this:
textArea.setWrapText(true);
To remove the vertical scrollbar you can do this:
ScrollBar scrollBarv = (ScrollBar)ta.lookup(".scroll-bar:vertical");
scrollBarv.setDisable(true);  and set the opacity to 0 in the css file:
//css file
.text-area .scroll-bar:vertical:disabled {
    -fx-opacity: 0;
}Here is an example:
import javafx.application.Application;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.scene.Node;
import javafx.scene.Scene;
import javafx.scene.control.Button;
import javafx.scene.control.ContextMenu;
import javafx.scene.control.MenuItem;
import javafx.scene.control.ScrollBar;
import javafx.scene.control.TextArea;
import javafx.scene.input.ContextMenuEvent;
import javafx.scene.layout.StackPane;
import javafx.stage.Stage;
public class TextAreaSample extends Application {
    @Override
    public void start(Stage primaryStage) {
    final TextArea textArea = new TextArea();
        textArea.setWrapText(true);
        StackPane root = new StackPane();
        root.getChildren().add(textArea);
        Scene scene = new Scene(root, 300, 250);
        primaryStage.setScene(scene);
        primaryStage.show();
        scene.getStylesheets().add(getClass().getResource("style.css").toExternalForm());
        ScrollBar scrollBarv = (ScrollBar)textArea.lookup(".scroll-bar:vertical");
        scrollBarv.setDisable(true);
    public static void main(String[] args) {
        launch(args);
}

Similar Messages

  • How can i hide the menu bar at the bottom of the app in itunes

    how can I hid the bar at the bottom of the App screen in itunes. Where it shows how much audio, app etc space you have left on your device

    Unforrtunately the status bar doesn't make any difference, however I have worked out that the bar does show when I go into full screen. 
    I would have thought it should also work when not in full screen - it certianly used to.

  • How can I get the scroll bar to go to the top or bottom of the page with a right click command?

    When I right click on the scroll bar nothing happens. I have to spin the mouse wheel repeatedly to get to the top or bottom of the page. I just switched from explorer. I'm used to being able to do this. It's much less time consuming and frustrating. I hope someone can help. Thanks.

    You can hold down the Shift key and left-click the scroll bar to go to that position.
    If you set the Boolean pref <b>middlemouse.scrollbarPosition</b> to "<i>true</i>" (default on Linux) on the <b>about:config</b> page then you can middle-click the scroll bar to go to that position.
    *http://kb.mozillazine.org/middlemouse.scrollbarPosition
    *http://kb.mozillazine.org/ui.scrollToClick

  • How can I hide horizontal scroll bar?

    Some websites use CSS code (overflow-x: hidden or overflow-y:hidden), that shows the horizontal scroll bar while the frame on the website is centered and only 800 pixels wide, but I really don't need my horizontal scroll bar to show up. So how can I hide it?
    Thanks!

    If you use <b>overflow: hidden</b> then you shouldn't see a scroll bar (overflow:scroll does that).<br />
    If that doesn't work then try to add the !important; or use the code in Stylish or to userContent.css in the chrome folder.
    *http://kb.mozillazine.org/userContent.css
    *https://developer.mozilla.org/en/CSS/@-moz-document

  • How can we remove the scroll bars from the table?

    Hi,
    I have a dynamic table. Currently the table appears with the scroll bars. But there is a requirement that the scroll bar should not appear and the table should stretch in the entire page. How can this be achieved.
    Thanks in advance
    Nita

    Thanks Mohammad for the reply.
    Was able to remove the scroll bars by using only the styleClass as AFStretchWidth. But there is a default partition in middle of the page still? Can i remove that too by any way.

  • How can I retrieve the scroll bar in Home applications using OS 10.6.8?  I don't have a general section after clicking on System Preferences.  Thanks.

    I have deleted the scroll bar twice in 4 years and I still don't know how to set it back.  Please help.

    hi Samberl
    thanks a lot for the fast reply.
    I was dragging folders from main folders on the laptop-desktop  onto the external drive icon - to copy them across....
    Your suggestion sounds very promising -  I didn't know about 'cloning'.
    Yes the idea is to backup the laptop -    I thought I would just move it all now, new - and then keep saving/dragging physically   across to the new drive myself each day or two...
    Would this be the sizeof the internal hard drive = c.500 gb  ?   =   under the HD icon on desktop is written  : 
    " 499.76gb , 311.5 gb free  " 
    I can erase and start agin on the new external drive - so this plan is to make two partititions, rather than the one at present, and make one of them 500 gb ?
    I have found CCC [carbon copy cloner] googling - looks good.
    When CCC site says it backs up  the hard drive - would this  mean all my files  [over 100 gb] that are mostly  in folders on the desktop, plus the others in itunes, iphotos etc found in the HD icon,  would all copy across successfully [wherever they are in the computer ]  ?
    thanks again, hope you can clarify these things and then I will go for it. 
    It would be great and amazing if this 'lack of permission' message doesn't show up in the process of doing this ccc transfer - hopeful!
    Julie

  • How can I get the scroll bars to be more visible/contrasting?

    The scroll bars are difficult for me to differentiate from their background. Can I change their colour or darkness to make them more visible?

    Firefox uses the native scroll bars by default.<br />
    You can try to select another window theme in your Linux distribution that has better scroll bar appearance or see if installing a Firefox theme helps.
    * https://support.mozilla.org/kb/Using+themes+with+Firefox
    *https://addons.mozilla.org/firefox/themes/

  • How can I hide the menu bar of better a specific option without using an addon?

    For security purpose on my environment, I would like to hide the Menu Bar option or (better) restrict the right to install an add-on, change the proxy configuration etc..
    I dont want to use an add-on for that as it will perhaps not work anymore if I update my firefox.
    So i am searching for a registry/file user preference solution or anything else that will let me doing that.
    Thank you for your help
    == This happened ==
    Every time Firefox opened
    == everytime ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; MS-RTC LM 8; .NET CLR 3.5.21022; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)

    You can hide the menu bar and other toolbars with code in [http://kb.mozillazine.org/UserChrome.css userChrome.css] below the @namespace line.
    See http://kb.mozillazine.org/Editing_configuration#How_to_edit_configuration_files
    <pre><nowiki>@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); /* only needed once */
    #toolbar-menubar {display:none!important;}</nowiki></pre>
    See also http://kb.mozillazine.org/Locking_preferences

  • On a Parallax Scrolling Page, How can I start the scroll bar at the bottom on page load?

    Hello,
    I'm working on a parallax scrolling animated page in Edge Animate, and it's a timeline of life on Earth. But we wanted to start from the bottom, or "Origin of Life" and then scroll up while our 'tree of life' animates in as the user scrolls up. We definitely know it's not good web etiquette to start at the bottom, but our client is determined. I am more of an animator than a web designer, but I was wondering how one might do this using a bit of code? We are using EC.Parallax.setup(sym); from Edgecommons for the parallax function, which is basically just tying the timeline animations to the scrollbar. I've already got the animations setup to go the right way  but we don't want visitors to have to scroll to the bottom first, as they'll then see everything animated in reverse! In my google searches I found something called an Iframe that you can use, and then a flurry of responses on how horrible Iframe is. Thanks for your help, we really appreciate it!

    Hi, Vizkid-
    You can find the height of the document and then use window.scroll in your initialization function to default your scrollbar to the bottom of the page.
    http://stackoverflow.com/questions/1145850/how-to-get-height-of-entire-document-with-javas cript
    Hope that helps,
    -Elaine

  • How do I temporarily hide the scroll bars ?

    How do I temporarily hide the scroll bars ?

    I assume that your post in [[/questions/906990#answer-291125]] ended up in the wrong thread and should have appeared here.
    The only thing that changes if you run the code in the Scratchpad is the disappearance and reappearance of the scroll bar in the current tab. You do not see anything in the Scratchpad. So you need to switch back to the browser window.
    You can test it with this code, that should make both scroll bars appear:
    <pre><nowiki>void(document.body.style.setProperty("overflow","scroll",""));
    </nowiki></pre>
    [[/questions/906990#answer-291125]]:
    <blockquote>In Scratchpad I ran both:
    <pre><nowiki>void(document.body.style.setProperty("overflow-x","hidden",""));
    and
    void(document.body.style.setProperty("overflow-x","hidden",""));
    In the 2nd one I got:
    17:48:57.826 |x unexpected end of XML source
    @ Scratchpad:1'''
    For the 1st one I got no activity, only a blinking cursor.
    any other ideas ?
    Good luck and merry Christmas, Bill
    .</blockquote>

  • How can i get the footer bar to stay, whilst page scrolls?

    how can i get the footer bar to stay, whilst page scrolls?
    at the moment, on my site, if the page is longer than the screen, it goes behind the footer,
    but the foot bar moves up the page as yo scroll down to see the rest of the content.
    any way of getting the footer to stay put, while body/page contant scrolls ?
    thanks

    You can use some css to do it...
    #footer_id {
         position:fixed;
         bottom:0px;
    <div id="footer_id">Your footer content</div>
    The css above will lock your footer to the bottome of the browser window. As long as your footer <div> is last in your html, it will float over the top of everything on your page when the page is scrolled. If it's not last in the html, you'll need to add a z-index to get it on top of your other content in the stack.

  • How can I make the status bar hide automatically when using safari?

    How can I make the status bar hide automatically when using safari?

    When Safari is in FullScreen mode, menu bar will be hidden.
    Safari window to fit the screen?
    Move the mouse pointer to the bottom right corner of the Safari window.
    Double arrows will appear. Drag it to resize the window to fit the screen.

  • How can I have the side bar in iTunes 12??

    I just installed iTunes 12 that was claimed to provide "a more pleasant interface for navigation"!?!?
    Personally, I do not find the new view format pleasant at all. I expected to be allowed to go back to the lateral bar visualization, finding it as a view option. It was quite upsetting finding out that the option disappeared from the menue. Did you have the brilliant idea to remove it, or did you simply hide it somewhere else? (I am definitely too old to play "hide and seek" with visualization options and I really do not have the time either)
    Probably, kids like big figures that do not require any reading skill, unfortunately I do not.
    I conclusion, how can I have the side bar visible again in iTunes 12???
    Thank you
    P.S. Playlists is similar to lateral bar, but not the same, as it is not ONE allowing to navigate music, movies, podacast, but one for each.

    The functionality of the sidebar has changed indeed. But what's the problem? Category's of the library have been separated from playlists and moved to one of the top bars. I think it's an improvement for people using iTunes as a media-management tool. In the old version the playlists were at the bottom of the sidebar and if you had all options activated you had to scroll down to find your playlists.
    You don't have to do that anymore. Your music library is now aside with the playlists. If you want to activate another categorie you can use the icons in the topbar and still keep the overview on your playlists.
    People who use iTunes for syncing iDevices seem less happy with this new presentation. It seems a minor adjustment to me, but others seems to think otherwise.

  • How do I hide the side bar in landscape view?

    How do I hide the side bar in landscape view?

    In Safari the side bar of bookmarks, etc. can be dismissed by touching the blue Bookmark icon. Swipe down on the screen to reveal the icon if hidden.

  • How can I hide the class file ??

    Hi !
    I has a question, when i write a program of Java, then use the command "javac" to compiler to class file for other people using, but the class file can be disassembled and convert to source code. How can I hide the class file and let people can not disassemble, or can not see the source code. Thinks

    See these....
    http://www.saffeine.com/
    http://www.jarsafe.com/
    I recently read this. This will help you.
    http://developer.java.sun.com/developer/qow/archive/160/index.jsp
    Enojy....
    Rajesh

Maybe you are looking for