Textarea width

Hello,
Is it safe to use an inline style to set the width of a
textarea in px.
regards
kenny

yes it is
"twocans" <[email protected]> wrote in message
news:e6dopu$gdq$[email protected]..
> Hello,
> Is it safe to use an inline style to set the width of a
textarea in px.
>
> regards
>
> kenny
>

Similar Messages

  • How can i display image in mx:TextArea Component?

    I found display img tag in htmlText of mx:TextArea component
    is very difficult in Flex Air
    I new a simple air project in flex builder, put the code
    below in it, i put a glad.png file in the src folder, every thing
    is OK, when i run it, image cannot be displayed. why this happend,
    I search the google for the solution, it seems there is a bug in
    air, and told me to use mx:HTML coponent, but that component still
    can not display img tag.
    could any one help me with this?
    <mx:TextArea width="100%" height="100%">
    <mx:htmlText>
    <![CDATA[
    <a href='
    http://www.adobe.com'><img
    src='glad.png'/></a>Click the image to go to the Adobe
    home page.
    ]]>
    </mx:htmlText>
    </mx:TextArea>

    I ran into a similar problem and wasn't able to find a way to have regular Flex components (like Text and TextArea) display <img> tags in their htmlText.  Everything works find in a web-based Flex application, but once the same code was used in AIR, the images just wouldn't display.
    I changed my display to use the mx:HTML component and everything worked fine (I was using only external images).

  • Make TextArea height adjust to fit content

    I'm trying to get my TextArea to resize and fit the content
    it contains but for some reason the following code causes it to
    become about 3x higher than the text it contains. Can someone point
    out what I am doing wrong? Thanks!
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml"
    layout="absolute">
    <mx:TextArea width="400">
    <mx:text>
    this is a test this is a test this is a test this is a test
    this is a test
    this is a test this is a test this is a test this is a test
    this is a test
    this is a test this is a test this is a test this is a test
    this is a test
    this is a test this is a test this is a test this is a test
    this is a test
    this is a test this is a test this is a test this is a test
    this is a test
    </mx:text>
    <mx:creationComplete>
    event.target.height = event.target.textHeight;
    </mx:creationComplete>
    </mx:TextArea>
    </mx:Application>

    Hi Zak - thanks -
    Actually... I have a "background frame" on the master page; I have added a text frame to one of the pages based on the master.
    The text frame containing the text expands just fine, but the "background frame" set on the master doesn't.
    Any ideas?
    cheers
    Andrew

  • Single Record Form: fields display with the wrong width

    I'm laying out fields on a single record form and notice that the width of the fields displayed when I run the form is less than the width I specify on the "Edit Page Item" page. Here are 3 examples:
    field 1: Display as=text, Width=100, Maximum Width=100, ==> displayed width=76
    field 2: Display as=text, Width=50, Maximum Width=50, ==> displayed width=46
    field 3: Display as=textarea Width=100 Maximum Width=100 ==> displayed width=100
    Anyone know why this is happening? I'm trying to layout the form so that it has a pleasing look. It's hard to get the fields lined up when they don't display according to the widths specified.
    Edited by: Corvette Captain on Aug 9, 2012 3:21 PM

    Hi,
    >
    I'm laying out fields on a single record form and notice that the width of the fields displayed when I run the form is less than the width I specify on the "Edit Page Item" page. Here are 3 examples:
    field 1: Display as=text, Width=100, Maximum Width=100, ==> displayed width=76
    field 2: Display as=text, Width=50, Maximum Width=50, ==> displayed width=46
    field 3: Display as=textarea Width=100 Maximum Width=100 ==> displayed width=100
    Anyone know why this is happening? I'm trying to layout the form so that it has a pleasing look. It's hard to get the fields lined up when they don't display according to the widths specified.
    >
    Setting the Width of the Page Item sets the input elements "size" attribute. HTML rendering based on size attribute is not a precise as you need. You should use CSS for precision. See Compatibility Notes
    Cheers,

  • Identify the size of unwrapped text in TextArea

    Here is the deal.
    I have a popup of fixed width where I dynamically add the textAreas. The PercentWidth of textArea is 100.
    Once the long url (as my custom text) is added into the definite textArea.htmlText, the text is wrapped.
    What I need is: I'd like to dynamically widen the width of popup if any of textArea has a long text that is going outside the popup borders, so it would not wrap. So far I'd like to have the textArea.textWidth correctly returned, without any wrapping. But since the textArea has already been added as a child to the popup's stage, its size cannot be dynamically extended.
    If I simply set the textArea.width to, say, the width of popup, the textArea.textWidth is still the same small like before.
    I'm really stopped at this point. Please assist. Thanks.

    Which version of Flex?  If you don't want wrapping text, use Label

  • Height of textarea

    I cannot seem to find a way to change the height of a textarea which is inside a report row.
    Currently i have tried following:
    1 change column attributes -> element attributes to different kind of css values for setting height
    2 added the css in the column formating -> css style
    3 added a css class in the page html header and the setting the column formating -> css class to this css class.
    Non of those seem to make any changes to the textarea.
    more specific data (
    at point 1 and 2 i tried those values: ( height:20px and max-height:20px )
    at point 3 i added this to the html header:
    <style type="text/css">
    .textarea
    width:30px;
    height:20px;
    and then at the column formatting -> css class i added (.textarea and also tried textarea without the dot)
    So hope someone can give the guidelines to solve this succesfully
    TIA

    Hi Marc,
    In column attributes page of the column, under column attributes, use 'Element Width' (Width) and 'Number of Rows' (Height) to alter the width and height of the text areas.
    Regards
    Satty

  • 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

  • Auto-resizing TextArea in Flex 4

    Does anyone know how I can auto-resize the height of a Spark TextArea please? I tried following the examples in http://forums.adobe.com/thread/748191 but couldn't get it to work in either Flex 4.1 or Flex Hero.
    Here's what I'm doing:
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
                           xmlns:s="library://ns.adobe.com/flex/spark"
                           xmlns:mx="library://ns.adobe.com/flex/mx">
        <s:TextArea width="100%" heightInLines="{NaN}" minHeight="50"/>
    </s:WindowedApplication>
    When I press enter I need the TextArea's height to auto-resize, rather than scrolling up/down. Any help appreciated.

    @jeffry
    it surprises me too - but try this: http://polygeek.com/2249_flex_display-html-text-in-the-spark-textarea

  • Retrieval from TextArea

    I have made 2 pages, first page to fill in data in some textarea box and second page to retrieve the input
    1st page
    <textarea width=20 col=5 wrap="OFF" name="contact"></textarea>
    ...2nd page
    String temp="" ;
    if(request.getParameter("contact")!=null)
         temp = request.getParameter("contact") ;It can obtain the input but it ignores all link break
    e.g.
    input:
    Tel: 123456789
    email: [email protected]
    after retrieval:
    Tel: 123456789 email: [email protected]
    the input i obtain will be combined into 1 line. I already use the WRAP property in <textarea>.
    Anyone have idea about this?? Thank you!!

    Just to make this clear.
    You have a textarea on the screen.
    You save the value in it (including linebreaks) into the database.
    You then retrieve the value from the database to display on the page.
    Do you display it directly onto the HTML page, rather than into another textarea?
    In that case HTML happily ignores all your spaces/line breaks in your code.
    To stop it doing this
    1 - use <pre> </pre> tags around the text you don't want HTML to format.
    ie
    <pre>
    <%= textToPrint %>
    </pre>
    2 - To replace all line breaks with strings try
    This requires java 1.4
    String lineSep = System.getProperty("line.separator");
    String textToPrint = textToPrint.replaceAll(lineSep, "<br>");Cheers,
    evnafets

  • £ symbol is showing up in my TextArea

    I put breakpoints all around and I see that the £ is my string.  But it is not displaying in my TextArea for some reason.  I don't know if my binds and stuff made it go weird or something.  Is there some sort of trick to get it to work?  I'm using Flex 3.
    Here are some code bits:
    [Bindable] private var selectedDeal:Object;
    <mx:Binding source="dgDeal.selectedItem" destination="selectedDeal" />
    <mx:FormItem label="Description:" width="100%" height="100%">
        <mx:TextArea width="100%" height="100%" text="{selectedDeal.dealDescription}" editable="false"/>
    </mx:FormItem>
    dgDeal is a datagrid, so selectedDeal gets updated whenever a row is clicked.  I debugged and selectedDeal.dealDescription does have the symbol, but it doesn't appear in th TextArea when I run it.

    Hi,
    I have hardcoded the text as below and when I run the application, I could see the text appear in the TextArea..
    <mx:TextArea 
    id="ta" width="300" height="200" text="£"/>
    Also check this link http://blog.flexexamples.com/2007/08/02/using-special-characters-in-your-flex-applications /
    where all the special characters are displayed in a Flex application.
    It may be helpful...All the best..
    Thanks,
    Bhasker Chari.S

  • TextArea - Is it possible to get the number of lines?

    I was wondering if there's any way to know how many lines of text a textarea has. And also, if it'd be possible to listen for number of lines changes. I'm trying to develop a component which displays just one line at first, and then starts to grow as necessary, as the number of written lines increase.
    Let me know if it's not clear enough.
    Thanks in advance.

    Hi,
    May be what i am going to propose you is not the answer for your quesion. :P, but i have the same requirement and I achieved it in the following way. :)
    I wrapped by TextArea with a StackPane, and before adding the text area into the StackPane i added a Label, whose wrapText is set to true, and binded the prefWidth and text property with TextArea , as below.
    this.label =new Label();
    this.label.setWrapText(true);
    this.label.prefWidthProperty().bind(this.textArea.widthProperty());
    this.label.textProperty().bind(this.textArea.textProperty());That's it !!! It worked for me ;)
    Below is the complete code of this new customised control ;)
    ScrollFreeTextArea textArea= new ScrollFreeTextArea();And the complete class :
    import javafx.beans.value.ChangeListener;
    import javafx.beans.value.ObservableValue;
    import javafx.geometry.Insets;
    import javafx.geometry.Pos;
    import javafx.scene.GroupBuilder;
    import javafx.scene.control.Label;
    import javafx.scene.control.TextArea;
    import javafx.scene.layout.StackPane;
    import javafx.scene.layout.StackPaneBuilder;
    public class ScrollFreeTextArea extends StackPane{
         private Label label;
         private StackPane lblContainer ;
         private TextArea textArea;
         private Character NEW_LINE_CHAR = new Character((char)10);
         private final double NEW_LINE_HEIGHT = 18D;
         private final double TOP_PADDING = 3D;
         private final double BOTTOM_PADDING = 6D;
         public ScrollFreeTextArea(){
              super();
              configure();
         public ScrollFreeTextArea(String text){
              super();
              configure();
              textArea.setText(text);
         private void configure(){
              setAlignment(Pos.TOP_LEFT);
              this.textArea =new TextArea();
              this.textArea.setWrapText(true);
              this.textArea.getStyleClass().add("scroll-free-text-area");
              this.label =new Label();
              this.label.setWrapText(true);
              this.label.prefWidthProperty().bind(this.textArea.widthProperty());
              this.label.textProperty().bind(this.textArea.textProperty());
              this.lblContainer = StackPaneBuilder.create()
                                                        .alignment(Pos.TOP_LEFT)
                                                        .padding(new Insets(4,7,7,7))
                                                        .children(label)
                                                        .build();
              // Binding the container width to the TextArea width.
              lblContainer.maxWidthProperty().bind(textArea.widthProperty());
              textArea.textProperty().addListener(new ChangeListener<String>() {
                   @Override
                   public void changed(ObservableValue<? extends String> paramObservableValue,     String paramT1, String value) {
                        layoutForNewLine(textArea.getText());
              label.heightProperty().addListener(new ChangeListener<Number>() {
                   @Override
                   public void changed(ObservableValue<? extends Number> paramObservableValue,     Number paramT1, Number paramT2) {
                        layoutForNewLine(textArea.getText());
              getChildren().addAll(GroupBuilder.create().children(lblContainer).build(),textArea);
         private void layoutForNewLine(String text){
              if(text!=null && text.length()>0 &&
                             ((Character)text.charAt(text.length()-1)).equals(NEW_LINE_CHAR)){
                   textArea.setPrefHeight(label.getHeight() + NEW_LINE_HEIGHT + TOP_PADDING + BOTTOM_PADDING);
                   textArea.setMinHeight(label.getHeight() + NEW_LINE_HEIGHT + TOP_PADDING + BOTTOM_PADDING);
              }else{
                   textArea.setPrefHeight(label.getHeight() + TOP_PADDING + BOTTOM_PADDING);
                   textArea.setMinHeight(label.getHeight() + TOP_PADDING + BOTTOM_PADDING);
    }I hope you got the basic trick that I am doing here. I hope this can help you.
    Happy Coding :)
    Regards,
    Sai Pradeep Dandem.

  • How to displaying an image inline in TextArea  ,htmlText

    Here My code
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
        <mx:TextArea id="myChat" width="271" height="238" backgroundColor="#ffffff" borderThickness="0" editable="false" enabled="true" horizontalScrollPolicy="off" wordWrap="true">
        <mx:htmlText>
        <![CDATA[
              test...<img src='close.png' height='15' width='15'/>test...
        ]]>                                     
        </mx:htmlText>
    </mx:TextArea>
    </mx:Application>
    Thanks in advanced...

    You can do in this way...
    <?xml version="1.0"?>
    <!-- textcontrols/ImgTagWithHyperlink.mxml -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" borderStyle="solid">
      <mx:TextArea width="100%" height="100%">
         <mx:htmlText>
            <![CDATA[
               <a href='http://www.adobe.com'><img src='../assets/butterfly.gif'/></a>
            ]]>
         </mx:htmlText>
      </mx:TextArea>
    </mx:Application>
    Hope you got my point!!!
    If this post answers your question or helps, please kindly mark it as such.

  • TextArea.htmlText ### newline pb

    Hi
    Im using a TextArea to display HTML text.
    <mx:TextArea width="100%" height="100%"
    htmlText="{data.text}" />
    it contains :
    <![CDATA[
    something here
    <li> one </li>
    <li> two </li>
    ]]>
    it seams to insert 2 new line between each <li> or \n
    in the text !
    Can you help me ?

    I don't think it's a case of TextArea.htmlText not working so much as it's a case of there not being an htmlText property for the TextArea in AS2.  AS3 versions support it, but I believe in AS2 you need to specify the html property to be true and assign the text to the text property.
    ta.html = true;
    ta.text = "<b>your html text</b> here";

  • Spark Component TextArea Performance Issues

    The spark component TextArea cannot handle large text volumes gracefully. I am using a simple ascii file that is about 1.2 mg in size and I experience the following problems:
    1. Pasting the 1.2 mg of text in the TextArea takes a very long time (about 20-30 second). I get a message that the request timed out then the text is finally shown in the text area.
    2. Once the text is in the TextArea, paging up and down fast (that is not waiting for the previous page up and page down to complete) can cause the application to freeze. It takes a long time for it to come back.
    3. Selecting a large chunck of data and doing cut/paste/delete can also cause a freeze that may take a 20 or more seconds.
    The new spark.components.TextArea is definitely an improvement over mx.controls.TextArea but still has serious performance issues. A simple HTML text area seems to process the same volume without any issues (except some delay at the initial loading). Is there a chance these issues will be addressed before the release of FlashBuilder 4.0? is there a work around?

    Not much is needed. You can create an application that has nothing but the textarea:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application 
    <s:Application 
          xmlns:fx="http://ns.adobe.com/mxml/2009"      xmlns:s="
    library://ns.adobe.com/flex/spark"      xmlns:mx="
    library://ns.adobe.com/flex/halo" 
          minWidth="800" minHeight="600">
         <s:TextArea width='100%' height='100%' horizontalScrollPolicy="auto" verticalScrollPolicy="auto"/></s:Application>
    run it, copy the text in the attached Sample.txt file and paste into the text area. It takes more than 1 minute (did not time it) and then just before the text is displayed, I get this error message:
    Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
    The text is transferred to the textarea but the textarea is very sluggish (try arrow up, arrow down, page up, page down, try typing in the text area and then finally try select all and then cut or delete).
    I hope this helps and thanks.

  • Textarea page break

    Hi Guys
    I have a textarea with a fixed height and width. What I want to do is when the user reaches the page break (i.e. end of the height) of the textarea I want to create a new textarea so the user can continue with his document. Does anyone know how I can do this ?

    You will have to forgive my ignorance as I have only been programming in flex for afew hours. This is what I have done for the initial textarea:
    <mx:TextArea id="documentPage" width="620" height="877"
         paddingLeft="30" paddingBottom="30" paddingTop="30" paddingRight="30"
         horizontalScrollPolicy="off" shadowDirection="right" verticalScrollPolicy="off"
         backgroundColor="#FFFFFF" borderStyle="solid" cornerRadius="0" borderColor="0xEEEEEE" change="changHandler()">
    My guess is this isn't efficient if I am going to be creating new textArea instances. I am in need of a class or CSS file accessible to all the new textarea instances. I was playing around with the CSS of the textarea component but couldn't get to look the way I want it.For example, if I specify a height and weight, the height/width of the component does not change. See css below:
    TextArea
        width : 677px;
        height : 877px;
        paddingLeft : 30px;
        paddingBottom : 30px;
        paddingTop : 30px;
        paddingRight : 30px;
        borderStyle : solid;
        borderColor : #EEE;
        shadowDirection : right;

Maybe you are looking for

  • How to catch ALL Exception in ONE TIME

    I'm explain my issue: I'm making a program with Class, Swing, Thread ... Then all action I do on my graphical application, I use a new thread, well I want to capture in my Startup programs, all unknow exception and then, I display it with a JOptionPa

  • Speakers not working on brand new pavillion dv6. headphones work fine

    I've just taken this Pavillion DV6 PC out of the box and the speakers are not working.   Windows 7.   Sound is fine when I plug headphones in.

  • Alt text mouseover in hyperlink text?

    I use alt tag text in Dreamweaver CS4 to give a text synopsis of the content on the linked page. If possible, how do you make alt text in the mouse-over of a hyperlink, for PDF output?External hyperlink text does give the address as a mouse-over alt

  • Updating fields on Tabular Forms created with wizards

    I have created a Tabular Form using the creation wizard in version 2.0. When we update database records, we always place a date and a user ID into the record to track the last time updated. In HTML-DB I typically create an "After Submit" process call

  • Why does my MacBook Pro crash?

    Hi! So my MacBook Pro (13 in., Late 2011) has been acting strange over the past few months... I usually am using Google Chrome and when I go to a new website, it says in the loading bar, "Loading Catch". I gets stuck doing that so I try quitting the