我在“视图”中给出了一些项目(容器),一个hbox的布局。 现在我想通过“Controller”为每个项目赋予flex值。 我怎样才能做到这一点?
我已经浏览了文档,但找不到像setFlex这样的setFlex 。
编辑 :
Ext.apply(Ext.getCmp('IdHere'), {flex: 1});我从这个链接得到了答案。 但现在的问题是,即使我动态更改flex值,容器的视图也不会改变。 它保持不变。
我最初没有在“View”中指定flex值,如此处所述
I am giving some items (containers), in "View", a layout of hbox. Now I want to give flex value to each item through the "Controller". How can I do this?
I have gone through the docs but can't find any method like setFlex.
EDIT :
Ext.apply(Ext.getCmp('IdHere'), {flex: 1});I have got the answer from this link. But now the problem is that even I am changing the flex values dynamically, the view of the containers is not changing. It is remaining same.
I am not assigning flex values initially in "View" as stated here
最满意答案
我的第一个猜测是需要通过调用doLayout()重新运行布局过程我不太确定,但我认为你必须调用保存hbox布局的父元素。
My first guess would be that need to rerun the layout process by calling doLayout() I am not quite sure but I think you have to call in on the parent element which holds the hbox layout.
更多推荐
发布评论