Prevent scrolling to bottom of TextArea on setText()

Hello. I have a dialog that displays simple text. I format the text the way I want and then set the text by calling textArea.setText(). I do this before I display the panel.
If the text is beyond the view of the textArea the panel come up with the textArea scrolled all the way to the bottom. Is there a way to avoid auto scrolling or reset the scroll bar to the top when displaying the form?
I must be missing a fundamental here. Please help.
Thank you.

textArea.setCaretPosition(0);

Similar Messages

  • Long Drop Down Menu not scrolling to bottom

    Apparently, this is not consistent across all installs. Some people claim it is working fine. However, on this page - http://hillwilliam.com - there is a long drop down menu under Manufacturers. On my MacBook Air, the drop down does not scroll to bottom. Works on iPad. I have turned extensions off, deleted internet plug-ins to no avail. This video shows it working as it should  - https://woothemes.viewscreencasts.com/embed/2a5107f6fe20426b86eb6100f1416e9b - why does it not work on my install of the latest and greatest? Need consistency here for all users. TIA

    there is a long drop down menu under Manufacturers. On my MacBook Air, the drop down does not scroll to bottom
    Same thing happening here on an iMac ...
    FYI ...  iOS = iPad   OS X = OS X. Two different operating systems so you may see an inconsistency in one but not the other for drop down menus.

  • Prevent scrolling

    Hi,
    Our Web Dynpro program runs in an iView in the portal.
    In this program, we make use of an Object Value Selector (OVS), this is an F4 value help pattern in the Web Dynpro framework.
    The popup windows of the value help sometimes appear outside the window that is currently visbile. A scrollbar appears, the user is required to use the scrollbar in order to see the contents of the popup window. Had the OVS framework placed its windows more towards the centre of the view, this should not be necessary.
    Programatically, there is nothin I can do to prevent scrolling.
    Is there a portal or iView setting that can influence the way a (Java) Web Dynpro places its popup windows?
    Thanks in advance,
    Roelof

    Start adjusting your CSS and see what effect that has. I'm guessing you're claiming more real estate than you think and/or overriding your max.. Try body width of 300 as an example (all tags) and see if that helps.
    As well: http://www.quirksmode.org/mobile/viewports.html

  • Scroll to bottom of query results

    SQL Developer 1.2
    DB 9.2.0.7
    Is there any way to quickly get to the bottom of the query results? I'm transitioning off from SQL Navigator and use this feature all the time. Most query results are many many screens long so this is a very useful feature.

    Although encouraged to filter and/or order your result set to conserve I/O and memory, you can always scroll to bottom with ctrl-end or ctrl-pgdown.
    Regards,
    K.

  • Muse generated slideshow prevents scrolling on iphone, ipad

    Hi there, my site is working on android and windows phones but it seems slideshow muse creates prevents scrolling on iphone, ipad,  is there anyway to overcome this issue?
    www.araminta.fi

    Hi Brad,
    Thanks for your prompt reply.
    No I did not. I don't have iphone/ipad but after publishing I asked a friend of mine to check it on his iphone and he had complained that it wasn't scrolling, so I went to a shop where there is ipad mini and 2, and on both machines it didn't scroll, so that is interesting that you don't come a cross with the same issue, the images slides but since they cover up the screen ipads didn't allow it to scroll downwards.
    Oral

  • Whatsapp Group Chat Scroll To Bottom

    Hi guys...
    This might not be important to many but I just miss it so much.
    When you guys have several messages on a Whatsapp group chat and open it, and try to scroll, how do you instantly scroll to bottom?
    In my Mom's android phone, as soon as you scroll down, two little arrows in the bottom right corner appear and if you click they instantly scroll down.
    I can't manage to see those on my iPhone (iOS 8, latest whatsapp version). The only way I found is to open group chat, put whatsapp in background (i:e: going back to iPhones menu), and going back to the group - now I am in the last message.
    This is very useful when you have 100,200 messages and you just don't wanna read them.
    Thank you very much!

    Since you're using a 3rd party app, suggest you ask Whatsapp or look at their support site.

  • HT1343 Scroll-to-Top/Scroll-to-Bottom

    How do you quickly scroll to the top or bottom of a document in Mac?

    Those will work, but they're not needed. Here are the options:
    Scroll to top:
         1. fn + left arrow
         2. Command + up arrow
    Scroll to bottom:
         1. fn + right arrow
         2. Command + down arrow

  • TextArea scroll to bottom

    Hey,
    I've got a text area that gets information from my server. I'm trying to figure out how to get the text area to scroll to the bottom everytime it refreshes with new data. Any suggestions?

    Hi gth759k,
    Try something like below:
    <mx:TextArea id="textArea" width="400" height="200" text="Enter Some Dummy Large Text" change="{textArea.verticalScrollPosition=textArea.maxVerticalScrollPosition}" />
    If this post answers your question or helps, please kindly mark it as such.
    Thanks,
    Bhasker Chari

  • Prevent Scrolling in TextArea NOT by limiting characters.

    It would seem to me to be a standard part of any API, but it seems not (else I cannot find it using keywords).
    I need the ability to create a TextArea entity in a constrained area (i.e., it is  located at x, and y and is w pixels wide and h pixels high and have that never change.), containing a proportional width font.  As such, no 'num char entry limit' strategy is feasible.  They need to be able to fill the entire area, and if that means 1,000 period '.' characters, or 200 '#' or "W' characters, then so be it.
    In case someone reading this isn't following what I mean.   The two lines following this one consist of 30 periods followed by 30 Ws.
    WWWWWWWWWWWWWWWWWWWWWWWWWWWWWW
    I cannot limit a user to 30 characters.  They need to be limited by using a TextArea that will let itself be filled until full, and then refuse further input until space is created by removing existing content.
    I then need to print that TextArea _as rendered on the user's screen_.
    Any 'scrolled' lines would be unprintable, and therefore the user's entry must be limited BEFORE any scrolling occurs, or contrariwise, when scrolling occurs, the last entered content would need to be removed and the entity forced to un-scroll.  I can program this.  It won't be elegant, and in fact will be quite stupid, as any programming where a change event is called with each keystroke or paste and then conditions tested is inefficient, wasteful, and well.. stupid.
    Please tell me that there is a more elegant solution that I'm just too dense to find it in the API.  I would think this would be a very common no-brainer functionality to put in a component for people designing WYSIWYG interfaces.
    Thanks muchly for any advice, help, solutions, even criticisms if justified
    BTW.. I hate CS4's documentation.  Is there a way to restore it to appearing in the program itself and being available offline?  Is there any way to constrain it to NEVER EVER EVER look for answers outside of the context of the program I initiated the help request from?  I don't want to know that it found a similar keyword in Acrobat or Illustrator documentation.    It makes about as much sense as the damage they've done to the forums by changing the 'search this forum' to 'search forums'.  It makes far more sense to search within a narrowed context with the OPTION of expanding the context, than to return a thousand useless non-appropriate returns to then have to go and explicitly (and annoyingly and time-wastingly) narrow the context every time AFTER you had a load of useless garbage dumped in your lap to be first reviewed and then discarded.    Sorry.. I'm a grouch.   I still love you Adobe and love developing using your stuffies... you just don't make much sense to me sometimes....  Local docs with updates as part of the periodic Adobe Software Update.  Constrained context UNLESS I ask for an expanded search.  Every keyword linked to the associated doc... If the name of a class appears in documentation, link it to that class API, etc

    Thank you, yes, that's part of my programming method.
    I can either snoop the CHANGE event or the SCROLL event and evaluate that property, and from there enter a while loop that removes the last character entered and then sets the scroll position back to the top (and ignoring the SCROLL even that itself triggers), and then reevaluates to see if the condition has been rectified, and if not, then removes the next most recent character.  That's not efficient, and it's possible that events can trigger/handle out of order I believe.   It could also be a nightmare if a user pastes in the entire contents of War and Peace and it has to loop either a) as each character of the paste is entered, or b) after the paste is entered, removing one character at the entry point until the condition is rectified.  I'm not certain whether a) or b) is the truth for how pasted content is handled...   Either way, I don't think I can assume that if I remove one character and set the scroll position back to 1, that I'll necessarily remedy the condition w/o rechecking.
    I'm still in the middle of working up a solution, but I think I have to do something like this (correct me if I'm wrong)....
    Establish a variable to track the number of lines that can be entered before scrolling occurs....  Let's call it maxLines.
    I cannot know what that value of maxLines is when the instance is created, so it is necessarily a non-useful value on initiation (0, or -1, or null... I'll go with 0).
    The first time the SCROLL event is called, that variable value can be determined by textField.numLines minus 1 and assigned to maxLines
    Thereafter, register a CHANGE event listener and each time a change is made, make certain that numLines does not exceed maxLines.  From this point forward, it would be foolish to keep tracking the SCROLL event, because each time my code corrects a scroll condition, it must visually scroll back to the top, itself generating a SCROLL event.
    Either way, it's silly.  There's no reason that there could not be a policy available to disable scrolling entirely.   Cheers!

  • Using key position to lock navigation when you scroll to bottom on tablet page starts to zoom.

    Using key position to lock navigation in place after scrolling, this portion works but when you scroll to the bottom the page starts to zoom. I have narrowed it down to the key positioning by eliminating everything else on a fresh page. Sam Friedman [Adobe Muse] - any thoughts on this?

    Hi - sorry for the delayed response, I've been on vacation. Do you have a published example you could show me?

  • How to make mouseover scroll buttons attached to textarea with external loaded text ?

    Hi,
    I am working in Flash CS3 and AS3, and I'm not good in
    scripting.
    I want to make a dynamic textarea with loaded text from an
    external textfile, and then I want custom made arrow buttons to
    start scrolling the loaded text on mouseover (not click) andt stop
    scrolling on mouseout. Ala like in this webpage:
    http://boomjinx.com/
    The part with the loaded text is fine, but I can't manage to
    script the arrow buttons to do what I've just described. Even
    though I have searched the Internet for recipes I just find how to
    scroll loaded text on click or with a scrollbar. This problem is
    starting to drive me crazy!! Is there anyone that have a recipe for
    this??

    Here's one approach:
    First you need to create a dynamic mutline textfield that has
    autoSize properties set to handle a varying amount of text.
    Then you need to embed the font because you are going to use
    a mask over the textfield to define the viewable area of it.
    Then you will use the buttons to change the textfield's y
    property to move the textfield up/down vertically. You will
    probably need to use an ENTER_FRAME event handler so that a
    continuous hovering of a button will cause the textfield to
    continue moving until it either reaches one end or the other or
    when the hovering ends.
    Before you try to tackle that though, just make it so that
    hovering a button will cause the textfield to move up or down one
    increment of distance. Just take it one step at a time.

  • Safari not scrolling to bottom of webpage

    I have noticed that safari seems to stop allowing scroll down to the bottom of some web pages - no apparent rhyme or reason, but the side scroll bar refuses to let it scroll beyond a certain point - often cutting off pictures and/or text. Has anyone else seen this? and if so, is there a fix?
    Thanks

    HI and Welcome to Apple Discussions...
    From the Safari Menu Bar, click Safari / Empty Cache. When you are done with that...
    From the Safari Menu Bar, click Safari / Reset Safari. Select the top 5 buttons and click Reset.
    Go here for trouble shooting 3rd party plugins or input managers which might be causing the problem. Safari: Add-ons may cause Safari to unexpectedly quit or have performance issues
    Since you are running Snow Leopard, if you are running Safari is opening in 32-bit mode, try 64. Right or control click the Safari icon in the Applications folder, then click: Get Info In the Get Info window click the black disclosure triangle next to General so it faces down. Select 32 bit mode. Also, (in that same window) *make sure Safari is NOT running in Rosetta.*
    

Web pages now include a small icon or 'favicon' which is visible in the address bar and next to bookmarks. These icons take up disk space and slow Safari down. It is possible to erase the icons from your computer and start fresh. *To delete Safari's icon cache using the Finder, open your user folder, navigate to ~/Library/Safari/ and move this file "webpageIcons.db to the Trash.*
    If Safari still crashes, go to the Safari Menu Bar, click Safari/Preferences. Make note of all the preferences under each tab. Quit Safari. Now go to ~/Library/Preferences and move this file com.apple.safari.plist to the Desktop. Relaunch Safari.
    Carolyn

  • Uncontrolled scrolling to bottom of project

    earlier this eve I was changing keywords on some images in a project...when I started I could highlight a small group at a time and change them all; then that stopped working and I had to change them one at a time. Then the entire project started scrolling slowly all the way to the bottom...nothing I did would stop the inexorable scrolling. Anyone else had this happen? Just more Aperture weirdness?

    The scrolling was probably because you pressed the 'L' key when you where in the browser or film strip, that will start the 'Shuttle' (if you press L a couple more times it will go faster). If you press J it will scroll the other way (up), and if you press K it will stop. (You can also manually use the slider next to the scroll bar of the browser.
    As for the keywords, I'm not sure what happened there.. it should indeed be possible to select multiple keywords (using shift or command) in the Keyword HUD and apply them to images all at once.

  • SparkDataContainer Scroller not scrolling to bottom of container

    I am using a scroller component within a custom skin for a SkinnableDataContainer. I am running into an issue in that the thumbbar of the scroller stops at about the 50% point, however this is actually the end of the scrollable area. In actuality, the thumbbar should be at the bottom of the scroll track. Here's the code for the scroller:
    <s:SparkSkin xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                    xmlns:mx="library://ns.adobe.com/flex/halo" bottom="150"  >
         <!-- Properties of the parent ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <s:states>
              <s:State name="normal" />
              <s:State name="disabled" />
         </s:states>    
         <!-- Metadata ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->    
         <fx:Metadata>
              [HostComponent("spark.components.SkinnableDataContainer")]
         </fx:Metadata>    
         <!-- UI components ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -->
         <s:Rect left="0" right="0"
                   bottom="0" top="0"
                   radiusX="4" radiusY="4"   >
              <s:fill>
                   <s:SolidColor id="fillColor" color="0xEFEFEF"/>
              </s:fill>
         </s:Rect>    
         <s:Group width="905" height="395" id="mainGroup">
              <s:Scroller left="10" right="10" top="4" bottom="10" >
                        <s:DataGroup id="dataGroup" />                   
              </s:Scroller>
              <s:Rect left="0" right="0" top="0" bottom="0">
                   <s:stroke>
                        <s:SolidColorStroke weight="1" color="0xD8D8D8"/>
                   </s:stroke>
              </s:Rect>
         </s:Group>
    </s:SparkSkin>

    Can you please post a small sample application that demonstrates this?  I was unable to reproduce it using the skin you posted above with this small sample application:
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:s="library://ns.adobe.com/flex/spark">
        <fx:Script>
            <![CDATA[
                import mx.collections.ArrayList;
                private function getArray(n:int = 100):ArrayList {
                    var arr:Array = new Array(n);
                    for (var i:int = 0; i < n; i++){
                        arr[i] = i;   
                    return new ArrayList(arr);
            ]]>
        </fx:Script>
        <s:SkinnableDataContainer itemRenderer="spark.skins.spark.DefaultItemRenderer"
                                  dataProvider="{getArray()}"
                                  skinClass="CustomDataContainerSkin">
            <s:layout>
                <s:VerticalLayout />
            </s:layout>
        </s:SkinnableDataContainer>
    </s:Application>

  • How to prevent scrolling if you have two Jpanels in a JScrollPane

    I have a JScrollPane with a JPanel for Linenumbers and one for a JTextArea,
    each time you have a new line in the JTextarea the propertyListenerEvent call a Method that sets the LineNumbers in the JPanel for Linenumbers, but then you get an unwanted behaviour of the scrollbar: The Scrollbar scrolls down to the last Line. (e.g. if youre writing in the first Line - LineNumber update after pressing return, set's the view to the last Line e.g. 200 - the caret/cursor is on the second) I tried to set the Linenumber Panel not focusable, but it doesn't work. Does anyone got a hint for me?

    Thanks for the answers.
    @itchyscratchy: didn't get it working with that workarround. but thanks a lot :)
    camickr: Since we can't see your code, we can't suggest what you might be doing wrong.I better kick my idea... thought it could be possible like: when
    LnNums=false after setLineNum Call in jTPaneCaretUpdate!?
    * LineNumberTest.java
    * Created on 12. Dezember 2006, 23:40
    public class LineNumberTest extends javax.swing.JFrame
        /** Creates new form LineNumberTest */
        public LineNumberTest()
            initComponents();
       // <editor-fold defaultstate="collapsed" desc=" Generated Code ">
        private void initComponents()
        jScrollPane1 = new javax.swing.JScrollPane();
            jPanel1 = new javax.swing.JPanel();
            jTxtArea1 = new javax.swing.JTextArea();
            jTLineNums = new javax.swing.JTextArea();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
           jPanel1.setLayout(new java.awt.BorderLayout());
            jTxtArea1.addCaretListener(new javax.swing.event.CaretListener() {
                public void caretUpdate(javax.swing.event.CaretEvent evt) 
                    jTxtArea1CaretUpdate(evt);
            jPanel1.add(jTxtArea1, java.awt.BorderLayout.CENTER);
            jTLineNums.setBackground(javax.swing.UIManager.getDefaults().getColor("TextField.disabledBackground"));
            jTLineNums.setEditable(false);
            jPanel1.add(jTLineNums, java.awt.BorderLayout.WEST);
            jScrollPane1.setViewportView(jPanel1);
            getContentPane().add(jScrollPane1, java.awt.BorderLayout.CENTER);
            java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
            setBounds((screenSize.width-400)/2, (screenSize.height-300)/2, 400, 300);
        // </editor-fold>
        private void jTxtArea1CaretUpdate(javax.swing.event.CaretEvent evt)
            //Caret
            ci = jTxtArea1.getCaretPosition();
            String sc;
            sc = Integer.toString(ci);
            String s = "0";
            sli=jTxtArea1.getLineCount();
            s = Integer.toString(sli);
            if(LnNums) {
                setLineNums();
               //LnNums =false;
             private void setLineNums()
            jTLineNums.setText("");
            //jTLNums.setFont (new Font (fName, Font.PLAIN, fSize));
            for (int i = 1; i <= sli; i++) {
                jTLineNums.append(i+" \r\n");
            //setFoc ();
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new LineNumberTest().setVisible(true);
        public javax.swing.JPanel jPanel1;
        public javax.swing.JScrollPane jScrollPane1;
        public javax.swing.JTextArea jTLineNums;
        public javax.swing.JTextArea jTxtArea1;
        boolean LnNums = true;
        int iLnNums, iSymBar, iCodeBar, iInv, sli, ci;
    }

Maybe you are looking for

  • Vendor report for ABC indicator field

    Hi All, My client uses field ABC indicator in the purchasing data view of the vendor master. They want to have reports based on this field. Are there any standard reports in SAP which can give total purchased value and quantity for a vendor with spec

  • Prob with  Totals in Smartforms

    Hi, I am having a problem with Totals in my smartform. I am Printing SUBTOTALS , GRANDTOTALS and CARRYFORWARD of amounts in my smartform. My Problem comes with Carryforward total ( Balance forwarded to next page ). Its getting added to a first record

  • Pdf watermark, positioning help

    I've recently been playing around with the idea of automatically updating pdf's that are submitted to our website with our web address. Idealy the text would be a clickable link that is centered and positioned at the very top of the page (although im

  • PhotoShop CS6 extreme slow running

    PhotoShop CS6 will not run usably on my new iMac 27in. I am using OS 10.8.4. Theother parts of CS6 seem to be fine, but PhotoShop is so impossibly slow (every click takes 20-30 seconds to respond, so a simple scaling of a photograph that would normal

  • Help!  Numbers file lost?

    Hello, So I opened an exiting spreadsheet file. I deleted what was in the cells, I then hit duplicate and then saved that duplicate as a new file. Problem now is when I open the old original, all the data is gone.  Did it save and over write?  I neve