How should one make bulleted lists in Flex 4, given that “marginLeft” doesn't actually exist?

一笑奈何 提交于 2019-12-12 16:27:25

问题


Gentlepersons,

Imagine wanting to display a bulleted list

  • like
  • this
  • one

...using Adobe's Text Layout Framework (TLF) in Flex 4. How can one define such a bulleted list in MXML?

I understand that the current version of TLF does not yet implement support for bulleted lists.

That's OK, because I don't need my lists to be editable; they are display-only. This reduces the problem-space significantly, and should enable a solution to be kludged up.

A Google search reveals many suggestions to set a paragraph's marginLeft property to a negative number to get this effect. And indeed, Adobe Illustrator CS4, when saving a bullet-indented TextGraphic item in FXG, uses the marginLeft property.

However, using the MXML string whatever generates an error: "Cannot resolve attribute 'marginLeft' for component type flashx.textLayout.elements.ParagraphElement." So the "marginLeft" property does not actually seem to be implemented (or, more likely, I'm doing something wrong).

So, how should implement bulleted lists -- or more generally, hanging out-dents -- using Flex 4's TLF?

Thanks! :-)

--- Jim


回答1:


See http://richardleggett.co.uk/blog/index.php/2009/02/24/bullet_points_align_text_layout_framewor

but basicaly you cheat. You put each bullet in a span, start the span with a special character that looks like a bullet, and put some paddingLeft on each span.



来源:https://stackoverflow.com/questions/2915764/how-should-one-make-bulleted-lists-in-flex-4-given-that-marginleft-doesnt-ac

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!