Different font colors inside a list box... [SOLVED]

Started by rich, Tue 16/10/2007 19:48:55

Previous topic - Next topic

rich

I looked through the help and found no specific function that could do this... is it possible to have different lines of text in a listbox have different color fonts? And, I mean scripting it so each item of text dynamically appears as a different color. Right now... you can set the selected font color and the foreground text color in the GUI editor... but that seems to be it. Is that it?

I could build a sort of custom Listbox that will generate different lines of text with different colors, but since it would be a lot of work, I'd prefer not to if I don't have to.
I'm so excited!

Pumaman

List boxes do not currently support different formatting for different lines.

rich

#2
Good to know. Thanks for the speedy response.

I was looking into using Textual Overlays to solve the problem, but that might be more trouble than it's worth. Instead, I think I'll go ahead and create a custom listbox.  Add up, down buttons that appear when the list is full enough.  Create an internal index of strings. Then add some GUI Labels on the GUI which I can change dynamically to indicate where I currently am on the list. I see that there is a Label.TextColor property so, that should do that trick! Should be completely do-able and will have the advantage that I can make the list box look any way I want it to. I can also add a functional slider between the up and down buttons.

EDIT: Took me about four hours, but I successfully created a custom list box. I couldn't get the slider to work, but that's okay because I didn't have it originally. I've given it the same limit as a regular list box. The only thing you can't do with it is highlight the various items in the list, but I actually didn't want that ability anyway for my purpose, but it certainly is quite doable. If anyone wants any advice about how to achieve this affect, drop me a line and I'd be happy to help.
I'm so excited!

SSH

My Hypertext module lets you do various fonts and colours (and links) in Display-type windows, into a Dynamic Sprite or in speech bubbles.
12

SMF spam blocked by CleanTalk