Hi Superstella,

I'd like to second Josh's suggestion, with a little modification now that
it's clearer what you'd like to do.

I'd suggest that you create a font with the symbols you want to use and
intermingle that font with the text fonts just as you would if you were
mixing two different font faces. They don't have to be gif fonts, you can
embed vector fonts and they would scale just fine. The only limitation you
face by doing it this way is that each icon would need to be a single color
like text normally is, so you might use both options, have the text font,
the unicolor symbol fonts and a few multicolor gif symbols. If you start out
with large gifs and scale them down before placing them in the textfield,
they should look nice at any reasonable text resolution.

The benefit of doing it this way is that you get the speed of normal rich
text.

The only weakness is that it's been a long time since I saw a program for
creating fonts come out. MM's font creation program was the best I knew
about when doing this kind of thing for math expressions in textfields and
that was in 2000. And it was a pretty old program even back then. If you do
follow this up and find a font editor that you like I'd like to hear about
it.

-Cort

On 1/21/07, superstella_uk <[EMAIL PROTECTED]> wrote:

  Thanks to everyone for the responses.

Reid: Im writing a chat application, which will allow the user to join
several rooms at once. The chat area will show a mixture of text,
images, and also some other controls such as buttons etc intermingled
with the text.

At the moment, I parse all chat text and create a label from it, which
is added to the chat area. In cases where there are smileys etc, or
places where buttons need to be embedded in the text, I split the text
into two or more labels, and position them with Image or Button
controls etc.

This works ok for a few lines, but the resource requirements shoot up
enormously once you have a hundred lines of mixed text.

Also the container is very slow to scroll, presumably because its
validating the layout on the list of child controls.

Ideally what I would like is to store the chat text in custom
structures in memory, rather than as visible components. Then when it
comes to painting the *visible* portion of the chat area, I can simply
render those myself, without the need to add them all as child Labels etc.

Someone suggested using a bitmapped font which would allow me to do
this, at the expense of easily producing different font sizes,
anti-aliasing etc.

Ive also thought about simply rendering an offscreen bitmap, by
producing a label, capturing its 'image' to a bitmap, and then
painting that on the offscreen. Once all the visible labels and
controls are done, I can then paint the offscreen bitmap to the
visible viewport.

Ive tried richedit also, but it doesnt suit my needs, as its a bit
limited in positioning of images which is very important for me

Thanks for any more ideas. Looks like Ive got my work cut out....

--- In [email protected] <flexcomponents%40yahoogroups.com>,
Reid Priedhorsky <[EMAIL PROTECTED]> wrote:

> Can you elaborate on your "various reasons"? I think that our advice
> would be much more effective if we knew why Label and TextField didn't
> work for you.
>
> Thanks,
>
> Reid
>

Reply via email to