Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 在Flex中调整数据组中的问题大小_Actionscript 3_Resize_Flex4_Flash Builder_Flex4.5 - Fatal编程技术网

Actionscript 3 在Flex中调整数据组中的问题大小

Actionscript 3 在Flex中调整数据组中的问题大小,actionscript-3,resize,flex4,flash-builder,flex4.5,Actionscript 3,Resize,Flex4,Flash Builder,Flex4.5,我正在开发Flex4.6Web应用程序。我有一个数据组,它具有水平布局的自定义itemRenderer。放置在可调整大小的面板中的数据组。现在,当我调整面板大小时,我会增加itemRenderer的高度以增加数据组的高度,但问题是,当我增加itemRenderer的高度时,它会增加数据组的contentHeight,然后我会返回以调整其大小itemRenderer height会减小,但contentHeight不会更改,如果有,则会滚动数据更少 代码如下: <s:DataGroup id

我正在开发Flex4.6Web应用程序。我有一个数据组,它具有水平布局的自定义itemRenderer。放置在可调整大小的面板中的数据组。现在,当我调整面板大小时,我会增加itemRenderer的高度以增加数据组的高度,但问题是,当我增加itemRenderer的高度时,它会增加数据组的contentHeight,然后我会返回以调整其大小itemRenderer height会减小,但contentHeight不会更改,如果有,则会滚动数据更少

代码如下:

<s:DataGroup id="dgStationId" width="100%" height="100%" maxWidth="25000" maxHeight="25000" dataProvider="{dp}" 
                             itemRenderer="DateRenderer">
                    <s:layout>
                        <ronsByDate:SimpleHorizontalLayout useVirtualLayout="true" clipAndEnableScrolling="false" verticalScrollPosition="0"/>
                    </s:layout>        
                </s:DataGroup>

调整大小的功能是:

protected function resizeHandler(event:ResizeEvent):void
            {               
                if(ronsConfigId.width > 0 && this.height > MINIMIZED_HEIGHT && (this.height >= this.minHeight || this.width >= this.minWidth))
                {   
                    dgStationId.minHeight = this.height - 305;
                    gpCalenderId.minHeight = this.height - 80;
                    gpCalenderId.width = this.width - (ronsConfigId.width + 38);

                    for(var j:int =0 ; j< dp.length ; j++)
                    {
                        (dgStationId.getElementAt(j) as DateRenderer).minHeight = this.height - 310;                    
                    }               

                    trace("dgStationId.contentHeight : " + dgStationId.contentHeight);                  
                }               
            }
受保护函数resizeHandler(事件:ResizeEvent):无效
{               
如果(ronsConfigId.width>0&&this.height>MINIMIZED_height&&this.height>=this.minHeight | | this.width>=this.minWidth))
{   
dgStationId.minHeight=this.height-305;
gpCalenderId.minHeight=this.height-80;
gpCalenderId.width=this.width-(ronsConfigId.width+38);
对于(变量j:int=0;j
如果在调整列表大小之前,列表中的数据较少,请按如下所示进行调整:

调整大小并返回到面板的初始状态后,数据组中将出现滚动:

item的黑色矩形位于itemRenderer内。 我怎样才能解决这个问题