PDA

View Full Version : help combobox change color and bold in text


javiadas
01-05-2007, 01:00 AM
hi, i want to have a combobox where some of the text are in some color and the other with bold, how can i make this..
any idea ??

inhan
01-05-2007, 01:21 AM
In which way are you loading the text?
Normally you can use htmlText with html tags but I never tried that with a component, yet there should be a way around to do this while you're attaching the combobox dynamically.

javiadas
01-05-2007, 01:43 AM
well still now im just testing how to do it, if you have any idea please help me...

thanks

inhan
01-05-2007, 02:51 AM
In Flash help, under the title "Setting styles on a component instance" I've come along with editing the combobox style. The action is used like:

instanceName.setStyle("propertyName", value);

and under the title "Combining skinning and styles to customize a component" there's further infomation about styling a ComboBox, however, what I have understood from all that I read is that it seems not possible to treat each list element individually, used in a ComboBox component.

javiadas
01-05-2007, 03:23 PM
thanks,

then if i cant change the style for individual list elemets, any idea, i need to make a combo like a menu, where i offer the category and the subcategories, where when i select any subcategory i go to an url.

any idea could help me.

the only thing i need is just in the categories make bold the text or with different color

thanks

inhan
01-05-2007, 10:35 PM
You can achieve that with dynamically duplicated menu boxes, which have dynamic text fields within. You can either define/create new styles and attach those to these dynamic text fields or call an array made with / set the text with html tagged text (don't forget to use the_text_area.htmlText and to set html=true in that case).