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], 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 >
