You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by derChris <ch...@goal-games.de> on 2013/11/19 15:45:09 UTC
Problem with StyleableTextField and negative leading
Hi,
I am extending and IconItemRenderer and override createMessageDisplay:
override protected function createMessageDisplay():void
{
messageDisplay =
StyleableTextField(createInFontContext(StyleableTextField));
messageDisplay.styleName = this;
messageDisplay.editable = false;
messageDisplay.selectable = false;
messageDisplay.multiline = true;
messageDisplay.wordWrap = true;
messageDisplay.lineBreak = LineBreak.EXPLICIT;
messageDisplay.styleDeclaration =
styleManager.getStyleDeclaration(".textField_S2_C1");
messageDisplay.setStyle("leading", -1);
addChild(messageDisplay);
}
The Content of the messageDisplay has 4 lines like "1\n2\n3\n4"
I use this renderer in 2 Tables of the same view (same base ItemRenderer -
left is extended but only adding an extra icon).
One table is always correct - the other tables itemRenderer always don't
show the last line of the messageDisplay UNTIL I click on it or scroll it
out of sight and go back to it.
Setting height or min height doesn't work.
setting heigth (or minHeight, ...) to 120
-> height is 99
getPreferredBoundsHeight is about 86
getLayoutBoundsHeight is about 107
(same thing when setElementSize, ...)
when removing the negative leading everything works fine...
Any idea why this happens?
Chris
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Problem-with-StyleableTextField-and-negative-leading-tp3824.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.