除了ValidateNow()之外,还有哪些方法可以重新格式化/重新验证Flex中的控件树

时间:2023-01-14 16:19:27

I am having problems with text with multiple lines not reformatting properly when I call loadStyleDeclarations. However if I load the same stylesheet TWICE then it correctly refreshes and reformats the text.

当我调用loadStyleDeclarations时,我遇到了多行没有正确重新格式化的文本问题。但是,如果我加载相同的样式表TWICE,那么它正确刷新并重新格式化文本。

So what I want to do is refresh my control to get it to reformat the text. I've tried ValidateNow() and ValidateDisplayList() but neither seems to cause the correct kind of layout request.

所以我想要做的是刷新我的控件以使其重新格式化文本。我已经尝试过ValidateNow()和ValidateDisplayList(),但似乎都没有导致正确的布局请求。

I'm guessing loadStyleDeclarations() calls some other revalidation function, but i jsut cant find what it is.

我猜是loadStyleDeclarations()调用了一些其他的revalidation函数,但是我不能发现它是什么。

1 个解决方案

#1


1  

Try calling invalidateProperties() and/or invalidateDisplayList() on your component. That should cause the component to be rerendered on a next screen update.

尝试在组件上调用invalidateProperties()和/或invalidateDisplayList()。这应该导致组件在下一次屏幕更新时被重新呈现。

#1


1  

Try calling invalidateProperties() and/or invalidateDisplayList() on your component. That should cause the component to be rerendered on a next screen update.

尝试在组件上调用invalidateProperties()和/或invalidateDisplayList()。这应该导致组件在下一次屏幕更新时被重新呈现。