Problems of ScrollPane

So when I got the odl my scroll pane sdk was working properly. The last week or so I've updated to 0.9.3 and now the scrollpane doesn't scroll (yes I know that the new SDK is released. I'm just downloading it as I type).

Essentially, here is my code for the scroll pane


var cOrg:Container = new Container();
var c00:Container = addIngredients();
cOrg.addChild(c00);
//cOrg.addChild(addSpacer1());
cOrg.addChild(addSpacer());
var c01:Container = addDirections();
cOrg.addChild(c01);
cOrg.align = ContainerAlign.NEAR;
cOrg.setSize(700, c00.height+25+c01.height);

//add to the scrollView
var scroller:ScrollPane = new ScrollPane();
scroller.width = 750;
scroller.height = 490;
scroller.y = 0;
scroller.addChild( cOrg );
addChild( scroller );

Any guidance here?

Hey,.

Since the update SDK, the method to add content to the object ScrollPane is as follows:

scroller.setScrollContent( cOrg );

hope that helps. Good luck!

Tags: BlackBerry Developers

Similar Questions

  • ScrollPane scrollbar does not refresh

    Hello

    Problem: Using ScrollPane to scroll a movieclip vertically. Works perfectly. Then using the buttons 'jump' to the sections in the ScrollPane using (for example: my_sp._y = 200). It works very well. Problem is I can't get the scroll bar in the ScrollPane to update its position.

    I searched all over the web, this forum, many others, Flash, google, etc. and can't seem to find the answer. I tried using my_sp.invalidate (); to refresh the ScrollPane, what he does, but he just jumps the moviclip in the scrollpane back at x = 0, y = 0. I don't want to reset everything, just the bar to scroll vertically to the movieclip. Someone has an idea what is missing here?

    Very much appreciated.

    Dave

    You try to move the content or the scrollPane? If you want to move the
    content vertically and have the change of wheel match, use the vPosition
    property.

    mySp.vPosition = 20;

    moves the content to the top of 20 and set the dial to match...

    --
    Dave-
    www.offroadfire.com
    Developer leader
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.Adobe.com/communities/experts/

  • Problem with sliders or TextArea in a ScrollPane quilting

    I could not find anyone else reporting this issue, but I am confused.

    I have a series of sliders, drop-down lists and a textarea on a ScrollPane area.  It worked fine on the Simulator (versions 1.0.6 and 1.0.7  However, I get problems only on the device:

    (1) when by tapping quickly on a slider to pop to a new location, you can see the bar side scrolling and at the time wherever you tap anywhere on the screen, all my content scroll disappears and the scroll bar is stuck at the bottom.

    (2) I type in the TextArea box and change the text.  When I type off the beaten path to get out, all my content scroll disappears and the scroll bar is stuck at the bottom.

    Somehow this problem seems to be that when you type scrollpane fits like a scroll event, at the same time where the box TextArea or the slider he recorded as a selection on it, and then when you continue further, it causes the problem.

    Any ideas?  Also has anyone seen this behavior?  Thank you!

    I thought about it.  Had to add an EventListener for each cursor and textarea to event MOUSE_DOWN StopImmediatePropagation on that box.

  • ScrollPane problem

    rtr.jpg

    ScrollPane = scrollpane

    image + text (video clip) = mytext

    ScrollPane and chart even width length of difference

    I want to drag with the hand.

    using the:

    scroolpane.source = mytext;

    rtr1.jpg

    result show me like this.

    create a new fla,

    Add a scrollpane component,.

    Create a new movieclip

    copy text and paste the static text on the stage of this clip.

    move the text to 0,0,

    Add the movieclip on the stage,

    assign an instance name (mytext),

    copy and paste your corrected code in the Panel shares,

    test.

    any problem?

  • ScrollPane + problem with dynamic text.

    Hello

    I use the ScrollPane component to display a movieclip that contains text. So far, I went to a few paragraphs, with the text field defined on "Static text"... but as I wrote a few more I noticed that the text box displays only half of my text. So I went to the "dynamic text", which solves the problem of display and get 100% of my text but now I always displayed onstage, even if it is available in the library... strange!

    Could somone help me please?

    Kind regards

    vedtam

    There is no visible scrollpane.

  • Problem with loading ScrollPane

    I have a SWF that loads another swf into a ScrollPane. The SWF being loaded is great... about 4 MB. My problem is that sometimes it loads well, sometimes it loads without the scroll bar, and sometimes you need to refresh the page before loading completely and correctly. My question: How can I easily test it has fully charged and that the scroll bars appear? I tried various scenarios with ProgressBars, etc., but even when 100% charged, the scroll bars do not load consistently. Any help would be appreciated. -Bill

    ScrollPane has getBytesLoaded() and getBytesTotal() methods that you can use to check if the content is completely loaded.  at this point, you can run an invalidate() or redraw() method.

  • ScrollPane problem with dynamically added components

    Hi all

    I am trying to add a series of 10 ComboBoxes in a ScrollPane one under the other. If the height of each ComboBox is reported as 22 the content mc displays a height of 298 (22 + 9 * 100). After filling the ScrollPane with 10 ComboBoxes, ScrollPane shows an empty space below the last ComboBox. I guess that somehow these components retain their default height (100) when added dynamically.

    Example of code at the end.

    The result is the same when adding of components such as Button, CheckBox, RadioButton.

    Any ideas what could be wrong? How can I make sure of ScrollPane content height of MovieClip is reported as 220 (10 * 22) with exact fitting ComboBoxes ScrollPane?

    And Yes, the required components are added to the library. The problem is not that they are not displayed... They display all beautiful... but just the height of the ScrollPane content is more than the actual content.

    It's a timing issue. You will need to listen an ENTER_FRAME after adding components - and then update the component ScrollPane;

  • ScrollPane problems w / content that drives execution

    I'm having a problem with the ScrollPane. I have a ScrollPane containing a MovieClip in my library. The MovieClip grows in height when running as the user adds additional user interface components for the MovieClip.

    Unfortunately, when the height of the MovieClip exceeds the visible area in the ScrollPane, ScrollPane doesn't recognize it. The scroll bar does not appear, and I can't scroll down to see the rest of the MovieClip (the vScrollPolicy property is set to auto). It seems that the ScrollPane only checks the size of the MovieClip content when it is loaded and is not re - check when running.

    Someone at - it an idea on what is happening and how I can fix this problem? Is there a way to get the ScrollPane to recognize that its content grew in height? I can force it to re - check the dimensions of the MovieClip content somehow? With the help of the refreshPane() method does not work, because it causes the content MovieClip being reloaded, which loses all the user interface components that have been added during execution by the user. Any help would be appreciated, because I'm rather stumped at this point.

    See you soon,.

    Jesse Jenkins

    Too bad. This was addressed in a thread on the forum general Flash. The answer is here: http://www.adobe.com/cfusion/webforums/forum/messageview.cfm?catid=194&threadid=1215809&CF ID = 19276555 & CFTOKEN = 7f637f4c57bc0a94-FD30B8BC - 0A 33 - A8AA - FB2887D076A8CC61 & jsessionid = 48303b 5950e738363f1f

  • ChoiceBox, ComboBox... with ScrollPane problem.

    Here is a simple Application to test:

    import javafx.application.Application;
    import javafx.collections.FXCollections;
    import javafx.scene.Scene;
    import javafx.scene.control.ChoiceBox;
    import javafx.scene.control.ComboBox;
    import javafx.scene.control.ScrollPane;
    import javafx.scene.layout.FlowPane;
    import javafx.stage.Stage;
    
    
    public class TestBox extends Application {
    
    
      @Override
      public void start(Stage primaryStage) throws Exception {
      ChoiceBox choiceBox = new ChoiceBox(FXCollections.observableArrayList(
      "choice 1", "choice 2", "choice 3"));
      ComboBox comboBox = new ComboBox(FXCollections.observableArrayList(
      "combo 1", "combo 2", "combo 3"));
      ScrollPane scrollPane = new ScrollPane();
      FlowPane flowPane = new FlowPane();
      flowPane.getChildren().addAll(choiceBox, comboBox);
      scrollPane.setContent(flowPane);
      Scene scene = new Scene(scrollPane);
      primaryStage.setScene(scene);
      primaryStage.show();
      }
    
    
      public static void main(String[] args) {
      launch(args);
      }
    }
    

    When we run the application, the scene shows. Then we click on the drop-down list box or box of choice, the related context menu shows. Then move the mouse to scroll the scroll bar, there is exception that appears:

    java.lang.NullPointerException

    to com.sun.javafx.scene.control.skin.ScrollBarSkin$ 8.handle(ScrollBarSkin.java:215)

    to com.sun.javafx.scene.control.skin.ScrollBarSkin$ 8.handle(ScrollBarSkin.java:199)

    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:69)

    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:217)

    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:170)

    at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:38)

    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:37)

    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)

    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)

    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)

    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)

    to com.sun.javafx.scene.control.skin.ScrollPaneSkin$ 11.dispatchEvent(ScrollPaneSkin.java:440)

    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)

    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)

    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)

    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)

    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)

    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:35)

    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:92)

    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:53)

    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:33)

    at javafx.event.Event.fireEvent(Event.java:171)

    to javafx.scene.Scene$ MouseHandler.process (Scene.java:3328)

    to javafx.scene.Scene$ MouseHandler.process (Scene.java:3168)

    to javafx.scene.Scene$ MouseHandler.access$ 1900 (Scene.java:3123)

    at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1563)

    to javafx.scene.Scene$ ScenePeerListener.mouseEvent (Scene.java:2265)

    to com.sun.javafx.tk.quantum.GlassViewEventHandler$ MouseEventNotification.run (GlassViewEventHandler.java:250)

    to com.sun.javafx.tk.quantum.GlassViewEventHandler$ MouseEventNotification.run (GlassViewEventHandler.java:173)

    at java.security.AccessController.doPrivileged (Native Method)

    at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:292)

    at com.sun.glass.ui.View.handleMouseEvent(View.java:528)

    at com.sun.glass.ui.View.notifyMouse(View.java:922)

    at com.sun.glass.ui.win.WinApplication._runLoop (Native Method)

    in com.sun.glass.ui.win.WinApplication.access$ 100 (WinApplication.java:29)

    to com.sun.glass.ui.win.WinApplication$ $3 1.run(WinApplication.java:73)

    at java.lang.Thread.run(Thread.java:722)

    Resolved by:

    scrollPane.setOnMouseMoved (new EventHandler() {}

    @Override

    public void handle(MouseEvent me) {}

    scrollPane.requestFocus ();

    }

    });

  • ScrollPane broke on the device

    Hey there,

    I am having trouble with the scrollpane UI element. I created a sprite that is larger than the scrollpane as content, so the pane scrolls. The problem is that when I test on the Simulator, everything works perfectly, however, when I test on the device the application crashes as soon as you press the shutter. Y at - it a bug with the scrollpane component that I'm not aware? I searched the forums for similar situations, but I can't seem to find a solution. Here's some code.

    content = new Sprite();
    content.graphics.beginFill( 0xDDDDDD );
    content.graphics.drawRect( 0, 0, 557, 500 );
    content.graphics.endFill();
    
    contentPane = new ScrollPane();
    contentPane.x = WIDTH * 0.3 + 80;  // WIDTH = 1024
    contentPane.y = 40;
    contentPane.width = 557;
    contentPane.height = HEIGHT - 80; // HEIGHT = 540
    contentPane.scrollDirection = ScrollDirection.VERTICAL;
    contentPane.setScrollContent( content );
    

    Any help would be appreciated.

    Hey all,.

    I thought about it. I had a structure relatively large screen, and the application has basically been getting bogged down in the structure of the event. As events have been passed through all the events of the display. Here are the two references used to decide the issue.

    http://www.leebrimelow.com/?p=2537

    http://help.Adobe.com/en_US/ActionScript/3.0_ProgrammingAS3/WS5b3ccc516d4fbf351e63e3d118a9b90204-7E4...

  • Summary last ScrollPane is not displayed

    Hello

    Im having a problem with my ScrollPane.

    I have a list of images displayed as lines on a container and the container is set as my ScrollPane scrollContent.

    I can scroll and see all my pictures, but not the last row

    When I scroll to the last row and HOLD my finger I see the last row

    But when I LET my finger, its does not stop there. The line will go down and invisible on the view

    To display the LINE in the FINAL, so I have to scroll upwards and HOLD my finger/mouse in the Simulator

    I tried to adjust the height of my container and scroller

    And searched the forum to see if anyone else having the same problem

    But I don't have a solution. Can someone help me solve this problem... Please

    Thanks in advance for any hel

    Also do some added content area where images if acutally has the right size before calling update() on the scroll pane. The height should be equal to every line multiplied by the number of lines.

  • White space at the end of a scrollPane?

    Hello.

    I have this error with a scrolling pane, that I added to my stage. The scrollPane component is created dynamically through a few lines of code. At the end of the movieClip in the scrollPane component, however, a blank space appears.

    Schermata 2015-10-30 alle 21.36.01.png

    It's the code, I work with:

    variables

    var spH:int = 307;

    var spW:int = 700;

    var spX:int = 0;

    Spy var: int = 80;

    var sp:ScrollPane = new ScrollPane();

    var totalMC:MovieClip = new MovieClip();

    ScrollPane properties

    sp.setSize (spW, spH);

    SP.x = spX;

    SP.y = spY;

    sp.horizontalScrollPolicy = 'off ';

    totalMC is so built and defined

    Add scrollPane to the scene

    SP.source = totalMC;

    addChild (sp);

    setChildIndex (sp, 3);

    If I add only the clip totalMC on stage, the gap does not show, so I thought it must be a problem with the scrollPane properties themselves.

    Can someone out there help me out?

    Thank you.

    This looks like a problem of code with your version of mc.  draw the height and confirm.

  • Problem of multithreading with Mac system task class

    I have a class that extends the thread

    public class Convert extends Task
    
    
    

    Inside the class, I have a need to interrogate a file every 5 seconds to see if the new file has been added to it or not.

    So that's what I did, is that I did a while loop inside of which I kept the logic and I did the sleep of thread for 5 seconds.

    @Override
        protected Object call() throws Exception {
            // TODO Auto-generated method stub
            try{
                while(!Thread.currentThread().interrupted())
                {
                      //my logic to query the folder
                        Thread.sleep(5000);
                 }
                  catch (Exception e) {
                        e.printStackTrace();
                }
              return null;
        }
    
    
    

    I call this thread via an ExecutorService

    ExecutorService exec = Executors.newCachedThreadPool(new ThreadFactory() {
            @Override
            public Thread newThread(Runnable r) {
                Thread thread = new Thread(r);
                thread.setDaemon(true);
                return thread;
            }
        });
    
    
    

    and then

    exec.execute(convert123); //where convert123 is an reference of Convert class
    
    
    

    This exec.execute is called on the press of a button.

    Now, the problem is that it seems to work fine on my windows machine, but blocks the scene just when clicking the same button on a MAC system. (It works for 1 or 2 out of 10 times, IE 8 times out of 10 times, the scene just gets hanged and unresponsive)

    I have never created a thread running forever, so there might be a problem with my design, but I have no idea about it.

    I don't see anything inherently wrong with that. You get all exceptions?

    Note that there is an built-in API (not very high level) to watch directories for changes. You still need the wire without end (that you can implement a task if you want to cancel easily), but it should make your code easier (no need to survey and waiting for a fixed amount of time, at least on operating with os level file systems I look).

    The following example can run several tasks ending not quite happily on my Mac.

    import java.util.concurrent.ExecutorService;
    import java.util.concurrent.Executors;
    import java.util.concurrent.ThreadFactory;
    
    import javafx.application.Application;
    import javafx.application.Platform;
    import javafx.beans.binding.Bindings;
    import javafx.beans.property.IntegerProperty;
    import javafx.beans.property.SimpleIntegerProperty;
    import javafx.concurrent.Task;
    import javafx.concurrent.WorkerStateEvent;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.geometry.Insets;
    import javafx.geometry.Pos;
    import javafx.scene.Scene;
    import javafx.scene.control.Button;
    import javafx.scene.control.Label;
    import javafx.scene.control.ScrollPane;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.layout.BorderPane;
    import javafx.scene.layout.VBox;
    import javafx.stage.Stage;
    
    public class NonTerminatingTaskTest extends Application {
    
        private static class CounterTask extends Task {
            private final IntegerProperty counter;
    
            private CounterTask(IntegerProperty counter) {
                this.counter = counter;
            }
    
            @Override
            public Void call() {
                while (!isCancelled()) {
                    try {
                        Thread.sleep(1000);
                        Platform.runLater(new Runnable() {
                            @Override
                            public void run() {
                                counter.set(counter.get() + 1);
                            }
                        });
                    } catch (InterruptedException exc) {
                        // allow to cancel
                    }
                }
                return null;
            }
        }
    
        @Override
        public void start(Stage primaryStage) {
            final ExecutorService exec = Executors.newCachedThreadPool(new ThreadFactory() {
                @Override
                public Thread newThread(Runnable r) {
                    Thread thread = new Thread(r);
                    thread.setDaemon(true);
                    return thread;
                }
            });
    
            final BorderPane root = new BorderPane();
            final VBox counterContainer = new VBox(5);
            counterContainer.setPadding(new Insets(10));
            final ScrollPane scroller = new ScrollPane();
            scroller.setContent(counterContainer);
            root.setCenter(scroller);
    
            final Button startCounterButton = new Button("Start new counter");
            startCounterButton.setOnAction(new EventHandler() {
                @Override
                public void handle(ActionEvent event) {
                    final Label label = new Label();
                    final IntegerProperty counter = new SimpleIntegerProperty();
                    label.textProperty().bind(Bindings.format("Count: %s", counter));
                    final Task counterTask = new CounterTask(counter);
                    counterTask.setOnCancelled(new EventHandler() {
                        @Override
                        public void handle(WorkerStateEvent event) {
                            counterContainer.getChildren().remove(label);
                        }
                    });
                    label.setOnMouseClicked(new EventHandler() {
                        @Override
                        public void handle(MouseEvent event) {
                            counterTask.cancel(true);
                        }
                    });
                    counterContainer.getChildren().add(label);
                    exec.submit(counterTask);
                }
            });
    
            startCounterButton.setAlignment(Pos.CENTER);
            root.setBottom(startCounterButton);
    
            Scene scene = new Scene(root, 200, 450);
            primaryStage.setScene(scene);
            primaryStage.show();
        }
    
        public static void main(String[] args) {
            launch(args);
        }
    }
    
  • There is no viewportWidthProperty() for the ScrollPane?

    A component of flow is encapsulated in the scrolling pane, and I want the width of the pane flow is simply equal to the width of the viewport of the scroll pane once the step is indicated.

    Consider these codes:

    flowPane.prefWrapLengthProperty().bind(scrollPane.widthProperty());
    

    run without error.

    flowPane.prefWrapLengthProperty().bind(new SimpleDoubleProperty(scrollPane.viewportBoundsProperty().get().getWidth()));
    

    run with the nullPointer exception. I know that it is obviously the "scrollPane.viewportBoundsProperty () .get ()' which gives the null value. But I can't find the "scrollPane.viewportWidthProperty ()" effectively in the api from JavaFX 2.2

    Question:

    1. There is no viewportWidthProperty() for the ScrollPane?

    2. If I use the calculation "viewportWidth = scrollPane width - width of the vertical scroll bar '? Also, can I viewport or scroll to the object pane scroll bar objects?

    Note: actually, finally, I looked for a long time the api, and I found that 'setFitToWidth (true)' can achieve the desired effect.

    I practiced the two methods you suggested. Use the method:

    someDoubleProperty.bind(new DoubleBinding() {
    { super.bind(scrollPane.viewportBounds());}
    @Override
    public double computeValue() {
    return scrollPane.getViewportBounds().getWidth();
    }
    });
    

    has the same problem of null pointer exception report. I think because it is through this code snippet is placed before 'primaryStage.show ()', 'scrollPane.getviewportBounds ()' is null.

    Another method:

    someDoubleProperty.bind (Bindings.selectDouble (scrollPane.viewportBoundsProperty (), "width"));

    run without exception, but does not reach the goal. I think it is because there is no "width" (member of the class) property defined within the class.

    Overall, I found the solution: setFitToWidth (true);

  • The tab does not work inside the Scrollpane (AS3)

    Hello

    I have a movieclip with some input text fields. It's like a form. I need to use scrollpane due to its size. If I join this movieclip in the scrollpane component, the tab does not work between these text fields. When I press the tab, the focus moves to the scrollpane himself.

    I tried to set the tabIndex to the textfields. tabChildren and tabEnabled to true for the ScrollPane, but nothing seems to work.

    Please help if anyone has a solution for this.

    Finally found answer on another post. Add the following line of code solved my problem.

    sp.focusManager.deactivate ();

Maybe you are looking for

  • Disable ringtones?

    My iPad has suddenly started playing a ringtone when my phone rings. There is no option to do nothing the way there are alerts. How can I turn off the ringer? Thank you!

  • Qosmio X 305 crashes when you play

    I have a problem, whenever I play a game, my laptop goes down, it only lasts 10 minutes of game (like COD 4, GOW, Crysis) and need me a black screen where I need to do a hard reboot. I tried, change drivers, control my temperature, even a reinstall o

  • Automation of MS Outlook

    Hi all I want to automate MS Outlook using ActiveX. My requirement is to fill out the address of a new mail through LabVIEW line. Thanks in advance Karine

  • New range of printers HP laserjet 1102w

    I just installed my HP laserjet pro P1102w printer.  It will not print a test page or anything else.  The docs are in the queue.  I finally reached the support staff, we have downloaded drivers, etc..  Has been disconnected from the support staff.  I

  • CD/DVD don't work after Microsoft changed the drivers

    _NEC DVD + RW ND-3450 ATA Device A driver (service) for this device has been disabled.  Another driver can provide this functionality. (Code 32) Driver file detailsC:\Windows\system32\DRIVERS\cdrom. SHSC:\Windows\system32\Drivers\PxHlpa64sys [origina