Scroll in the pane to scroll pane

Hi all

I'm trying to implement a user interface in which a horizontal ScrollPane behaves something like the iPhone (the one with all the app icons) home screen.  When a smear user right or left, the screen moves in the appropriate direction, snapping to the appropriate 'page'.

This worked pretty well, but the first view must have a vertical ScrollPane inside.  If the user left or right moves the view has pass, but if the user slides up or down, the view remains the same - on the first page of scrolling pane scrolls right in the appropriate direction.  As soon as I added the second ScrollPane, everything stopped working.  Then, I made the internal ScrollPane has been to launch the ScrollEvent.SCROLL_BEGIN and ScrollEvent.SCROLL_END events, and now the part slam and scrolling, but very erratically.  I'm quite frustrated, I was wondering if someone could give me a hand here.

Here's what I mean:

var scroller:ScrollPane;
var containerMain:Container;

var containerHome:Container;
var container2:Container;
var container3:Container;

function ContentSlider(){
...
//configure containerMain, containerHome, container2, container3, etc.
...
var v:ViewHome = new ViewHome();
configureScroller(v);
containerHome.addChild(v);  

containerMain.addChild(containerHome);
containerMain.addChild(container2);
containerMain.addChild(container3);
numPanes=3;

//1024 * number of views
containerMain.setSize(1024*3,600);

scroller.setScrollContent(containerMain);
addChild(scroller)
}

        private function onScrollBegin(ev:ScrollEvent):void{
            originalScrollX=scroller.scrollX;
        }

        var i:int=0;
        var oldDelta:int=0;
        private function onScrollEnd(ev:ScrollEvent):void{
            trace(i.toString() + ": "+ev.currentTarget);
            i++;
            if(ev.currentTarget!=this.scroller)
                return;

            var delta:int = originalScrollX - scroller.scrollX;
            if(oldDelta==delta)
                return;

            oldDelta=delta;

            var scrollTo:int=0;
            var scrollTime:Number = 0.4;

            if(delta >1024)
                delta=1024;

            if(delta<-1024)
                delta=-1024;

            l2.text=delta.toString();

            //snap to previous view (to the left)
            if( delta > this.SCROLL_THRESHOLD ||
                ( (0<(delta*-1)) && (delta*-1) this.SCROLL_THRESHOLD){
                selectedIndex++;
                if(selectedIndex>numPanes-1)
                    selectedIndex=numPanes-1;
            }
            scrollTo = selectedIndex*1024;
            trace("delta: " + delta);
            trace("scroll to: " + scrollTo.toString());
            trace("selected index: " + selectedIndex.toString());
            //meat and potatoes:
            Tweener.addTween(scroller,{scrollX:scrollTo,time:scrollTime,transition:"linear"});
        }

And in the other class (ViewHome), I have a lot of Visual elements, one of them being the vertical ScrollPane.  Everything I have there are

scrollerVertical.addEventListener(ScrollEvent.SCROLL_BEGIN,f);
            scrollerVertical.addEventListener(ScrollEvent.SCROLL_END,f);
            scrollerVertical.addEventListener(ScrollEvent.SCROLL_MOVE,f);

private function f(ev:ScrollEvent):void{
            this.dispatchEvent(ev);
        }

Hey cyangreen,

Yes, I came across the same problem some time. I couldn't find a solution for this. When you have a scrollpane in a scroll pane, strange things begin to happen. I feel (from what I've read and seen) it's because the ScrollPane uses the position of the mouse in the scene. also the fact that the scrollpane receives apparently even mousedown events when there is an object on top of it he receives first. the only thing I can think is waiting until we have Swipe gestures available to use in the Simulator. hope that sheds some light. Good luck!

Tags: BlackBerry Developers

Similar Questions

  • SV 11.1.2 freeze the panes

    11.1.2 we installed on a laboratory server and I've been playing with the new feature. A question I found was when I opened a web form in Excel (2007), I am not able to freeze the panes. So, as soon as I scroll down or to the right, I see are numbers and no context.

    Anyone run into this issue or have a 11.1.2 installed instance that can confirm if it works correctly for you? I hope that it's just a problem with our local installation and not a bug in the new version.

    When a planning form is loaded in excel, it is protected and freezing capacity is not available for a sheet protected in Office 2007, if it is possible in the case of office 2003. To use the option of gel for Office 2007, the user needs to unprotect the sheet.

  • How to turn off the pane in the reading mail

    How to turn off the pane in the reading mail

    Hello! I think that the thing by Duane helps you solve your problem.

    Show/Hide Preview mail pane

  • Subvi the pane opens on run

    When debugging a problem in my code, I used the suggestion in the solution of:

    http://http: / / forums.ni.com/t5/LabVIEW/subvi-running-normal-when-alone-but-not-inside-main-vi/m-p/74...

    In other words, I changed my Subvi VI properties so that it opens the pane when it is executed.  When you are finished, I changed the VI back to default properties.  But it nevertheless opens.  I did it and saved it again and recorded.  I choose Customize and unchecked the box to open the pane when running (which seems to change automatically customize default selection).  I closed and reopened LabVIEW.  I restarted my computer.  The variation of properties VI is still there (saying don't not open when running), but returns the right pane.

    Any suggestions?

    Thank you.

    Batya

    OK, I got it.  Unfortunately, I tried two things at once (which I was sure that I did yesterday ) so I don't know who it is who sets.

    First of all, I forgot to mention that it is a project in real time.  So I rebooted the system in real time.

    I also deleted the cache of the compiled object.

    I really thought that I had already tried this.  Maybe I had to do it twice?

    Thank you for your help.

    Batya

  • Does anyone has found a device driver for the Tablet the Pan TC970?

    Original title: - that someone has found a device driver for the Tablet the Pan TC970?  Thank you

    Someone has found a device driver for the Tablet the Pan TC970 and do I need a

    to transfer the data from my laptop to Tablet?  Thank you

    Hi Youbetya,

    Are which driver you referring?

    I suggest you to see the following link to transfer the data from the Pan TC970 Tablet laptop.
    http://lepantab.com/index.php?option=com_content&view=article&ID=70&Itemid=85

  • Content of the pane Navigation fleet back

    When I try to use the Vista Navigation pane to access folders on my computer, it tends to float to the left to view the directory names better.  But in doing so it does not point to the left of the directory names.  I have the pane stretched enough wide, I don't think it's in the case.  I have a few long directory names, I want to clarify the contents of directories.  But this requires records to float left making it is impossible to reach the directories that are shorter named.  Is it possible to lock this little sucker in place?  Any help would be appreciated, thanks.

    Hello

    This behavior is by design.

    However, you may write us with your comments and suggestions to Windows Vista feedback: http://mymfe.microsoft.com/Vista/Feedback.aspx?formID=83

  • Prevent the pan app screen, zoom?

    Is there a way to prevent the pan screen app & zoom, for example, when the button in a textarea? I noticed that this behavior is not visible in the browser of the Playbook. Thank you.

    Add your tag meta with the initial scale = 1.0, scalable user = no

    
    
  • The jamming of the PAN

    Hi all

    11.2.0.3.11

    AIX6.

    Our auditor TI give me the task of providing an acceptable algorithm to scramble a pan that is necessary for the real-time data tested on database-UAT. The obfuscation algorithm must not be decrypted by myself DBA who run, or can not be reversed engineering? (if this is not possible, I'll just pretend that I don't know the algorithm)  Our STOVE is tank (19) than the first 6 (1-6) should be kept as this will indicate which Bank it is. only the 7th to the 19th will be juggled to be obfuscated.

    The requirement is that TransTable MasterTable a PAN that has PAN in the child table. The obfuscated MOLD should be uniform or equal algorithm so that the parent Table has yet to see his child through the PAN Table, when they be paired. Note that randomize, function will not match the two pans to table parent & child.

    V. other useful guys and Billy has provided solutions to my previous post (last week), I need to review today. But the post was lost

    Can DBMS_CRYPTO handled this kind of requirement?

    Help, please...

    Thank you

    MK

    No - your other post was NOT lost.

    How to add a number to a tank?

    You can been told repeatedly not to create duplicate threads.

    Mark this thread ANSWER and continue to use your other thread.

  • I have a few sequences where I don't have the option to adjust the Pan for the entire track. How can I get this panoramic option whole track?

    I have a few sequences where I don't have the option to adjust the Pan for the entire track. How can I get this panoramic option whole track?

    With an Adaptive track you get a balance option, with a standard track, you get an option of pan.

    It is the option in the track mixer.

  • Adobe Acrobat opens with the selection tool chosen, instead of the Pan tool

    Does anyone know how to change the settings such as acrobat automatically has the Pan tool selected when opening a document?

    Hi chrisp,.

    I got the chance to get the hand to 'paste' default tool by choosing the following preference settings:

    Document:

    • Select 'Restore last view settings... ". »

    General:

    • Select the options «Tool brand...» »

    Accessibility:

    • Uncheck the "always display the keyboard selection cursor.

    Please let us know how it goes.

    Best,

    Sara

  • Why the Pan &amp; Zoom Tool cannot start with the frame using photos

    I used the animation panning and zoom in Microsoft Movie Maker - and want the same ease of use in any other program (I find that he does a great job of a soundtrack placement and text/image) see options from the menu below...   I purchased Premiere Elements after watching a short video of the pan & zoom tool - but now I'm trying to use it it falls way short.

    Y at - there a way for me to select the whole photo as the starting frame – in the screenshot below that frame 1 will extend to the entire photo, so I'm going with a cropped image.  I want the full Frame of the photo and then be able to zoom and pan in the direction of faces - while I can still do it with the cropped image I lost part of my picture and the context it provides.

    The Microsoft Movie Maker - very easy options |              Limitation of the first of 13 elements start with the complete picture frame

    MMM_Pan-Zoom.jpgPE13_pan-zoom.jpg

    Found a good explanation of this question in the forum first elements

    Pan and zoom tool

  • Change the position of the pane in a Voletfractionne

    It is a simple code for Voletfractionne field

    import javafx.application.Application;
    import javafx.geometry.Orientation;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.scene.control.SplitPane;
    import javafx.scene.layout.Pane;
    import javafx.stage.Stage;
    
    
    /**
    *
    * @author utente
    */
    public class SplitPaneDragAndDrop extends Application {
       
        @Override
        public void start(Stage primaryStage) {
                  
            Pane root = new Pane();
            SplitPane sp = new SplitPane();
            sp.setPrefSize(800, 650);
           
            Pane one = new Pane();
            Pane two = new Pane();
            Pane three = new Pane();
            Pane four = new Pane();
           
            Label first = new Label(" Pane One");
            Label second = new Label(" Pane Two");
            Label third = new Label(" Pane Three");
           
            two.getChildren().add(first);
            three.getChildren().add(second);
            four.getChildren().add(third);
           
            sp.setDividerPositions(0.5f, 0.65f, 0.8f);
           
            sp.getItems().addAll(one, two, three, four);
            sp.setVisible(true);
            sp.setOrientation(Orientation.VERTICAL);
           
            root.getChildren().add(sp);
           
            Scene scene = new Scene(root, 800, 650);
           
            primaryStage.setTitle("SplitPane dragging test");
            primaryStage.setScene(scene);
            primaryStage.show();
        }
    
    
        /**
         * The main() method is ignored in correctly deployed JavaFX application.
         * main() serves only as fallback in case the application can not be
         * launched through deployment artifacts, e.g., in IDEs with limited FX
         * support. NetBeans ignores main().
         *
         * @param args the command line arguments
         */
        public static void main(String[] args) {
            launch(args);
        }  
    }
    

    I would like to know if it is possible to change the position of the left pane of the mouse and drag the: in the example, let's suppose I want to change position in a stream with three pane by click and drag over the area of the pane, is it possible?

    How to get there?

    Thank you

    It is probably more useful to you look at the FlowPane code and to find a way to change it to do what you want. You'll learn more that way.

    It is essentially if you can't get there. There is a little quirk with the positions of the divider; not very well why, but you can experiment with it.

    import java.util.Arrays;
    
    import javafx.application.Application;
    import javafx.beans.property.ObjectProperty;
    import javafx.beans.property.SimpleObjectProperty;
    import javafx.collections.ObservableList;
    import javafx.event.EventHandler;
    import javafx.geometry.Orientation;
    import javafx.scene.Node;
    import javafx.scene.Scene;
    import javafx.scene.control.Label;
    import javafx.scene.control.SplitPane;
    import javafx.scene.input.ClipboardContent;
    import javafx.scene.input.DragEvent;
    import javafx.scene.input.Dragboard;
    import javafx.scene.input.MouseEvent;
    import javafx.scene.input.TransferMode;
    import javafx.scene.layout.Pane;
    import javafx.stage.Stage;
    
    /**
    *
    * @author utente
    */
    public class SplitPaneDragAndDrop extends Application {
    
        private static final String SPLIT_PANE_DRAG_ITEM = "SplitPaneItem";
    
        @Override
        public void start(Stage primaryStage) {
    
            Pane root = new Pane();
            SplitPane sp = new SplitPane();
            sp.setPrefSize(800, 650);
    
            final ObjectProperty currentlyDraggedPane = new SimpleObjectProperty<>();
    
            Pane one = createPane(currentlyDraggedPane, sp);
            Pane two = createPane(currentlyDraggedPane, sp);
            Pane three = createPane(currentlyDraggedPane, sp);
            Pane four = createPane(currentlyDraggedPane, sp);
    
            Label first = new Label(" Pane One");
            Label second = new Label(" Pane Two");
            Label third = new Label(" Pane Three");
    
            two.getChildren().add(first);
            three.getChildren().add(second);
            four.getChildren().add(third);
    
            sp.setDividerPositions(0.5f, 0.65f, 0.8f);
    
            sp.getItems().addAll(one, two, three, four);
            sp.setVisible(true);
            sp.setOrientation(Orientation.VERTICAL);
    
            root.getChildren().add(sp);
    
            Scene scene = new Scene(root, 800, 650);
    
            primaryStage.setTitle("SplitPane dragging test");
            primaryStage.setScene(scene);
            primaryStage.show();
        }
    
        private Pane createPane(final ObjectProperty currentlyDraggedPane,
                final SplitPane splitPane) {
            final Pane pane = new Pane();
            pane.setOnDragDetected(new EventHandler() {
                @Override
                public void handle(MouseEvent event) {
                    Dragboard dragboard = pane.startDragAndDrop(TransferMode.MOVE);
                    ClipboardContent content = new ClipboardContent();
                    content.putString(SPLIT_PANE_DRAG_ITEM);
                    dragboard.setContent(content);
                    currentlyDraggedPane.set(pane);
                    event.consume();
                }
            });
            pane.setOnDragOver(new EventHandler() {
                @Override
                public void handle(DragEvent event) {
                    Dragboard dragboard = event.getDragboard();
                    if (dragboard.hasString()
                            && SPLIT_PANE_DRAG_ITEM.equals(dragboard.getString())
                            && currentlyDraggedPane.get() != null
                            && currentlyDraggedPane.get() != pane) {
                        event.acceptTransferModes(TransferMode.MOVE);
                        event.consume();
                    }
                }
            });
            pane.setOnDragDropped(new EventHandler() {
                @Override
                public void handle(DragEvent event) {
                    Dragboard dragboard = event.getDragboard();
                    Pane incomingPane = currentlyDraggedPane.get();
                    if (dragboard.hasString()
                            && SPLIT_PANE_DRAG_ITEM.equals(dragboard.getString())
                            && incomingPane != null && incomingPane != pane) {
    
                        ObservableList items = splitPane.getItems();
                        int indexOfIncomingPane = items.indexOf(incomingPane);
                        int myIndex = items.indexOf(pane);
    
                        double[] dividerPositions = splitPane.getDividerPositions();
    
                        // Swap items, being careful to remove both before adding
                        // both back.
                        // Doing this in the wrong order will violate rules of the
                        // Scene graph.
    
                        int rightIndex = Math.max(indexOfIncomingPane, myIndex);
                        int leftIndex = Math.min(indexOfIncomingPane, myIndex);
                        Node rightNode = items.remove(rightIndex);
                        Node leftNode = items.remove(leftIndex);
                        items.add(leftIndex, rightNode);
                        items.add(rightIndex, leftNode);
    
                        // Maybe do something more sophisticated here to maintain
                        // original relative
                        // sizes of each pane
                        splitPane.setDividerPositions(dividerPositions);
                    }
                }
            });
            return pane;
        }
    
        /**
         * The main() method is ignored in correctly deployed JavaFX application.
         * main() serves only as fallback in case the application can not be
         * launched through deployment artifacts, e.g., in IDEs with limited FX
         * support. NetBeans ignores main().
         *
         * @param args
         *            the command line arguments
         */
        public static void main(String[] args) {
            launch(args);
        }
    }
    
  • How to automate the pan/zoom functions?

    Version: Adobe Premiere Elements 12

    OS: Windows 7

    I do a lot of fixtures where most of the video is photos.

    Is it possible to automate the pan/zoom in a random way, I can change it later to my taste?

    Most of the time, I have a lot of photos, if I do frame-by-frame manually it will take me forever. It is not really an option...

    I am happy to buy an add-in, if anyone knows of any.

    Thank you

    Simon

    Simon

    After you create your slideshow in elements Organizer create Menu/slide show and its slideshow Editor, be sure to save in the organizer of items as a slideshow. To do this, look at the top left of the Organizer workspace of elements. In the line below the file programming, directly, edit view, and help Menus, click on 'save project '. The slide show will be save to the organizer of items as a"slide show". Look to the upper right of the thumbnail for slide show recorded in the Organizer workspace of elements. When you have your mouse cursor on this box, a pop-up with slide show project confirmation. In this format, you can double-click this vignette to reopen the slideshow in the slideshow Editor workspace of the workspace elements Organizer for further changes and re-registration in the Organizer workspace of elements. You can even this thumbnail in this place right click and select Edit with Premiere Elements (if you do not want to return to the slideshow Editor workspace.)

    Now, if you are in the slideshow editor and that you want to move the slide show done in Premiere Elements, then go to the exit at the top of this workspace option in organizing elements slideshow Editor, and select Edit with Premiere elements Editor. This will put your slide show on the chronology of the first elements in the form of video file together. Here's the beautiful part. If you want to make further changes to this video file together, right click on the video on the Timeline entire file and select and click Break Apart elements Organizer slideshow to give you the flexibility of the most important changes.

    Please note the following details, which should be included so that they are not a surprise...

    a. better manually set the Premiere Elements project preset before opening the organizer of items for the transfer to the slide show for Premiere Elements project. The following includes how to manually set the Premiere Elements project preset.

    First Elements ATR troubleshooting: PE11: accuracy of the project auto Preset setting (new project dialog box)

    Have you had time to read the Adobe document on the creation of slideshows.

    Adobe elements Organizer 11 * create slideshows (Windows only)

    Do not hesitate to ask if you need more clarification on what it is written. We can fill in details, including screenshots if necessary.

    Can't wait to hear of your progress.

    Thanks for the follow-up.

    RTA

  • How can I turn off the pane to export it to PDF in Reader XI?

    How can I turn off the pane to export it to PDF in Reader XI? It takes too much space to the precious screen?

    Click on the TOOLS button again and the tools Panel should disappear.

  • 10.1.2 AR - how to turn off the pane of sign?

    Recent improvements to 10.1.2 now include the pane sign for the drive and the button sign displays by default on the right side of the toolbar.  The release notes for 10.1.2 indicate:

    "The presence and behaviour of the sign pane can be configured by admins via the preferences at the registry level."

    The GOAL for the Acrobat tool says that but, it doesn't seem to work.  Any ideas? :

    sigpane.JPG

    The path of the lock is incorrect. It must be

    • HKLM\SOFTWARE\Wow6432Node\Policies\Adobe\Acrobat Reader\10.0\FeatureLockDown\cServices on 64 - bit systems
    • HKLM\SOFTWARE\Policies\Adobe\Acrobat Reader\10.0\FeatureLockDown\cServices on 32 - bit systems
  • How to view the pane to Webhelp TOC

    I use RoboHelp 7 for HTML to produce Webhelp projects.

    I find that whenever I am compile the project, once it is integrated into the software application, it is intended, the table of contents, Index, and search pane does not automatically appear. Instead, there is a 'Show' link at the top left of the window in the topic. When you select, you'll see the pane.

    Users of the application are complaining that they are unable to navigate the help because there is not FAKE! It has occurred to them click on the link 'display '. Is it possible that the component table of contents can be made to automatically display?

    Just tested on RoboHelp 7 and it works fine for me. Can you check the following:

    • The script is inserted in the footer of your template and not in the body.
    • All subjects using the model.

    Also, what browser are you using?

    Take a bow

    Willam

Maybe you are looking for