The ideas in your original question might be the way to go then.  Some simplification can be done by making your own component (FootnoteTextArea).  Throw a UITextField on a UIComponent and then overlay the footnotes (images or additional UITextFields) as children to the FootnoteTextArea (simplifies the origin point).  You can re-layout the footnotes on resize of the FootnoteTextArea or the change event of UITextField.  The a placeholder for the footnotes can be represented in the UITextField by a space character in a special font that won't otherwise be used. You can search for these placeholder characters and then use the getCharBoundaries() to find out where the footnote should be placed.

It's not simplest solution...unless there isn't an alternate solution.

I'm going to need to implement superscript in a few months, so I'd be interested to hear if you ever find a solution.

Good luck,

- Dan

On 11/7/06, thegators_2002 <[EMAIL PROTECTED]> wrote:
Thanks, Dan!

I tried your suggestion and made a small SWF.  I embedded it in a line
of htmlText using the <img> tag.

<mx:htmlText><![CDATA[Total Amount<img src=''>
Required Today: <font color="#ff0000">$0</font>]]></mx:htmlText>

Unfortunately, Flex doesn't seem to render it correctly.  The image
only appears when I have a text control that is expanded to be several
lines long.  In other words, I can't just put a simple 1-line text
field on the canvas and generate the text.  I have to use a multi-line
text field or text area, and even then the image appears at the end of
the text.

In the help, it says "The <img> tag is not fully supported in Flex 2,
and might not work in some cases" and also "This tag is supported only
in dynamic and input text fields that are multiline and wrap their
text".  There is an example about how to make text flow around an
image.  I can't really do this for a simple superscript footnote
number, unfortunately.

Does anyone have any other ideas I can try?  It seems odd that
something so simple should be so impossible!  :(

Thanks for any help,
Pete





--- In [email protected], "Daniel Freiman" <[EMAIL PROTECTED]> wrote:
>
> to the best of my knowledge, there's not a great way to do this.  My
best
> idea would be to create a footnote swf and embed it in the textbox
with the
> img tag.  Each swf could be passed a number (and/or possibly some
formating
> information) and would simply display that number in a small font in a
> textfield (autosize left).  you would need to keep track of the number
> within the textbox so that if one gets deleted the rest get renumbered
> automatically (or i guess you could let them edit it manually too).
>
> - Dan
>
> On 11/6/06, thegators_2002 <[EMAIL PROTECTED]> wrote:
> >
> > Hi,
> >
> > My Flex app will have lots of text that must be footnoted on the
> > screen.  Some of the text includes dynamically generated numbers, so
> > the size of the textbox is indeterminate at design-time.
> >
> > I have read that superscript/subscript HTML tags are not supported in
> > the HtmlText sections of the text controls.  And, because the text
> > fields are dynamically sized, I can't just pop a shrunken footnote
> > image or text control on the canvas overlaying the textbox.  Does
> > anyone know of a way I could dynamically add superscript to a line of
> > text generated at runtime?
> >
> > Thanks,
> > Pete
> >
> >
> >
> >
> > --
> > Flexcoders Mailing List
> > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
> > Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
>





--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/flexcoders/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/flexcoders/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto: [EMAIL PROTECTED]
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/



__._,_.___

--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com





SPONSORED LINKS
Software development tool Software development Software development services
Home design software Software development company

Your email settings: Individual Email|Traditional
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Daily Digest | Switch to Fully Featured
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe

__,_._,___

Reply via email to