Flex Mobile textArea styling the text?

I've read in several documents about TLF not supported in Flex Mobile. I then read about text fields vs textArea and css Style sheets.
I'm trying to keep this really simple 1. cause I'm learning 2. So I can build on best practices 3. I'm still learning....
Example:
Main
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
  xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView"
  creationComplete="creationCompleteHandler(event)">
<fx:Script>
  <![CDATA[
   import mx.events.FlexEvent;
   [Bindable]
   private var xmlInfo:XML;
   import mx.rpc.events.ResultEvent;
   protected function info_resultHandler(event:ResultEvent):void
    xmlInfo = new XML(event.result.text);← I want to say this is where I need to tell Flex how to interprit the incoming text format.
   protected function creationCompleteHandler(event:FlexEvent):void
    infoXML.send();
  ]]>
</fx:Script>
  <fx:Declarations>
   <s:HTTPService id="infoXML" url="assets/data.xml"
         resultFormat="e4x"
         result="info_resultHandler(event)"/>
</fx:Declarations>
  <s:TextArea id="spInfo" text="{xmlInfo}" width="100%"/>
</s:View>
data.xml
<?xml version="1.0" encoding="utf-8"?>
<info>
<text><![CDATA[<b>Bold</b>Not bold<font face="Arial">Arial text</font>Not Arial
]]>
</text>
</info>
Mobile app output
<b>Bold</b>Not bold<font face="Arial">Arial text</font>Not Arial
Thank you in advance.

> How do you mean with the borders Murray? I've never had
any trouble that
> I'm
> aware of? Isn't it fairly common for textfields in forms
to have a box
> round
> them?
Some browsers (Safari comes to mind) won't do borders at all,
and others (I
don't recall which) can actually get surly when you try. I
don't recommend
that you try to style form elements to that level.
Murray --- ICQ 71997575
Adobe Community Expert
(If you *MUST* email me, don't LAUGH when you do so!)
==================
http://www.dreamweavermx-templates.com
- Template Triage!
http://www.projectseven.com/go
- DW FAQs, Tutorials & Resources
http://www.dwfaq.com - DW FAQs,
Tutorials & Resources
http://www.macromedia.com/support/search/
- Macromedia (MM) Technotes
==================
"Iain71" <[email protected]> wrote in
message
news:f9up7e$9u1$[email protected]..
> Cheers - font-family - of course. Think it threw me when
I typed font :
> and got
> the drop down menu.
>
> How do you mean with the borders Murray? I've never had
any trouble that
> I'm
> aware of? Isn't it fairly common for textfields in forms
to have a box
> round
> them?
>
> Or is there a better method I could be using?
>

Similar Messages

  • Flex mobile add emoticons and text

    I created a chat program in the mobile project, but I can not add emoticons,I know textarea can not display pictures,So I reluctantly use RichEditableText, it can add a picture, but why can not I enter characters (letters and Chinese characters) in the phone debugging, just enter only numbers, and punctuation symbols。Or there are other ways to solve add text and pictures?

    Thanks much for your response.
    Hmmm...  That appears to work but also causes a runtime exception where there was none before the 4.6 upgrade.  It occurs when I autoscroll on receiving a new message in the chat, something that worked fine in 4.5.
    I guess I'm kind of wondering what the best practice is here.  Maybe I'm just doing this wrong altogether.  I'm finding it very difficult to implement probably one of the most basic features one would find in any collaborative app - something that was very easy in Flex 3 - the chat pane.  I've had one functioning fine for about 3 years.  Not so much in Flex mobile.
    Chat is very simple functionality.  When you receive a new message from afar...
    1.  add it to a TextArea with some nice formatting
    2.  auto scroll far enough so the user can see the new message in its entirety. 
    Nothing difficult at all.
    Why are these two things difficult to find in the TextArea in Flex mobile?  It almost seems as though it's something we're not supposed to be doing? 
    The answer here seems to be don't use Stage Text.  Revert to an older TextArea skin.  Why?  What text area doesn't need formatting as an option?  What text area doesn't need to be auto scrolled here and there?  Or am I just going about this wrong?  Maybe using the wrong components?
    I guess for now I can revert to 4.5 skin, but now the code I used to auto scroll on receiving a new message throws a null pointer exception.  I've been using the valueCommit property to auto scroll, as follows:
    valueCommit="textArea.scroller.verticalScrollBar.value = textArea.scroller.verticalScrollBar.maximum"
    Haven't had a problem prevously.  But this now throws:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at com.components::ChatWindow/__textArea_valueCommit()
    What's the best practice to accomplish this and also to be able to take advantage of the latest and greatest?

  • How to = TextArea - so the text disappears?

    What are the bits I need, so that when a user fills in a form eg;
    TextArea TA1 = new TextArea("Enter your name here");
    1. So the text is hilighted in dark blue.
    2. So when the user clicks within the TextArea, the whole text vanishes.
    3. How to reconstruct the same if the form is reset (may not require additional).
    Sample code warmly welcomed

    Here is how you would do it using a JTextField. I would assume it would also work for a TextArea.
    import java.util.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.plaf.basic.*;
    import javax.swing.plaf.*;
    public class TextFieldTest extends JFrame
        public TextFieldTest()
              FocusAdapter focusAdapter = new FocusAdapter()
                   public void focusGained(FocusEvent e)
                        JTextComponent component = (JTextComponent)e.getSource();
                        component.selectAll();
              JTextField textField1 = new JTextField( "one two three four five" );
              textField1.addFocusListener( focusAdapter );
              getContentPane().add( textField1, BorderLayout.NORTH );
              JTextField textField2 = new JTextField( "abcdefg" );
              textField2.setMargin( new Insets( 5, 5, 5, 5 ) );
              textField2.addFocusListener( focusAdapter );
              getContentPane().add( textField2, BorderLayout.SOUTH );
        public static void main(String[] args)
         TextFieldTest frame = new TextFieldTest();
            frame.setDefaultCloseOperation( EXIT_ON_CLOSE );
            frame.pack();
            frame.setVisible(true);
    }Note: I would use a TextField to enter a users Name. A TextField is typically used to enter a single line of text. A TextArea is used when you need to enter multiple lines of text.

  • Text positioning not correct while typing in Flex Mobile Text Area

    When I try to write text in Flex mobile TextArea, the text positioning is not correct. What might be the issue? Do I need to specify some Skin Class for it?

    Could be that the font doesn't have Hindi chars support and the text you paste is HTML chars.
    You could try to embed a font you know has the appropriate chars and use that for global and Applications CSS classes.

  • Number of lines in Mobile TextArea

    How can I calculate the number of lines in a Flex Mobile TextArea?

    Hi Friend,
    Try the below code, might be this would be helpful to you.
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
            xmlns:s="library://ns.adobe.com/flex/spark" title="HomeView"
            >
        <fx:Script>
            <![CDATA[
                import spark.events.TextOperationEvent;
                [Bindable]
                protected static var lineCount:uint = 0;
                protected function richEdTxt_changeHandler(evt:TextOperationEvent):void {
                    lineCount = richEdTxt.mx_internal::textContainerManager.numLines;
            ]]>
        </fx:Script>
        <s:Panel id="pnl"
                 title="Total Lines: {lineCount}"
                 horizontalCenter="0" verticalCenter="0">
            <s:RichEditableText id="richEdTxt"
                                widthInChars="20" heightInLines="10"
                                change="richEdTxt_changeHandler(event);" />
        </s:Panel>
    </s:View>
    Regards,
    Bharat Patel

  • Flex Mobile Best Practies

    Hi to every one!!!
    I'm try to building an app for mobile with a flex mobile project.
    The UI is gonna be something like in the picture:
    I would like to know witch is the best practies to put all the grafics element into my views.
    For example, for the bricks (that comes from an xml) i created a component, inside the component i put my fxg file in a group with a gap:
    My View:
    <s:VGroup gap="10">
            <customComponents:BrickComponent/>
            <customComponents:BrickComponent/>
            <customComponents:BrickComponent/>
        </s:VGroup>
    BrickComponent:
    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
             xmlns:s="library://ns.adobe.com/flex/spark" xmlns:assets="assets.*">
        <fx:Declarations>
            <!-- Place non-visual elements (e.g., services, value objects) here -->
        </fx:Declarations>
        <assets:Brick/>
    </s:Group>
    The same for the tshirt.
    It is a good way like this?
    And draw and import from flash catalyst?
    Thanks a lot

    You might want to look into using .FXG files for your graphics.
    These blog posts should be useful for tips on improving performance in your mobile Flex applications:
    http://flexponential.com/2011/10/05/performance-tuning-mobile-flex-applications/
    http://flexponential.com/2011/04/20/flex-performance-tips-tricks/

  • Fetch unread RSS items from mail, set them to read, save the text to a file

    This is what I want to do, and needless to say I am having a little trouble.
    I wish to take the unread mail RSS items, set them to read, and then save the TEXT of the articles (not the title, time, or author) to a TextEdit file in my Documents folder.
    So far I have Get Feeds From Mail > Filter Articles > Get Text from Articles > New Text File
    This is all fine and dandy, but how do I just get the TEXT and not all of the crap that comes with it?
    Thanks!

    NOw I had manage to clear out the error, but now the problem is when I click on the 'save' button, this function clear out the entire text file for me !!!
    The code are as below:
           if(e.getSource()== vButtons[0])
              try{
               String str;
               String Ky = tArea.getText();
               BufferedWriter buffWrite=null;
               BufferedWriter in1 = new BufferedWriter(new FileWriter("Keyword.txt"));
                        buffWrite.write(Ky);
                    buffWrite.flush();
                        buffWrite.close();
                    in1.close();
              catch (IOException ex) {
              ex.printStackTrace();
            if(e.getSource()== vButtons[1])
                  new panel();
                  dispose();
             if(e.getSource()== vButtons[2])
                System.exit(0);           
        }     Please tell me how to save the TextArea to the text file, THANKS !!!

  • Streaming live videos on flex mobile

    Hi I have a flex mobile application targeting the mobile tablets and I was wondering if you guys know of any tutorial
    about putting live feed videos on flex, I have this code that I'm using on my flex 3 to target mac and pc that uses on adobe air, the services of ustream.tv
    here it is.
    But when I try to use it on flex mobile, nothing happens..
    import tv.ustream.viewer.logic.*;
              import tv.ustream.viewer.logic.Display;
              import tv.ustream.viewer.logic.Logic;
              import tv.ustream.net.Connection;
    private var viewer:Logic = new Logic();
    public function videoViewer():void{
               viewer.display.width=800;
               viewer.display.height=400;
               holder.addChild(viewer.display);
               viewer.createChannel("4705238", true, null);
    this one works flawlesly on flex 3 and spark, but no in flex mobile, there is another way to read an rmtp on flex mobile?
    Gus

    OSMF (Spark VideoDisplay) works. It has a few garbage collecting issues, but they can be avoided somehwat.
    See my following post for a kludgy work around on the garbage collection:
    http://forums.adobe.com/thread/904638
    I have also seen a few home-brewed NetStream solutions, but you will need to implement a lot of functionality found in OSMF if you're going to need it.

  • How to save the text from text area back to a text file?

    Hi all,
    Now I am doing a small panel which containts a JTextArea, this TextArea will read the content from a text file, then display the content of the text file on the TextArea itself.
    My idea is, allow the user to modify the content in the textarea (I set it Editable=true;), then save it. After the user press the save button, the content in the text file will be updated accordng to the user;s modification on TextArea.
    I had done the displaying part by using JavaI/O (BufferReader), now any expert here know how to update the TextArea content back to the text file itself? PLease teach me, THANKS !!!

    NOw I had manage to clear out the error, but now the problem is when I click on the 'save' button, this function clear out the entire text file for me !!!
    The code are as below:
           if(e.getSource()== vButtons[0])
              try{
               String str;
               String Ky = tArea.getText();
               BufferedWriter buffWrite=null;
               BufferedWriter in1 = new BufferedWriter(new FileWriter("Keyword.txt"));
                        buffWrite.write(Ky);
                    buffWrite.flush();
                        buffWrite.close();
                    in1.close();
              catch (IOException ex) {
              ex.printStackTrace();
            if(e.getSource()== vButtons[1])
                  new panel();
                  dispose();
             if(e.getSource()== vButtons[2])
                System.exit(0);           
        }     Please tell me how to save the TextArea to the text file, THANKS !!!

  • Will LiveCycle Collaboration Service Be Supported on Flex Mobile aka Slider?

    Will LiveCycle Collaboration Service Be Supported on Flex Mobile aka Slider?
    For example, can you create mobile using LCCS?????????

    Hi,
    Just to re-state Raff,The flash version of LCCS SDK requires the basic flash libraries or in other words , just the playerglobal.swc . So if Slider also depends on playerglobal.swc like the Flex, then LCCS would be fully functional on Slider too. But the only bad news would be that we wouldnt be able to exploit the slider specific features and leverage its benefits.
    And as Raff pointed out, if there is enough interest the LCCS team can probably supply also a Flex Mobile implementation of the LCCS pods.
    Thanks
    Arun

  • TextArea and TextInput on mobile device the text disappears and works fine on desktop

    I'm developing a mobile app with a view that contains 1 Text Area, 1 Text Input and a group of 3 buttons. The app runs well in Desktop mode ( Run & Debug ), but when run in an android device ( Sony Tablet S) when the view is loaded,  the text (text property set at design or runtime)  "flashes" and disappear, if I change the device orientation of the tablet (phisically) the text draws correctly and don't disappear, even if you return to the original orientation. Also, if I pop-up a message (SkinnablePopUpContainer) in the same view, the text appears, and when I close the pop-up the text disappears again.
    Is this an identified bug ? ... is there a workaround ? ... I tried to set visible property to false and true and sometimes it works and sometimes not at random.
    Thank you for you help.

    UPDATE : if I set Focus=true the text appears. I think that the text should be there even if I don't set focus.
    This simple code when run in the device (Sony Tablet S) doesn't work as expected ... ( the text in the textbox dissapears, and if you change orientation appeears).
    <?xml version="1.0" encoding="utf-8"?>
    <s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
                        xmlns:s="library://ns.adobe.com/flex/spark" title="Editar acción"
                        xmlns:dao="dao.*" creationComplete="view1_creationCompleteHandler(event)" >
      <fx:Script>
                        <![CDATA[
                                  import mx.events.FlexEvent;
                                  protected function view1_creationCompleteHandler(event:FlexEvent):void
                                            txt1.text="Hola";
                                            txt1.validateNow();
                                            txt1.setFocus(); // <---- if not set the text "Hola" flashes and dissapear.
                        ]]>
      </fx:Script>
              <s:TextInput id="txt1" x="26" y="44"/>
    </s:View>

  • Flex Mobile 4.6 introduces Stage Text - how do you render HTML text with it?

    I have a little chat component in a Flex Mobile app that I just upgraded to SDK 4.6.  The chat component has a text area displaying messages and they are HTML formatted via the following:
    StyleableTextField(textArea).htmlText += myHTMLText;
    Worked in SDK 4.5 but StyleableTextField is not a part of the new Stage Text framework introduced in SDK 4.6.
    How do I HTML format the messages in my chat text area now?

    Thanks much for your response.
    Hmmm...  That appears to work but also causes a runtime exception where there was none before the 4.6 upgrade.  It occurs when I autoscroll on receiving a new message in the chat, something that worked fine in 4.5.
    I guess I'm kind of wondering what the best practice is here.  Maybe I'm just doing this wrong altogether.  I'm finding it very difficult to implement probably one of the most basic features one would find in any collaborative app - something that was very easy in Flex 3 - the chat pane.  I've had one functioning fine for about 3 years.  Not so much in Flex mobile.
    Chat is very simple functionality.  When you receive a new message from afar...
    1.  add it to a TextArea with some nice formatting
    2.  auto scroll far enough so the user can see the new message in its entirety. 
    Nothing difficult at all.
    Why are these two things difficult to find in the TextArea in Flex mobile?  It almost seems as though it's something we're not supposed to be doing? 
    The answer here seems to be don't use Stage Text.  Revert to an older TextArea skin.  Why?  What text area doesn't need formatting as an option?  What text area doesn't need to be auto scrolled here and there?  Or am I just going about this wrong?  Maybe using the wrong components?
    I guess for now I can revert to 4.5 skin, but now the code I used to auto scroll on receiving a new message throws a null pointer exception.  I've been using the valueCommit property to auto scroll, as follows:
    valueCommit="textArea.scroller.verticalScrollBar.value = textArea.scroller.verticalScrollBar.maximum"
    Haven't had a problem prevously.  But this now throws:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
              at com.components::ChatWindow/__textArea_valueCommit()
    What's the best practice to accomplish this and also to be able to take advantage of the latest and greatest?

  • What is the best font to use for Thai Language in Flex Mobile Applications ?

    Hi
    I am facing issues with Thai language in flex mobile applications. I am using Tahoma font and facing issues in TextInput
    Whith Tahoma font text Offset setting to far from the starting of the text input .
    Can any one suggest me the best font to use with Thai language ?
    Many thanks in advance for your help .
    Regards,
    Kamal

    Personally, I prefer uncompressed TIFF or PNG.  But many times it won't matter ... you'll be dropping the images into an SD Sequence, so they will lose resolution on output.
    -DH

  • HoW to ChaNGE the text in the mobile application to be in MulTi-CoLoR text

    _*  Do anyone can tell me how to change the text in the mobile application to be in multi-color text, to make it more interesting and increase readability?
    Is it using the Graphic's paint() method? or any better suggestion?
    Please give the short example if can?
    Please help... "_"
    Hearing from u all soon...@_@
    thanks....

    Go into outline view. If you can see the outlines of the letterforms, you can't just change the text. If the letterforms are solid black, take the type tool, select the text and type yours.
    Anyway you can just select the letters, take the type tool and type new text.
    Working with the type tool is a basic. Please see the manual for details

  • How to get the text of the textArea ?

    Hi, expert
    i have created a new component com1,
    then i created a table view name 'result'.
    then i add a textarea by modifying the result.htm
    textArea id     = "TAMSG"
                     text   = "test......"
    then i add a button in the result.htm
    the method of the button is  'EH_ONSENDMSG'
    then i input some text into the textArea on the page.
    now, how can i get the text of the textArea in the method 'EH_ONSENDMSG' ?
    thanks.
    oliver.

    Hi,
    problem was solved.
    i put the text into a value node.
    <thtmlb:textArea id     = "TAMSG"
                     text   = "//TEXT/TEXT2"
                     encode = "TRUE"
                     width  = "100%" />
    method EH_ONSENDMSG.
      DATA lr_col_wrap      TYPE REF TO   cl_bsp_wd_collection_wrapper.
      DATA lr_query_values  TYPE REF TO   if_bol_bo_property_access.
      DATA lv_str_msg TYPE string.
      lr_col_wrap = me->typed_context->text->get_collection_wrapper( ).
      lr_query_values ?= lr_col_wrap->get_current( ).
      lv_str_msg = lr_query_values->get_property_as_string( iv_attr_name = 'TEXT2' ).
    endmethod.
    regards.
    oliver.

Maybe you are looking for

  • Error in GRC AC 5.3--ERM-mshost missing

    Dears, We are using SAP GRC 5.3 on AIX,Oracle 10g. In Enterprise Role Management,We are facing one issue: We created a role,Now we try to change it and try to add new tcode by option searching tcodes in Available system it shows error: "mshost missin

  • What exactly are the cron scripts doing?

    Hi, Hope the subject says it all: I have searched but not found a detailed explanation as what the cron scripts (daily, weekly, monthly) actually do, and if the utilities (Onyx, Cocktail, Xupport, etc) are doing exactly the same. Can someone point to

  • How does it work using apps over wifi?

    So ive seen several apps well preaty much all requering that you ahve a data plan. So say i have data active at my provider, will i be able to use live messenger and facebook over wifi or will they only use gprs/edge? My problem is that my data is fr

  • How to create Groups and Group Leaders in Clusters.

    Hi, As we know in unicast there is one to one communication and there are groups to control the Thread Management, How the Groups and the Group Leaders are created. Regards, Vardhan.

  • What is the ipod 5.5 generation ? (never heard of it, is it not out in uk)

    Just wondering if anyone could let me know more about this ipod 5.5 gen, Is it the ipod classic 80gb ? Has it got coverflow like the classic, Could anyone send me a link to a web page for this item ? Thanks