Just found the solution for this issue, there is a disabledTexFormat setting:

test_cb.setStyle("disabledTextFormat", myFormat);


On 7/13/2009 10:24 AM, Margo Powell wrote:
Glen,
I tried your recommendation and reassigned the dataprovider to the combobox after it was disabled and that did not work unfortunately:( When I am in the debugger, the data appears to be loaded even with out reloading the dataprovider. It is almost like there is an alpha setting somewhere which is hiding all the text.

It is not obvious to me and I might have to go back to using the default text

Thanks for your help
Margo


On 7/13/2009 4:19 AM, Glen Pike wrote:
Hi,

I had a similar problem in the past where I had to reassign the data provider to the combo box - I can't remember exactly what I was doing, but something to do with hiding / disabling the box messed up the display of embedded fonts, etc.

   Anyway, try that - it might help - hope so.

   Glen

Margo Powell wrote:
I think I am missing something really simple.I have been spinning my wheels this afternoon trying to figure out why my embedded text disappears when I set my combobox.enabled = false;

If I use default text and disable the combobox, the text appears with some alpha effect. If I embed text and disable the combobox , the text disappears.



_Scenario using default text:_
To test, I just place a combobox in a flash page. I add a couple of items to the combobox and name the combobox test_cb.

test_cb.addEventListener(Event.CHANGE, changeHandler);

function changeHandler(event:Event):void {
      test_cb.enabled = false;
}

Everything works hunky dory. The combobox is disabled AND the selected text item is still visible.

_Scenario using embedded text:_

In my library I create a new font (in my case i used arial bold 12) and named it ComboFont. Linkage settings to be exported for actionscript and in frame 1.

In my actions layer:
// Create a new instance of the Font1 symbol from the document's library.
var myFont:Font = new ComboFont();

var myFormat:TextFormat = new TextFormat();
myFormat.font = myFont.fontName;
test_cb.setStyle("embedFonts", true);
test_cb.setStyle("textFormat", myFormat);
            // Set dropdown style for comboBox
test_cb.textField.setStyle("embedFonts", true);
test_cb.textField.setStyle("textFormat", myFormat);
            test_cb.dropdown.setRendererStyle("embedFonts", true);
test_cb.dropdown.setRendererStyle("textFormat", myFormat);

test_cb.addEventListener(Event.CHANGE, changeHandler);

function changeHandler(event:Event):void {
test_cb.enabled = false;
}

The font looks like it has been embedded, it is much darker.
When the combobox is disabled after an item has been selected, the text is NOT visible.

I would appreciate any help!

Thanks
Margo

------------------------------------------------------------------------

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


------------------------------------------------------------------------

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


--
Margo Powell
Applications Analyst
MS Computer Science
Department of Nutrition
University of North Carolina at Chapel Hill
800 Eastowne Dr, Suite 100
Chapel Hill, NC 27514
919-408-3320 ext 30
margo_pow...@unc.edu

_______________________________________________
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to