Skip to main content
Damon Edwards
Inspiring
February 17, 2011
Answered

leading in combo box textfield

  • February 17, 2011
  • 1 reply
  • 2389 views

Why the heck doesn't the leading get set on the textField in the combobox! ahhh!   The text format is being set correctly because the font/color/size are all good, and the dropdown is all good.  It's just the textField..

private var tf_arial_enabled:TextFormat = new TextFormat(new ArialRegular().fontName, 16, 0xea8443, null, null, null, null, null, 'left', null, null, null, 2);

theComboBox.setStyle("textFormat", tf_arial_enabled);

ttheComboBox.textField.setStyle("textFormat", tf_arial_enabled);

theComboBox.dropdown.setRendererStyle("textFormat", tf_arial_enabled);

theComboBox.setStyle("embedFonts", true);

theComboBox.textField.setStyle("embedFonts", true);

theComboBox.dropdown.setRendererStyle("embedFonts", true);

I haven't been here in awhile, sorry for code formatting if there ends up being a problem after posting

This topic has been closed for replies.
Correct answer Kenneth Kawamoto

no, i want to move the text up in the text field rather than have it ride the bottom of the field. looks terrible.  The dropdowns all accept the leading argument and follow it beautifully.  The text field doesnt.


A hack

theComboBox.textField.setStyle("textPadding", -2);

1 reply

Kenneth Kawamoto
Community Expert
Community Expert
February 17, 2011

You have "ttheComboBox.textField.setStyle("textFormat", tf_arial_enabled);". Also a leading is basically a line-spacing - are you sure you want multi-line text in your ComboBox?

Damon Edwards
Inspiring
February 17, 2011

I'm not understanding what you're pointing out in your quoted text.  Please ellaborate.

Kenneth Kawamoto
Community Expert
Community Expert
February 17, 2011

You have the wrong ComboBox name there