Scroller fixed at bottom

I am having a RichEditableText field fich gets filled with text dynamically. There is a vertical scroller attached to it which should behave exactly the opposite way as it does.
I need to have it to stick to the bottom the field, displaying the last line. However this does not work.
My setup is as follows:
I am having a text input field to enter text.
I am having the RichEditableText field surrounded by the <s:scroller> control.
And I set the VerticalScrollPosition of the scroller to the RichEditableText content.height.
Now this is what is happening and it is really weird:
When entering text it gets displayed properly. When I have entered a few lines the vertical scroll bar appears as intended. But then the scrollbar does no longer get updated with every new line entered. In fact it only gets updated every 3 new line. Then it stick to the bottom for 1 input and then it pauses for 3 more inputs. It is very weird.
When I set it to listen to the updateCompete event of the RichEditableText field and set the VerticalScrollPosition of the scroller to the RichEditableText content.height it works as intended and the scrollbar remains at the bottom. However now scrolling is no longer possible as every attempt to scroll causes the update event to get fired, thus bouncing the scrollbar back to the content height value.
So it seems that one solution could be to find another event that is fired when the RichEditableText field has been updated, but does not fire when the scrollbar is the reason for updating, or to prevent the updateCancel Event to fire when the field has been updated due to scrolling.
Or there is a totally different approach to get this working. But I was not able to get it working the way I need it yet. Any help or hints would be appreciated.
Here is the code of what I am doing:
MXML part:
<s:Scroller id="vscroller" width="100%" height="100%" horizontalScrollPolicy="off">
<s:RichEditableText height="100%" width="100%" id="ret" updateComplete="ret.verticalScrollPosition=ret.contentHeight;"/>
</s:Scroller>
Actionscript part:
flow = TextConverter.importToFlow(message, TextConverter.TEXT_FIELD_HTML_FORMAT) as TextFlow;
paragraph = flow.getChildAt(0) as ParagraphElement;
ret.textFlow.addChild(paragraph);
ret.textFlow.flowComposer.updateAllControllers();

if anyone still need a solution:
you should attach event listener to RichEditableElement before adding new text line, then catch event and update scroller.verticalScrollBar.value to it's maximum. the reason is you update scroll position before text area changed and completely updated, but you should do this after. example follows:
     chatTextArea.addEventListener(mx.events.FlexEvent.UPDATE_COMPLETE, onChatTextAreaChanged);
     chatTextArea.textFlow.addChild(line);
public function onChatTextAreaChanged(event:*):void {
     chatTextArea.removeEventListener(mx.events.FlexEvent.UPDATE_COMPLETE, onChatTextAreaChanged);
     chatTextScroller.verticalScrollBar.value = chatTextScroller.verticalScrollBar.maximum;

Similar Messages

  • Firefox scrolls to the bottom of the page when I press the down arrow, instead of moving through the text.

    When I press the down arrow on Firefox, it scrolls to the bottom of the screen. I'm almost always just trying to move the vertical scroll bar down one or two picas (or however you measure it). This didn't used to happen until about 2009. Any suggested fixes?
    == This happened ==
    Every time Firefox opened
    == 2009

    Did you try hitting the '''F7''' key?

  • How 2?: fixed footer, bottom left corner of browser

    ... trying to make a footer 252px high and 800px wide that is fixed (does not scroll) in the bottom left corner of the browser window. how do I deal with adapting to different resolutions?

    Here's another tutorial that may help with fixed footers:
    http://www.dave-woods.co.uk/index.php/css-fixed-footer/
    Sticky footer:
    http://www.cssstickyfooter.com/
    Nadia
    Adobe® Community Expert : Dreamweaver
    http://www.perrelink.com.au
    Unique CSS Templates | Tutorials | SEO Articles
    http://www.DreamweaverResources.com
    http://twitter.com/nadiap

  • I have a version 7.0.4.  I can't connect to the server.  My capacity is 13.5  with 10.4 GB available.  Diagnostics and usage data, when scrolled to the bottom, tells me I have low memory.

    I have a version 7.0.4.  I can't connect to the server.  My capacity is 13.5  with 10.4 GB available.  Diagnostics and usage data, when scrolled to the bottom, tells me I have low memory.How cani fix this?

    Clear Safari, close all apps on the iPad and reboot. Then see if you can connect.
    Go to Settings>Safari>Clear Cookies and Data.
    Double tap the home button and you will see apps lined up going left to right across the screen. Swipe to get to each app then swipe "up" on the app preview thumbnail to close it.
    Reboot the iPad by holding down on the sleep and home buttons at the same time for about 10-15 seconds until the Apple Logo appears - ignore the red slider if it appears on the screen - let go of the buttons. Let the iPad start up.
    If you still can't connect to the internet, you need to do some more troubleshooting with the network connection, but report back with more details if that doesn't work and don't just repeat the question in the text box are that you have to describe the problem. That serves no purpose at all.

  • Since I installed IOS 8.0.2 (was ok on IOS7),on my iPad 4 "photos" don't scroll properly, it freezes and staggers, it's really slow to scroll to the bottom of the page (in Album, Events From My IMac) it's very annoying!

    Since I installed IOS 8.0.2 (was ok on IOS7),on my iPad 4 "photos" don't scroll properly, it freezes and staggers, it's really slow to scroll to the bottom of the page (in Album, Events From My IMac) it's very annoying!

    I'm not sure, but I know it's not recommended to upgrade to iOS 8 on anything older than an iPhone 5. I only lost my music playlists and music that was on my phone, but that music is also on my iTunes, not the playlists though, and I don't want to go through ALL my iTunes library to fix it either... But it seems I don't have a choice right now.
    Whatever you do, do NOT upgrade to iCloud Drive, keep iCloud till OS X Yosemite comes out, if your computer is a Mac. I also just noticed that all my documents on my phone are gone from Pages, BUT if I go on the iCloud website they are still there. Hopefully it will all work itself out when I can update my macbook pro to OS X Yosemite.
    If you backed up your phone and all your purchases off your iPhone prior to trying to upgrade you should be fine... But I'm not even remotely sure.

  • Can't Scroll To The Bottom Of The Page

    I’ve had an issue pop up that I need help with in trying to remedy. I have developed the following page to work on IE 7 & 8, Safari, Chrome, Opera, and Firefox.......
    Totten Insurance Group Products Page
    ...... it was discussed, critiqued, and developed over several months by an entire team of people who saw several different designs and concepts that I presented to them and it works fine on all browsers, unless you make a menu selection and navigate away from this page, and then go back to this page.
    Give it a try, you'll see what I mean. For example, if you scroll over "Commercial Casualty" and selection "Airside Liability" from the list, and then go back, you won't be able to scroll to the bottom of the Commercial Casualty menu. It keeps jumping up and won't allow you to see the bottom of the menu(s), unless you refresh the page.
    Any suggestions on how to remedy this so users don't have to refresh the page?
    Aaryn

    Try hitting '''F7'''. You probably inadvertently activated Caret browsing. <br />
    http://kb.mozillazine.org/Accessibility.browsewithcaret

  • Space appears after text when you scroll to the bottom

    i am a newbie flash designer. a client has asked me to make modifications in a flash file used on his website. it is flash 8 actionscript. i am currently working on the same and would appreciate your help. the client has given me 'divisions.swf' file which i decompiled using sothink decompiler 4.5 build 90120 to '~divisions original.fla'. the xml folder resides in the same folder as ~divisions original.fla. it contains divisions.xml. you can download these files at http://rapidshare.com/files/257100523/space_after_text_when_scroll_to_bottom.zip
    i discovered a problem - if you view 'divisions.swf' - when you click on 'retail visual solutions'and scroll to the bottom, you can see that there is no space after the text. the end of the text aligns with the end of the scrollbar. but when you click on eyesite, and scroll to the bottom, you can see that there is space after the text. the end of the text does not align with the end of the scrollbar.
    please help me to resolve this problem.
    my additional questions are:
    has the creator of the swf file used some unique scrollbar code or is this scrollbar provided in flash itself. in this case, i can read a tutorial to understand it better.
    i have given 'is correct - no space at bottom of text.jpg' and 'is incorrect - space at bottom of text.jpg' to further explain my query.
    please tell me if i have explained my problem properly or further clarifications are needed.

    Try changing the code in frame 16 to be:
    stop ();
    var tString = xmlObj.Options.Option[2]._value;
    tString = tString.split("\r\n").join("\r").split("\n\r").join("\r");
    txt3.htmlText = tString;
    The scrollbar is a component that may or may not have been concocted by the original designer.  In any case it does utilize the FScrollbar feature of Flash.  You can read about it via the link below:
    http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dic tionary303.html.

  • Scroll text to bottom

    I have imported text into a dynamic text field with a scroll
    bar.
    How would I go about starting the imported text at the bottom
    rather than having to scroll to the bottom?
    Normal:
    ----------------- window top
    text 1
    text 2
    text 3
    ----------------- window bottom
    text 4
    text 5
    Instead I would like:
    text 1
    text 2
    ----------------- window top
    text 3
    text 4
    text 5
    ----------------- window bottom
    Sorry if i explained it badly.

    You can set the scroll of the text field to the maxscroll
    value of the
    text field. You have to wait until the text has downloaded
    and populated
    the text field before you can change its scroll value.
    Rob
    Rob Dillon
    Adobe Community Expert
    http://www.ddg-designs.com
    412.243.9119

  • Scrolling To The Bottom of a WebView

    I'm trying to figure out how to determine when the user has either scrolled to the bottom or the top of a web view. There doesn't seem to be a way to get the current scroll position within the webview. The ScrollEvent only shows the current delta, and there doesn't seem to be a way to determine how much of the document is not visible (clipped).
    Mark

    OK. My hack for this is ugly but it works:
    WebView view...
    Set<Node> nodes = view.lookupAll(".scroll-bar");
                    for (Node node : nodes) {
                        if (ScrollBar.class.isInstance(node)) {
                            ScrollBar scroll = (ScrollBar) node;
                            scrollPos = scroll.getValue();The view.lookupAll call is the only way to actually get a handle on the webview's scrollbars. Since there are a couple of components that actually use the scroll-bar style, you have to make sure that the node is a ScrollBar before you do anything with it.
    This shouldn't be necessary. Ideally the ScrollEvent class should give you handle on the ScrollBar, or give you the current scrolling position in relation to the max and min values. However, that doesn't seem to be the case. Prior to this, I tried putting the WebView in a ScrollPane, and a variety of other hacks, but every time I debugged through it, I would never get the right scroll position.

  • How to scroll JList to bottom

    I have a JList on a JScrollPane, and it updates in real-time.
    As the data fills the pane, I want it to scroll to the bottom all the time,
    but it stays at the top. I update as follows:
    String voltString[]=new String[someNumber];
    // Set the strings to stuff--code omitted
    voltList.setListData(voltStrings);
    voltList.ensureIndexIsVisible(voltStrings.length);But it doesn't work. The API for ensureIndexIsVisible says something
    about a JViewPort, but I am not sure what it means--I have it on a
    JScrollPane, not a JViewPort.

    works OK like this
    import javax.swing.*;
    import java.awt.*;
    import java.awt.event.*;
    class Testing extends JFrame
      int counter = 0;
      javax.swing.Timer timer;
      public Testing()
        setLocation(200,100);
        setDefaultCloseOperation(EXIT_ON_CLOSE);
        final DefaultListModel lm = new DefaultListModel();
        final JList list = new JList(lm);
        JScrollPane sp = new JScrollPane(list);
        sp.setPreferredSize(new Dimension(100,150));
        getContentPane().add(sp);
        pack();
        setVisible(true);
        ActionListener al = new ActionListener(){
          public void actionPerformed(ActionEvent ae){
            lm.addElement(counter);
            counter++;
            list.ensureIndexIsVisible(lm.size()-1);
            if(counter > 100) timer.stop();}};
        timer = new javax.swing.Timer(100,al);
        timer.start();
      public static void main(String[] args){new Testing();}
    }

  • Why does my screen scroll to the bottom automatically after I've entered a new website on a new tab?

    When I'm on a website and click onto information or another site from this open window, a new tab is opened with the new info or website. However, while waiting for that site to load in the new tab, the site is automatically scrolled to the bottom before I can even read through it. Why is this happening and how can I stop it?

    Start Firefox in <u>[[Safe Mode]]</u> to check if one of the extensions or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > Appearance/Themes).
    *Don't make any changes on the Safe mode start window.
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • When you scroll to the bottom of the list of files in Finder, the left to right scrollbar doesn't let you click the last file and it covers the file for a while until it disappears. Is this a bug? How do I not make that happen?

    When you scroll to the bottom of the list of files in Finder, the left to right scrollbar doesn't let you click the last file and it covers the file for a while until it disappears. Is this a bug? How do I not make that happen?

    An odd workaround: click "Always" in System Preferences/General/Show scroll bars. The scroll bars will always show, but they won't cover your last file.
    See this other post: https://discussions.apple.com/message/20572471#20572471

  • Why the vertical scrollbar bar is automatically scrolled to the bottom pos.

    I created a JScrollpane to contain a JTabbedPane. The JTabbedPane has two JPanel and each of them has a number of GUI components such as JCheckbox and JTextField. They have different size because their GUI components are different. The 2nd panel is about twice the size of the first panel.
    When the JScrollpane is shown, its vertical scroll bar is automatically scrolled to the bottom position. However, it is the first panel that is initially visible to the user. So, the user will see no GUI components of the first panel because the auto scrolling of the vertical scroll bar.
    Can anyone tell me how to disable the auto scrolling?
    I just want to let the scrollbar knob stay at the top so that the GUI components of the first panel (the smaller one) can be seen initially!

    Works fine for me:
    import javax.swing.*;
    import java.awt.*;
    public class TabbedPaneScroll extends JFrame
         private JTabbedPane tabbedPane;
         public TabbedPaneScroll()
              tabbedPane = new JTabbedPane();
              tabbedPane.setPreferredSize( new Dimension(300, 200) );
              getContentPane().add(tabbedPane);
              addNewTab( 10 );
              addNewTab( 5 );
              addNewTab( 20 );
         private void addNewTab(int fields)
              JPanel panel = new JPanel();
              panel.setLayout( new GridLayout(0, 1) );
              for (int i = 0; i < fields; i++)
                   panel.add( new JTextField("" + i) );
              JScrollPane scrollPane = new JScrollPane( panel );
              tabbedPane.add(scrollPane, "" + fields);
         public static void main(String args[])
              TabbedPaneScroll frame = new TabbedPaneScroll();
              frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
              frame.pack();
              frame.setLocationRelativeTo( null );
              frame.setVisible(true);
    }If you need further help then you need to create a [url http://www.physci.org/codes/sscce.jsp]Short, Self Contained, Compilable and Executable, Example Program that demonstrates the incorrect behaviour, because I can't guess exactly what you are doing based on the information provided.
    And don't forget to use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the code retains its original formatting.

  • Force a string indicator to scroll to the bottom

    In LV Web UI Builder is there a way to force or programmatically scroll a string indicator to the bottom? 
    I am building a virtual hyperterminal and I am writting a very large amount of data into a string control.  I have the vertical scroll bars turned on, but by default it just shows the information at the top.  I want to include all of the data so that the user can scroll back to see the history, but it would be nice if by default the scroll bar would stay at the bottom.

    I just wanted to confirm there is no way currently to force a string indicator to scroll to the bottom. I will note this down as a product suggestion for the Web UI Builder team.
    Vivek Nath
    National Instruments
    Applications Engineer
    Machine Vision

  • Why is my safari scrolling to the bottom

    My Mac book continues to scroll to the bottom of every list, page and search engine. I have tried quitting safari, restarting the laptop. Please help.

    I have noticed that on this support forum.  Open a thread and it automatically scrolls to the last response.

Maybe you are looking for

  • How can I transfer videos from my PC to my iPod touch (iOS 7.0.2)?

    Hi, I'd like to know how I can transfer videos from my PC to my iPod touch (iOS 7.0.2)? Thank u for your help.

  • Concept of Process 2LIS_03_BX and 2LIS_03_BF

    Hi all, I tried to load the data from R/3 for initialization and material movement with the following steps : 1. I run the infopackage to load the data for  initialization stock from R/3. Let say I config the setup table on 24 Nov 2005. When I check

  • Migrating a 2009 mini to a 2013 macbook pro

    I want to migrate my licensed applications from a 2009 mac mini to my new 2013 macbook pro. What is the best method? firewire 800 to ethernet, or firewire 800 to thunderbolt? Or should I just manually reinstall all of these applications from scratch?

  • User Exits in QA32

    Hi Friends, I need to average out the results of physcial samples for the same batch and update the results in batch classification. For Example for Batch(B1) we have Physical sample (P1), Physical sample(P2) we shall enter the results i.e brix value

  • Keeping album song orders in their original order???

    Hello everyone, I'm a nubie to mastering Itunes, but I was wondering if anyone can help me keep my albums, song orders, organized in their original track order, instead of alphabetically. Most of my mp3's are in individual album files inside the arti