在extjs中将Flex值动态添加到控制器 [英] Add Flex value dynamically to controller in extjs

查看:98
本文介绍了在extjs中将Flex值动态添加到控制器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在查看中给出了一些项目(容器),一个 hbox 的布局。现在我想通过Controller给每个项目$ 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?

我已经浏览了该文档,但找不到任何方法,如 setFlex

I have gone through the docs but can't find any method like setFlex.

编辑

Ext.apply(Ext.getCmp('IdHere'), {flex: 1});

我已经得到了这个链接
但现在的问题是即使我正在动态更改flex值,容器的视图也没有改变。它保持不变。

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.

我没有按照 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.

这篇关于在extjs中将Flex值动态添加到控制器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆