Any way to disable scrolling for ListView?

I have a ListView inside a larger ScrollPane. What I want is the domestic substances list to ever scroll and rather for the ScrollPane container to expand its scrolling area as the list grows. Currently, the list scrolls and my external ScrollPane never shows its scroll bars because it is its internal content is still small enough not to need external scroll bars.

Someone at - it a way to make this happen? Currently, my only option seems to be that I ditch ListView all together and make my own list component that does not have a built-in scroll pane.

Some examples of code for what I'm trying to do. In this code, see the ListView scroll bars appear. I don't want, I want the shutters outside roll scroll bars (allowing the button 'Add' scroll on the top of the screen that the list is growing):
public class TestApp extends Application
{
    public static void main(String[] args)
    {
        Application.launch(args);
    }

    public void start(Stage stage) throws Exception
    {
        ScrollPane scrollPane = new ScrollPane();

        // tried with and without these - without the list just uses a fixed size regardless of content size
        scrollPane.setFitToWidth(true);
        scrollPane.setFitToHeight(true);

        BorderPane borderPane = new BorderPane();
        borderPane.setStyle("-fx-padding: 50");

        final ListView<String> list = new ListView<String>();
        list.getItems().addAll("Bilby", "Bettong", "Wallaby");
        borderPane.setCenter(list);

        Button button = new Button("Add");
        button.setOnAction(new EventHandler<ActionEvent>()
        {
            public void handle(ActionEvent event)
            {
                list.getItems().add("Another One");
            }
        });

        borderPane.setTop(button);

        scrollPane.contentProperty().set(borderPane);

        Scene scene = new Scene(scrollPane, 800, 600);
        stage.setScene(scene);
        stage.show();
    }
}
Appreciate any input, including "it is not possible" - at least then I can stop searching.

See you soon,.
zonski

Unfortunately, it is not possible at the present time. Unlike in the world of the swing where it was necessary to wrap a JList in a get, in JavaFX world you get the scrollpane 'free of charge '.

If you could clarify your use case I can be able to offer suggestions, although most likely I'm going to encourage you to produce a RFE by our JIRA.

-Jonathan

Tags: Java

Similar Questions

  • any way to disable scrolling on a scroller?

    I have a scroller wrapped around a group. I have also some movable elements in the group, and if the user clicks on a draggable element I would like to temporarily disable scrolling. then, when the item is deleted I would like to reactivate the scroll. I can't find all the properties on the knob to enable or disable scrolling. any ideas on how to achieve this?

    I discovered how to disable scrolling. falone use horizontalScrollPolicy and verticalScrollPolicy styles. Set them to 'off' like this:

    scroller.setStyle ('horizontalScrollPolicy', 'off');

    scroller.setStyle ('verticalScrollPolicy', 'off');

    and then back to 'on' or 'auto' when you want to reactivate.

  • Using Acrobat Reader XI: when you scroll the document .pdf, always a jump irrating on a restricted page.  Any way to smooth scrolling across borders?

    Any way to smooth scrolling beyond the limits of the page in Acrobat Reader?

    Hi mikeg57377139,

    Open Acrobat, go to the menu view-> Page display & activate scrolling.

    Let me know if t help.

    Kind regards

    Nicos

  • Is there a way to disable notifications for specific people or focus groups, without disabling notifications for everyone? (in messages)

    Is it possible, in messages, the rotation of notifications for specific people or groups of discussion, without disabling notifications for all incoming messages? I sometimes have a lot of messages from my daughter and my phone buzzes away all the time which can be annoying. I don't want to disable notifications entirely or do it on the silence on the other I miss important messages form other people.

    You can enable do not disturb on an individual message, but which will shut down the entire conversation if it's a group. This is not the same as activation do not disturb for the phone, which disables all notifications. Open messages, select the message in question, in the upper right, click details and then scroll to the bottom, you should find the switch to do not disturb.

  • Any way to disable the POST on REST consistency?

    I use 3.7 consistency with Grizzly to provide a rest interface (according to http://docs.oracle.com/middleware/1212/coherence/COHCG/rest_moddefault.htm#CICDBAAI).

    However, I only let gets through the REST interface - no MESSAGES or DELETIONS.

    I went through the docs, but could not find a way to disable certain operations. Is there a way to do this?

    Thank you

    So turns out if I had read the docs a little closer I could have understood it. For anyone else looking for something similar and not wanting to go down the whole route JAA (as detailed here: 7 securing Oracle coherence REST), basically to implement your own custom filters as detailed here: http://docs.oracle.com/middleware/1212/coherence/COHCG/rest_moddefault.htm#CICIFJHG

    My query filter for only gets looked a little like this:

    import javax.ws.rs.HttpMethod;
    
    import com.sun.jersey.spi.container.ContainerRequest;
    import com.sun.jersey.spi.container.ContainerRequestFilter;
    
    public class AllowGetsOnlyRequestFilter implements ContainerRequestFilter {
    
        @Override
        public ContainerRequest filter(ContainerRequest paramContainerRequest) {
            if (!HttpMethod.GET.equals(paramContainerRequest.getMethod())) {
                //only allow GETs
                throw new  UnsupportedOperationException(String.format("%s not supported. Only %s operations are supported", paramContainerRequest.getMethod(), HttpMethod.GET));
            }
            return paramContainerRequest;
        }
    
    }
    

    Then he wire upward on the method of registerContainerRequestFilters of your class that extends the DefaultResourceConfig

    getContainerRequestFilters().add(new AllowGetsOnlyRequestFilter ());
    
  • Any way to disable the cache Orchestrator?

    Hello everyone,

    We are faced with a few inconsistencies while working with workflows and vcloud Director web console at the same time, especially when you have to choose the entries at the beginning of the workflow.

    Any chance to disable the cache?

    Thank you

    Luciano

    What version of the plugin vCloud do you use? 1.5 or 5.1?

    There is no way to turn it off, but in 5.1, you can change the time-out period. If you put a short that you will get close to real time, but then he may have a performance impact.

    Christophe.

  • any way to disable the bank number when you reset program change?

    Hello

    I do not use bank number and wish to turn it off. whenever I'm doing a "reset change program number" he takes by default with the number of Bank B1

    is he way leave the bank number unchecked so that he won't be back on?

    Thank you

    Uncheck the box 'Bank Select' in the attributes of each patch.  You can select several patches at once by shift or command-selection... you cannot select several patches that span sets.  If you use several games in your concert, simply select all the patches in a set and change the attributes of patch for this entire selection, then select all patches in the next set and do the same thing and so forth.  See my screenshot below my tasks are numbered with P1, P2, etc. without bank numbers.

  • Any way to induce latency for VISA TCPIP

    I'm trying to debug the behaviour on my program with very poor connectivity networks, but I can't find a way to get poor connectivity I want. Anyone know of any kind of VISA or windows debugging tool, where I can intentionally introduce latency spikes, etc.?

    There are a lot of tools / options listed in this stackoverflow question:

    http://StackOverflow.com/questions/130354/how-do-i-simulate-a-low-bandwidth-high-latency-environment

  • Any way to disable Navigation (red box) when you use the hand tool?

    I work mainly on page 4: technical data sheets and find it easier to move using the hand tool to jump to another location. I'm embarrassed by the ceaseless appearance of what seems to be a (Heavy Red Box) Navigation frame that appears by pressing the hand tool to select a new location. Is it possible to disable this feature?

    You click and drag IMMEDIATELY to use the hand tool. There is no way to change this behavior.

    Bob

  • Online journal uses ads javascrpt, which takes about 1/2 of my screen on each side, is there a way to disable javascript for this site only?

    put ad on each side of the front page. article in the Middle; Scroll to the bottom of the ad is static, the article moves

    Yes. You can do it with the NoScript extension:

    https://addons.Mozilla.org/en-us/fire.../NoScript/

    You need to configure with a custom rule so that the script is blocked only on this 1 site.

  • Any way to disable Google safe browsing 'help '.

    Is it possible to disable the Google safe browsing feature?

    Or at least, replace 'Friends list' of Google with one that I actually trust?

    Tools > Options-> Security - block reported attack sites and ... fake website

  • Disable horizontal scrolling for iPad

    Hello

    I know that various iterations of this issue are floating around, but I was wondering if there is way to disable scrolling of elasic that iPad not without disabling the pinch zoom.

    I want to use the shot to the left and right swipe to change the information on the screen. The iPad of course automatically scrolls the page and then bounces. The work of scanning, but any interface is too wobbly.

    e.preventDefault();gives me the result of the move I'm looking but disables the zoom pinch. It is possible to have something between the two? When I go to yahoo.com on the ipad, it does not drag the screen to the left or right, only from top to bottom. Any ideas would be appreciated.

    Thank you

    Try to throw this in your

    (replace by whatever your width)

    Throwing just a guess, since I don't have an iPad to test with

  • lightbox overlay scrolling, but disable scrolling of body

    Dear all,

    I created a few magazines at this link without title 35

    However, when I scroll in the lightbox overlay and come out, I find myself in the middle of not the case. Is there a way to disable scrolling of the body while the overlay is active? Or in a way that I can come back just where I left

    Thank you for all the kind help

    Regarding

    Anh

    Unfortunately, you can't do this in Lightbox options, but if you do not want the objects on page to scroll with the page then you can pin their that would set them on the page.

    Thank you

    Sanjit

  • Need to disable acceleration hardware and smooth scrolling for users on a Remote Desktop Session.

    Hello
    I need to disable acceleration hardware and smooth scrolling for any user that connects to an RDS Server. I messed up the mozilla.cfg and created an autoconfig.js file. I guess I'm missing something along the way.

    This is currently my autoconfig.js
    Pref ("general.config.filename", "mozilla.cfg");
    Pref ("general.config.obscure_value", 1);
    Pref ("app.update.channel", "liberation");

    Mozilla.cfg
    Smooth Scrolling disabled
    lockpref ("general.smoothScroll.disabled", true);
    disables hardware acceleration
    lockPref ("layers.acceleration.disabled", true);
    lockPref ("gfx.direct2d.disabled", true);

    All that I'm missing? When I restart the two options are always checked in the options.

    Thank you!!

    Hi b1gt3x, you use a clear cfg file, you'll want to put this in your instead of autoconfig.js:

    pref("general.config.obscure_value", 0);
    pref("general.config.filename", "mozilla.cfg");
    

    In addition, you will have to make lockPref with a capital P in any case - that it reacts very sensitive to spelling errors...
    http://kb.mozillazine.org/Locking_preferences.

  • Is there any way to access the disabled user account record? : - 1.5 CWMS MR1

    Hello

    We, users who represent we want to turn off, but in that user profile recordings are available.

    As currently CWMS have no download option so we / he cannot store locally

    We want to know is there any way we can access his record after disabling his account?

    (FYI :-sso to authantication, we have implemented)

    Help & information will be our concern! Help, please

    Thank you

    Pratik Nimablkar

    Hey Pratik,

    As long as registration has been shared (manually via the share record option that has the host or through the e-mail received by participants) and then the link for registration will be still valid after the user is disabled.

    There is no other way to access this disk once the account is disabled, also to reactivate it, log and generate the share link for records associated with the account.

    Thank you

    Derek Johnson

    TAC Conference

Maybe you are looking for