dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: How to display Special Characters in Combobox Component?

Hybrid View

  1. #1

    How to display Special Characters in Combobox Component?

    I have a screen in which I load a Combobox from the Library onto my Stage at runtime and then populate that Combobox's dataProvider with text from an XML file that loaded in as well.

    I have set a style for all my components, including the Combobox to use a simple font (_sans) and to not embed a font. The reason being, I ahve ot be able to support 12 different languages and their glyphs. That all works great.

    My problem is, why can I not display an apostrophe (sp?) in my ComboBox dropdown list but I can display all manner fo different glyphs otherwise?

    I have tried escaping that character with a "\" but that didn't work. And I can not find where to set the dropdown list textfields to render HTML like you can with dynamic textField objects using..

    code:
    textfield.html = true;
    textfield.htmlText = "blah";



    No matter what I try I continually get a "'" display in the place of my apostrophe.

    Any ideas out there? This one is boggling me.

  2. #2
    absent
    Join Date
    Aug 2000
    Location
    NB, Canada
    Posts
    155

    & #39;

    I've had this come up from time to time, i found that using the number versions of these special characters works better.
    ' = & #39; (i had to add a space after the & because it kept being formatted as an apostrophe when i posted.)
    While looking for the number for the apostrophe i found this link: http://fishbowl.pastiche.org/2003/07..._curse_of_apos

    Hope that helps, g'luck!
    - g

  3. #3
    gomar, thanks for the help. Unfortunately, it didn't work for me. It kep throwing a "&" up inthe combobox for the ampersand before the "#39".

    If there was just a way to get to the dropdown's (List component) textfields and set them to render HTML text it should work. BUt I can not find a CSSStyleDeclaration object property or method that can allow that. I have even run for..in loops on the component just to dig for what the elements are in it and I can not find a solid answer.

    This is wacky.

  4. #4
    absent
    Join Date
    Aug 2000
    Location
    NB, Canada
    Posts
    155
    Very interesting, is it possible to post your .fla?
    I'm interested in seeing how you're populating the comboBox with data.
    I just gave a quick shot at it and found by using

    comboBox.addItem("my list's data");

    it had no problems with the apostrophe, however, you're very right it doesn't like the "& apos;" or the "& #39;".

    The only other thing i can think of is the problem i've had with the Rich Text apostrophe, i find it makes a square in my Flash's text fields. ( instead of ' , which appears as "my list[]s data" )
    - g

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center