fl.controls.TextArea not scrolling all the way down

I have a TextArea control, and sliding the scrollbar all the way down always doesn't show all the text.

I think it has something to do with me changing the typeface, because I noticed that when I do the setStyle to change the textFormat style, the textHeight value doesn't change.

Has anyone ran into something like this? can I at least access the TextArea sources so I can fix this? Or is there a way to don't know, subclass it and fix it kinda easily?

you can check it here: http://www.climatizacionuponor.com/newsletters/abril-2011/#/FeriaBtn if you see the scrolling texts, you can try scrolling all the way down, and then selecting the text and pulling farther down, sometimes it'll show more text. Sorry about the spanish.

This is an example of a text that usually fails to scroll all the way down:

<p>Este accesorio es la evolución del antiguo sistema press fitting y resuelve los problemas que éste último presentaba. Mediante un anillo fabricado en acero al carbono que le proporciona un efecto memoria y gracias al indicador de unión, realiza el apriete por si solo sin necesidad de herramientas, garantizando unos ensamblajes profesionales, perfectos y duraderos. Los materiales de última tecnología que componen el nuevo accesorio RTM™ combinan el plástico más ligero con las mejores funciones mecánicas del metal, lo que garantiza una resistencia excepcional a temperaturas extremas. Además, dispone de un efecto de memoria que garantiza la estanqueidad en todo momento gracias a su presión constante de 360º sobre la tubería, que absorbe las variaciones de temperatura en la misma.</p><br><p>El Indicador de unión consta de un Código de Colores, lo que permite saber a simple vista el diámetro de tubería correspondiente, ahorrar tiempo y garantizar una unión más segura y fiable.</p><br><p>Mantener los niveles más altos de seguridad de las instalaciones es uno de los principales objetivos de Uponor, por eso se ha sometido a los productos a las pruebas más duras, llevando la Tecnología RTM™ a las más extremas condiciones de funcionamiento. En palabras de Sergio Toribio, Jefe de Producto de este sistema, “Ha sido un reto ser capaces de desarrollar un dispositivo que pueda funcionar bajo presiones altas, variaciones térmicas, e incluso a grandes movimientos de tracción en las extremidades de las tuberías que, si bien no son habituales en el día a día, suponen un riesgo para cualquier instalación.”</p><br><p>La Tecnología RTM™ resulta idónea tanto para nuevas instalaciones, como para reformas. Además, cumple con los más estrictos estándares de certificación internacional, como es de esperar de uno de los líderes en soluciones de fontanería y calefacción, tanto en Europa, como en América.</p>

and this is my code:

import flash.display.MovieClip; import flash.events.MouseEvent; import flash.text.TextFormat; import flash.text.TextFormatAlign; import fl.controls.TextArea; import fl.controls.UIScrollBar; import de.mightypirates.megazine.interfaces.IMegaZine; import de.mightypirates.megazine.interfaces.IPluginManager; import de.mightypirates.megazine.interfaces.IPage; import de.mightypirates.megazine.plugins.anchors.IAnchors; import flash.events.Event; import flash.events.TextEvent; import flash.text.TextField; import fl.events.ComponentEvent; public class Content extends MovieClip { var _mz:IMegaZine; public function Content() { var tf:TextFormat = new TextFormat(); tf.font = "FoundryFormSans"; tf.color = 0x2D2C2E; tf.align = TextFormatAlign.JUSTIFY; for(var i=0 ; i < numChildren ; i++) { var ta:TextArea = getChildAt(i) as TextArea; if(ta != null) { ta.setStyle("textFormat", tf); ta.editable = false; ta.textField.selectable = false; ta.verticalScrollBar.maxScrollPosition = ta.textHeight; ta.getStyle("textFormat"); } } } }

--------------Solutions-------------

This is completely off the top of my head. I built a telnet client for flash once and sometimes it would not scroll all the way. So I forced it down.

TextField has a property called scrollH and you can set it to maxScrollH to force the TextField to the bottom.

myTextArea.textField.scrollH = myTextArea.textField.maxScrollH;

edit: Fixed the code line since TextArea was used.

I'm not sure what your code looks like, but this works fine for me:

var fmt:TextFormat = ta.textField.getTextFormat();
fmt.font = "Comic Sans MS";
fmt.size = 15;
ta.setStyle("textFormat", fmt);

ta.text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam non sapien lorem. Etiam tincidunt consectetur neque, laoreet hendrerit magna commodo ac.";

Category:flash Time:2011-04-26 Views:0

Related post

  • import mx.controls.TextArea; not working with Flex 3.2? 2009-02-10

    Why the TextArea class is not available for my Flex Builder 3? Project has flex32 SDK in buildpath. other imports are OK. import flash.display.*; import flash.events.*; import flash.geom.*; import flash.net.*; import flash.text.*; import flash.utils.

  • rails & markdown error: uncaught exception: Control.TextArea requires Object.Event to be loaded 2010-04-23

    So, I've got bluecloth installed and I'm trying to use the Control.TextArea javascript WYSIWYG editor. Anyways, I followed the tutorial on the page and when I load the corresponding view, I get an error: uncaught exception: Control.TextArea requires

  • how to control table view scrolling speed? 2011-07-18

    I want control table view scrolling speed?How can I do that programmatically. Please help. Thanks in advance. Jenson Jacob --------------Solutions------------- You can set tableView.decelerationRate property. It is a floating-point value that determi

  • Bug with Excel form control - scrollbar keeps scrolling 2012-01-31

    I'm creating a dynamic chart using an Excel form control -- the scrollbar -- and the way this works is exactly as described on http://www.excelcharts.com/blog/animation-interaction-and-dynamic-excel-charts/ (towards the bottom). I have a chart of dat

  • My Wireless Mobile Mouse 3500 driver doesn't allow me to control the the scrolling of the wheel 2013-10-06

    My Wireless Mobile Mouse 3500 driver doesn't allow me to control the the scrolling of the wheel. When I scroll it goes by pages only and no options on available to make adjuments as to go by every 3 lines or so. I thought I had downloaded the wrong d

  • I am experiencing issues with controlling volume and scrolling down whether in favorites or pictures 2014-09-12

    I am experiencing issues with controlling volume and scrolling down whether in favorites or pictures. Example: when I left click on the speaker, the volume automatically goes all the way up. I have to click outside of the window box to get it to stop

  • Controlling textbox/overflow scrolling using javascript 2010-08-23

    I am trying to build a web console application at the moment. I have coded all the most major parts of the app, but I still need a way to display the text appropriately once I have brought it into the browser. There will be more text than the box sho

  • Textarea Sideways Scrolling Cancellation 2012-04-29

    This is kind of hard to explain, but here is my problem: When, at least on my laptop, you scroll upwards with the touch-pad, the cursor won't move. If you scroll sideways, the cursor moves sideways. I'd rather the cursor doesn't move at all. Is this

  • HTML Textarea horizontal scroll 2009-01-08

    I would like to provide a horizontal scroll to a textarea in my HTML page. The scroll should appear without wrapping, if I type a long line without a line break. A few friends suggested using overflow-y CSS attribute, which did not work for me. The b

  • Control amount of scroll in browser, jQuery 2009-06-02

    Is there a way to control the amount that the browser is scrolled in jquery? For example, if I wanted to add content to the bottom of a page and have it always be at the bottom, with everything else scrolling up (like a terminal) --------------Soluti

  • How can I pass a Flex TextArea's scroll event up to Application? 2010-03-04

    I have a TextArea that I don't ever want to be scrolled. When scrolling within the application that holds this TextArea, however, the scrolling stops as soon as the mouse ends up over the TextArea. Is there any way to pass the scroll event to the app

  • How do I stop a textarea from scrolling to the top whenever I change its value 2010-07-08

    I'm making something where a textarea gets more and more text appended. In firefox, the textarea scroll back up to the top each time. I currently have something like textarea.scrollTop=1000000; to scroll it back down each time it changes, but it stil

  • asp.net user control scroolIntoView is scrolling entire page 2010-11-15

    I there I'm using an asp.net user control with a tree view. When I load the page I want to scrool the user control to the selected node in the tree view. I'm using js function .ScrollIntoView(true). But this is scrolling the entire page (not only wha

  • how do I add focus to a textarea after scrolling to it? 2011-03-31

    I am using the following script to scroll to the top of a scrolling DIV when a link is clicked: <script type="text/javascript" src="jquery.js"></script> <script> function goToByScroll(id){ $('#disqus_thread').animate({scrollTop: $("

  • Controlling amount of Scroll in Horizontal Scroll View 2011-04-26

    I have a Horizontal scroll view in my app which consists of 9 images. It has to display a set of 3 images at a time. I mean one scroll has to display a set of 3 images. Now with the default behavior when i scroll fast from right to left its getting t

  • Transparent control flickering on scrolling 2011-05-11

    I've created an application in C# which has custom buttons. These all have transparent background therefore I enherited from Control and override the CreateParams/OnPaintBackground and added a InvalidateEx function. Now I need a grid like layout(Tabl

  • Controlling Mouse Wheel Scroll Distance? 2011-07-22

    If you've used a Mac desktop machine, one of the first things you'll notice is that scrolling is different on a Mac than on a Windows desktop. Windows desktops scrolls in big chunks - multiple lines at a time. Mac desktops have smooth scrolling - a f

  • How to prevent textarea from scrolling to the top when its value changed? 2011-08-28

    Consider the following example: (Live demo here) HTML: <textarea></textarea> <div id="button">Click Here</div> CSS: textarea { height: 80px; width: 150px; background-color: #bbb; resize: none; border: none; } #button { width:

  • Freeze control while vertical scrolling 2011-12-27

    I have some group of controls inside ScrollViewer. I need one of this controls to freeze while vertical scrolling. How do I do this? --------------Solutions------------- By some creative use of ListView, you can achieve the desired effect. You might

Copyright (C) pcaskme.com, All Rights Reserved.

processed in 0.620 (s). 13 q(s)