I have an application with a totally custom UI which I draw myself and that doesn't use any of the standard application UI components. I have text stored in a resource file which I want to read in and have scrollable on the screen.
My question is, are there any components which will add you in creating scrollable text with a custom UI? I haven't been able to find any yet and am not really sure where to look, so I was just going to use my own idea. This would be to read the text into a buffer, then go through the buffer word by word and check how much space the word takes up in pixels given the current font. This way I would know when to wrap the text and I would also know the font height so I would know how many lines I could display on the screen. This seems like an awful lot of work though and I figure someone else out there already has a method to do what I want to do.
Last edited by Subotai4Winds; 2005-02-03 at 23:31.
basically the text wrapping is quite easily done. Just check the CFont class, it has something called measure text, which allows you to count the number of the characters from selected part of string that can be drawn in certain space. Then all you need to check is the next and current characters, if they are space (or something that could start next line),, and if not, then just go character by character backwards to find to right place to cut the string.
The scrollers can also be drawn quite easily by yourself, or you could use the CEikScrollBarFrame.