[FL8] Subindices y superindices en textfield (html)

Buenas,
No se si alguien ha intentado alguna vez meter subindices y
superindices en
un campo de texto dinámico. En html se soportan los tags
<sup> y <sub> pero
flash no hace ni caso en estos campos.
Conocéis alguna forma de poder representar esto en un
campo dinamico?
Gracias y saludos

He estado investigando un poco respecto al tema y existen
varias posibles
"soluciones". Una de ellas es crear una fuente especial con
los numeros en
"superscript" o "subscript", y luego asignarle un
<font> con esta fuente al
caracter que queramos.
http://blog.ggshow.com/index.php/reference/2007/04/19/how_to_use_subscript_aamp_superscrip t_in
Otra solución es usar caracteres especiales de un
encoding estandar dado. El
2 que era el que me interesaba en este caso y el código
es "&#178;". Esto se
asigna a un campo html dinámico y cuela :P
Podéis ver más codigos aquí:
http://www.zytrax.com/tech/web/entities.html
Un saludo
"forums.macromedia.com" <[email protected]>
escribió en el
mensaje news:fbm0st$2n1$[email protected]..
> Buenas,
>
> No se si alguien ha intentado alguna vez meter
subindices y superindices
> en un campo de texto dinámico. En html se soportan
los tags <sup> y <sub>
> pero flash no hace ni caso en estos campos.
>
> Conocéis alguna forma de poder representar esto en
un campo dinamico?
>
> Gracias y saludos
>
>

Similar Messages

  • AS3 - TextField - HTML Text

    Hi,
    I would like to find a nice solution to the following
    problem:
    I have a large HTML text containing text and images
    (<img>) inside a source TextField. I need to split this
    content into several TextField's of a fix width and height so that
    no scrolling is required.
    I tried to use all the new goodies that AS3 provides
    (getLineText(), bottomScrollV, etc). They are very helpful and if I
    had normal text (no HTML tags) to deal with, I could split the
    content without a problem. My problem is to do this on a HTML
    content. It is very difficult to find the HTML version of a
    splitted content.
    Does anybody have an idea I could do this job?
    Any help is greatly appreciated.

    no, your small textfields can be assigned text until they
    their maxScrollV property exceeds one. then remove text from the
    end of the small textfield's text property until its maxScrollV
    property decreases to one AND you have a logical place to break the
    text at which point you start assigning text to the next small
    textfield.

  • How to Pass the Value of a Textfield as c:param to a Link using c:url?

    I must have done someting wrong.
    I tried to pass the value entered in a textfield:
    <html-el:text property="searchFirstName" />to a link this way:
    <c:url value="/admin/sortUsers.do" var="ascFirstName">
        <c:param name="searchFirstName" value="${searchFirstName}" />
    </c:url>and in my action class, I have
    String firstName = request.getParameter( "searchFirstName" );I tried to print out the firstName, I got a blank!
    Please advise what went wrong.

    Further to what I have posted, I did pass some fixed values in my link. They are picked up. Let me explain:
    <c:url value="/admin/sortUsers.do" var="ascFirstName">
        <c:param name="sortKey" value="firstName" />
        <c:param name="orderKey" value="ASC" />
        <c:param name="searchFirstName" value="${searchFirstName}" />
    </c:url>
    <A href=' <c:out value="${ascFirstName}" /> '></A>The fixed values "firstName" and "ASC" are picked up without problem. But the "${searchFirstName}" where searchFirstName is the property of a text field is not picked up. I got a blank when I write it out using System.out.println in my action class.

  • Increaseing the height and width of textfield and password fields

    Dear friends in apex 4.1 when we create a application it automatically creates a login page
    with username and password field in it
    So my question is can i increase the height and width of the username and password field in that login page
    If it is possible please help.
    and also i cannot find the html tag like <input type=text............>
    Where to find it?

    Hi,
    You can easily achieve this using css
    <style>
    input.myclass
      height:100px;
      width:100px;
    </style>
    <input type="test" class="myclass" size="10">So in APEX you have to edit the textfield > HTML Form Eelement Attributes > put class="myclass"
    Thanks

  • Using Enter key on the TextField

    How to complete filling of the text to a TextField after pressing key "Enter"?

    pressing enter causes any ActionListener objects to be notified. checkout the java tutorial to see how to do this:
    http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html
    (note this actually uses a JTextField but it's pretty much the same with TextField)
    jonesy (sun developer support)

  • Width of Textfield

    Hello,
    I'm using Netbeans 6.1 with the bundled Glassfish. I'd like to define the width of a textfield with the width-property of a CSS-style. But this is totaly ignored. And when I delete the "column"-property it is treated as if I defined "column=20".
    So how can I define the Tefield with a width of, for example, 30px?
    Regards

    Hi,
    You can easily achieve this using css
    <style>
    input.myclass
      height:100px;
      width:100px;
    </style>
    <input type="test" class="myclass" size="10">So in APEX you have to edit the textfield > HTML Form Eelement Attributes > put class="myclass"
    Thanks

  • How to set max length to textfield?

    I have a textfield. I want to set maxlength to this textfield. Example, length = 3.
    Help me?

    I succeeded. That link you sent very well. Thanks you. Then it's code:
    JTextFieldLimit.java
    import javax.swing.text.*;
    //import com.sun.java.swing.*;
    //import javax.swing.text.*;
    public class JTextFieldLimit extends PlainDocument {
       private int limit;
       // optional uppercase conversion
       private boolean toUppercase = false;
       JTextFieldLimit(int limit)
        super();
        this.limit = limit;
       JTextFieldLimit(int limit, boolean upper) {
        super();
        this.limit = limit;
        toUppercase = upper;
       public void insertString
         (int offset, String  str, AttributeSet attr)
           throws BadLocationException {
        if (str == null) return;
        if ((getLength() + str.length()) <= limit) {
          if (toUppercase) str = str.toUpperCase();
          super.insertString(offset, str, attr);
    tswing.java
    import java.awt.*;
    import javax.swing.*;
      //import javax.swing.*;
      public class tswing extends JApplet{
        JTextField textfield1;
        JLabel label1;
        public void init() {
          getContentPane().setLayout(new FlowLayout());
          label1 = new JLabel("max 10 chars");
          textfield1 = new JTextField(15);
          getContentPane().add(label1);
          getContentPane().add(textfield1);
          textfield1.setDocument
             (new JTextFieldLimit(10));
    TextField.html
    <html>
    <applet code=tswing width=500 height=500>
    </applet>
    </html>
    By tungld_c0701m+

  • Textfield help

    Cant someone help with code below on how I can put 2 dates in
    two textfields with code below. the fields are named Datefrom and
    Dateto
    thanks
    <?php
    $country=$_REQUEST['SelectDate'];
    switch($country)
    case "1" :
    Datefrom textfield = Datefrom;
    Dateto; textfield = Dateto;
    break;
    case "2" :
    Datefrom textfield = Datefrom;
    Dateto; textfield = Dateto;
    break;
    ?>
    <form action="" name="form3" id="form3">
    <select name="SelectDate" id="SelectDate" onchange="">
    <option value="1">Current Year</option>
    <option value="2">Current Year-to-date</option>
    <option value="3">Yesterday</option>
    <option value="4">Last Week</option>
    <option value="5">Last Week-to-date</option>
    <option value="6">Last Month</option>
    <option value="7">Last Month-to-date</option>
    <option value="8">Last Year</option>
    <option value="9">Last Year-to-date</option>
    <option value="10">Today</option>
    <option value="11">Current Month</option>
    <option value="12">Current Quarter</option>
    <option value="13">Current
    Quarter-to-date</option>
    <option value="14">All Dates</option>
    </select>
    from
    <input name="Datefrom" type="text" id="Datefrom"
    value="<?php echo date("Y-01-01"); ?>" size="10" />
    to
    <input name="Dateto" type="text" id="Dateto"
    value="<?php echo date("Y-12-31"); ?>" size="10" />
    <input name="Datenow" type="hidden" id="Datenow"
    value="<?php echo date("Y-m-d"); ?>" size="10"/>
    <input type="submit" name="button2" id="button2"
    value="New date" />
    </form>

    Hello, how do you modify the contents of a TextField
    once its been implemented? setText, See the documentation
    http://java.sun.com/j2se/1.5.0/docs/api/java/awt/TextField.html
    And how do you accept user
    input from the Textfield and store it somewhere? Add a save button, and call getText when you want to get the text.
    Help
    would be appreciated thanks.Btw. Why are you using AWT instead of Swing?

  • HtmlText Auto formatting textfield

    how could we remove auto tag adding by htmlText Property because when we apply htmlText for a textfield it automatically add <p> and <font> tag.
    In my project i am saving one textfield property <p align='right'> in server but when i am assigning this value from server its changing to <p align='left'>.
    So how could we remove this auto formatting by htmlText??
    As in http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/TextField.html link there is written also "When its htmlText property is traced, the output is the HTML-formatted String, with additional tags (such as <P> and <FONT>) automatically added by Flash Player."
    i want to remove this auto adding tag. Please help me out.

    Hy thanks K for so fast reply,
         No, i am basically making an editor kind of thing, where some text have align=left property and some have align=right property. So while saving i am checking alignment of the text and applying in <p> tag. Suppose i saved <p align="right">Text Sample</p> now i called this string from server and applied to my TextField. Now when i am assigning this text to textfield (mytext.htmlText = someServerVariable) then its coming as <p align="left">Text Sample</p>.
    Some tags of font is also there which i ignored here. i just want to put same string in html text. i want to remove auto formatting property of htmlText.

  • Validate user input in textfield?

    Am trying validate user input into my JTextfield but its not working right... Am using the classes from sun's hp :
    http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html
    The classes with changes made:
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.Toolkit;
    import java.text.*;
    public class DecimalField extends JTextField
    private NumberFormat format;
    private NumberFormat percentFormat;
    public DecimalField()
    super(10);
    percentFormat = NumberFormat.getNumberInstance();
    percentFormat.setMinimumFractionDigits(2);
    // ((DecimalFormat)percentFormat).setPositiveSuffix(" ");
    setDocument(new FormattedDocument(percentFormat));
    format = percentFormat;
    public double getValue()
    double retVal = 0.0;
    try
    retVal = format.parse(getText()).doubleValue();
    } catch (ParseException e)
    Toolkit.getDefaultToolkit().beep();
    return retVal;
    public void setValue(double value)
    setText(format.format(value));
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.Toolkit;
    import java.text.*;
    import java.util.Locale;
    public class FormattedDocument extends PlainDocument
    public FormattedDocument(Format f)
    format = f;
    public Format getFormat()
    return format;
    public void insertString(int offs, String str, AttributeSet a)
    throws BadLocationException
    String currentText = getText(0, getLength());
    String beforeOffset = currentText.substring(0, offs);
    String afterOffset = currentText.substring(offs, currentText.length());
    String proposedResult = beforeOffset + str + afterOffset;
    try
    format.parseObject(proposedResult);
    super.insertString(offs, str, a);
    } catch (ParseException e)
    Toolkit.getDefaultToolkit().beep();
    // System.err.println("insertString: could not parse: "
    // + proposedResult);
    public void remove(int offs, int len) throws BadLocationException
    String currentText = getText(0, getLength());
    String beforeOffset = currentText.substring(0, offs);
    String afterOffset = currentText.substring(len + offs,
    currentText.length());
    String proposedResult = beforeOffset + afterOffset;
    try
    if (proposedResult.length() != 0)
    format.parseObject(proposedResult);
    super.remove(offs, len);
    } catch (ParseException e)
    Toolkit.getDefaultToolkit().beep();
    // System.err.println("remove: could not parse: " + proposedResult);
    private Format format;
    what am I doing wrong?

    am sorry
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.Toolkit;
    import java.text.*;
    import java.util.Locale;
    public class FormattedDocument extends PlainDocument
        public FormattedDocument(Format f)
            format = f;
        public Format getFormat()
            return format;
        public void insertString(int offs, String str, AttributeSet a)
        throws BadLocationException
            String currentText = getText(0, getLength());
            String beforeOffset = currentText.substring(0, offs);
            String afterOffset = currentText.substring(offs, currentText.length());
            String proposedResult = beforeOffset + str + afterOffset;
            try
                format.parseObject(proposedResult);
                super.insertString(offs, str, a);
            } catch (ParseException e)
                Toolkit.getDefaultToolkit().beep();
    //            System.err.println("insertString: could not parse: "
    //            + proposedResult);
        public void remove(int offs, int len) throws BadLocationException
            String currentText = getText(0, getLength());
            String beforeOffset = currentText.substring(0, offs);
            String afterOffset = currentText.substring(len + offs,
            currentText.length());
            String proposedResult = beforeOffset + afterOffset;
            try
                if (proposedResult.length() != 0)
                    format.parseObject(proposedResult);
                super.remove(offs, len);
            } catch (ParseException e)
                Toolkit.getDefaultToolkit().beep();
    //            System.err.println("remove: could not parse: " + proposedResult);
        private Format format;
    import javax.swing.*;
    import javax.swing.text.*;
    import java.awt.Toolkit;
    import java.text.*;
    public class DecimalField extends JTextField
        private NumberFormat format;
        private NumberFormat percentFormat;
        public DecimalField()
            super(10);
            percentFormat = NumberFormat.getNumberInstance();
            percentFormat.setMinimumFractionDigits(2);
    //        ((DecimalFormat)percentFormat).setPositiveSuffix(" ");       
            setDocument(new FormattedDocument(percentFormat));
            format = percentFormat;
        public double getValue()
            double retVal = 0.0;
            try
                retVal = format.parse(getText()).doubleValue();
            } catch (ParseException e)
                Toolkit.getDefaultToolkit().beep();
            return retVal;
        public void setValue(double value)
            setText(format.format(value));
    }Well when I create this overriden TextField ( DecimalField ) its working as it should with the first character. Its only accepting digits and . but after the first character its accepting everything. Its like the validation disappear?

  • JTextField keyEvent consume()

    This question is related to the keyEvent-architecture.
    The JTextField (or any JTextComponent for that matter) is designed to use the keyEvents but NOT consume it. Which means the JTextField modifies its internal Document-model and leaves the keyEvent to propagate further for any body (parent-component etc.) to use it.
    I dont really understand why the design leaves that event to be used by anybody with key-mapping for that keyEvent !?!
    In the specific problem that I have, I am putting JTextField in MainFrame which also has zoomIn/zoomOut Menu-actions attached to Minus(-) and Plus(+) keys respectively.
    What I notice is whenever I type, Minus(-) in JTextField, zoomIn is invoked !!
    Well, I was able to prevent that from happening by attaching a keyListener to my JTextField whose ONLY JOB is to consume() ALL keyevents. (ConsumeAllKeysListener)
    This preety much solves my problem. But I would like to know, is this the correct way to prevent STRAY keyEvent propagation ?
    Also until now, I thought that the JTextField uses InputMap/ActionMap to append all the regular keys that are typed. This assumption is does not seem to be true since even when I consume all the keyEvents by attaching the "ConsumeAllKeysListener" the keys actually end up being typed in the JTextField (although that is what I want).
    But, this behaviour makes me think that JTextField has its Document/model setup as keyListener to itself rather that handling the keyEvent using InputMap/ActionMap. Is this true ?
    Hope I am not confusing the matter !?!
    Thanks in anticipation,
    -sharad

    As mentioned above the correct way to do this is to use a Document to edit any characters as they are typed. The reason for this is that this approach will work whether data is 'typed' or 'pasted' into the text field. Check out this section from the Swing tutorial for more information on Documents and examples:
    http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html#validation
    I do not recommend using a KeyListener, but here is the reason why it doesn't work.
    Three events are generated every time you type a character into a text field:
    1) key pressed
    2) key typed
    3) key released
    The key typed event seems to be the important event for adding text to the text field so you could add code in the keyTyped(..) method:
    if (e.getKeyChar() == ',')
        e.consume();

  • Search text in FXZ images

    Hi all
    I want to develop a piece of code which will search the text in FXZ images in javafx which is similar to the following program
    http://java.sun.com/docs/books/tutorial/uiswing/components/textfield.html
    which is in swing and searching in a text of filenow i need just like this functionality but using FXZ images not plain text
    any one have idea then please post here

    Thanks Pavel.Benes
    as you said
    use internal API from fxdloader to open content files. It is possible - however completely unsupported and with high probability also not backward compatible.i am using fxdloader
    and i was tried something like
    import javafx.stage.Stage;
    import javafx.scene.Scene;
    import javafx.scene.text.Text;
    import javafx.fxd.FXDLoader;
    import javafx.scene.Group;
    import javafx.ext.swing.SwingTextField;
    import javafx.ext.swing.SwingButton;
    import java.lang.Void;
    import javafx.scene.Node;
    var myScene: Scene;
    var fxdContent = FXDLoader.loadContent("{__DIR__}images/12_2008_123-7.fxz");
    var RootGroup = fxdContent.getRoot();  //root node
    var GroupA = RootGroup.content as Group[];  //first level siblings
    var rootsize=sizeof GroupA;                 //size of first level siblings
    var textarray = GroupA[0].content;          //content of first level first node
    var newtextarray: Text[] = for (i in textarray where i instanceof Text) {
                i as Text
    //textfield to input text
    var inputtext = SwingTextField {
                editable: true
                translateY: 10
                columns: 20
                text: "Enter Text to search"
    //search button
    var search = SwingButton {
                text: "Search"
                translateX: inputtext.boundsInLocal.maxX
                translateY: 10
                action: function (): Void {
                     var tex = bind inputtext.text;
                    for (i in newtextarray) {
                    if (i.content.contains("{tex}")) {
                    i.underline = not i.underline;
                           }//if
                    i
                    }//for
                    delete RootGroup from myScene.content;
                    insert RootGroup before myScene.content[0] ;
    //now the stage
    Stage {
        title: "Application title"
        scene: myScene = Scene {
            content: [
                RootGroup,
                inputtext,
                search,
    }this is the code i have written but this code have some drawbacks like
    0)It is not highlighting but underling the text and that too whole text screenshot is [http://lh5.ggpht.com/_XZ5lTObJ3ZY/S5XmNL2TqXI/AAAAAAAABac/z5IS6yjXjyE/s512/1.jpg]
    1)it is particular to one particular FXZ image which is having Text nodes at first level first node(which is a Group)
    2)after first search when you make second time search with another key it is not removing previous searched textnow what changes i have to make to this code for avoiding the above drawbacks please help

  • Problem displaying arabic text in xml document

    Hi ..
    I have an xml type coloum where i store an xml document that contains some arabic texts with UTF-8 encoding, m using an xsl file to transform the xml and display it in an html page.
    At the database level when i select the xml col to dispaly the document, arabic texts are displayed correctly (DB is set to 1256), however when trying to display the text on html it gives me junk values. XSL sheet's encoding is set to windows-1256. M using Jdeveloper 1012 and BC4J frame work in my application.
    How do i solve this problem.?
    P.S.it wud b great if u support ur answer with examples .
    Regards

    You have to do it yourself -  I don't have a ready solution. Just look into documentation how StyleSheets are used and see what properties work best for you:
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/TextField.html
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/StyleSheet.html
    Also, with embedded fonts you need to play with TextFormat settings and AntiAliasType
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/AntiAliasType.html
    In addition, on my machine even if I don't emebed fonts - Arabic works in Arial, TImes and others.

  • Problem in displaying Arabic text in flash cs3/cs4

    Hi All, I'm creating one website. I have to display dynamic xmlize arabic text in flash. I have done it using flash cs3/AS3. But problem is that when text displays in flash it is not rendering as expected. Some gaps comes in the characters. But when I open my xml in browser, arabic text displays correct.
    Is there any way to do it in flash cs3 or Flash cs4 using player 9? It would be really great if anyone can give me solution on this. Thanks
    Chandrakant

    You have to do it yourself -  I don't have a ready solution. Just look into documentation how StyleSheets are used and see what properties work best for you:
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/TextField.html
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/StyleSheet.html
    Also, with embedded fonts you need to play with TextFormat settings and AntiAliasType
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/text/AntiAliasType.html
    In addition, on my machine even if I don't emebed fonts - Arabic works in Arial, TImes and others.

  • Is there an equivalent of CSS technology in flash?

    Hi
    At the very outset let me apologize if my question is not in the right group here. Just like how one can use different CSS files to view the same text rendered differently in HTML. I would like to find how to do the same with Flash. My goal is to create multiple flash document templates, without the content in them ( similar to CSS ) and i be able to load content dynamically into them thru external data files. 
    Any pointers will be greatly appreciated?
    Thank you

    External text data needs to be displayed in some object. In Flash it is displayed in TextField instance. So, even if there is no text - you need placers for the text that is loaded (again, placers are TextField instances).
    In addition, "automatically" means that you will have to load files with data at runtime.
    CSS is designed to manipulate appearance - not content.
    Here is documentation for TextField:
    http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/text/TextField.html
    There are plenty of examples on teh web. It seems you would benefit from tutorials on Flash/ActionScript basics.

Maybe you are looking for

  • Lost ability to open pdf files in Safari and Flash Player upgrade is not recognized.

    Since two days ago, when I responded to a Zynga game instruction on Face Book  to upgrade to the newest version of Flash Player, I lost the ability to open the game but more importantly I can't open pdf files any more either. All pdf files  in Safari

  • Recording Digital Audio via Optical Line-in

    Hi, I've been trying for the past hour to record Digital Audio from my XBOX 360 via an Optical Cable, into my MacPro's Optical line-in. However all I get it huge amounts of noise / static / clicking all of the time. Any ideas? Thanks,

  • Force encryption on SQL Server not working?

    Hello Everyone, I'm running SQL Server 2008 64-bit. I've installed a self-signed cert on the box and set  "Force Encryption"  and restarted SQL server.  I setup a client machine to trust the authority of the cert installed on the server. When I conne

  • Need  help using color checker passport with photoshop CS6

    Hello all, I'm having an issue using the Color Checker Passport with Photoshop CS6.  Here's my configuration: Mac Mini using OS 10.8, but very recently updated to 10.9 (Mavericks).  My problem is the same on either OS version. Photoshop CS6 ver 13.0.

  • Formatting money in APEX form ...

    Greetings: I'm trying to format a text field in a form as money. I set the format mask in the Source section to 999G999G999G999G990D00, but I can't seem to get the displayed amount to align to the right inside the text field. It appears to want to ce