« Flex Builder is Free to StudentsEmbedding Fonts In Flex - Tip »

4 comments

  1. § sakri Email said on :
    Tanks for this article Richard, I'm working on a custom editor which needs bullet points, so this came in very handy!

    In your approach, the bullet graphic (or character) is editable. While this isn't the end of the world, I wonder if you might have a trick up your sleeve for making this a non editable feature. Right now all I can come up with is some really nasty solutions like having the graphic below the textflow as a Sprite or so, and update it whenever edits are made... ugh...
  2. § Richard Leggett® Email said on :
    Yeah I think using the InlineGraphicElement is probably the best way to do this right now, but I'm keeping mine editable. I'm hoping built-in lists will be supported before I go live though. Another way would be to listen to the delete/backspace keys and just undo the deletion if it's a bullet character.
  3. § Markus Email said on :
    As this is the only result I found on Google concerning this problem I'll post my solution here.

    My approach was to utilize the TextFlow's TextFlowLines. Iterating over those elements I could then create and position bullet characters (a seperate SimpleText containing only that character) in relation to the TextFlowLine's y property. I guess that property was introduced in one of the recent nightly versions. The function to retrieve a line is:

    anyTLFelement.textFlow.flowComposer.getLineAt(i)

    One can also check if a TextFlowLine belongs to an already "bulleted" ParagraphElement through the paragraph property. This allows you to skip adding a bullet for that line.

    Finally a bullet's style can easily be adjusted to match its paragraph by reading the properties of the current ParagraphElement.

    The above steps are done on every update making this the "update while editing" solution but having non-editable bullets was important for my project.
  4. § Arvind mehta Email said on :
    hiiii i m plotting a text using TLF, i m creating bullet by using text in one span element and text in another span element. both span element in same paragraph tag. now i want to create space between the bullet and text first span havin fontfamily wingdings i.e

    q First paragraph ,

    . so please help me to overcome from this problem

Leave a comment


Your email address will not be revealed on this site.

Your URL will be displayed.
(Line breaks become <br />)
(Name, email & website)
(Allow users to contact you through a message form (your email will not be revealed.)
Contact. ©2010 by Richard Leggett. blog software / UK hosting.
Design & icons by N.Design Studio. Skin by Tender Feelings / Evo Factory.