I am using flex TitleWindow and I have set its width and height as 100% for both. There is one datagrid placed in this TitleWindow. However, whatever I did to change the window size, it is not getting reflected. Changes are just getting reflected inside the Eclipse design window but not in actual application. Can anyone please suggest something?
<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml"
width="100%"
height="100%"
verticalScrollPolicy="off"
title="GanttChart"
xmlns:project="mpt.project.*"
showCloseButton="true"
close="closePopup()"
>
<mx:Script>
<![CDATA[
import mpt.vo.project.GanttChart;
import mx.collections.ArrayCollection;
import mx.managers.PopUpManager;
[Bindable]
private var styledEditor:IFactory=new ClassFactory(StyledItemEditor);
[Bindable]
private var dataForGanttGrid:ArrayCollection;//=new ArrayCollection([{title: "Task 1", start: 0, duration: 3, percentComplete: .7}, {title: "Task 2", start: 1, duration: 3, percentComplete: .5}, {title: "Task 3", start: 2, duration: 3, percentComplete: .3}, {title: "Task 4", start: 5, duration: 5, percentComplete: 0}]);
public function init():void
{
this.dataForGanttGrid=new ArrayCollection();
}
public function setDataForGanttGrid(title:String,start:int,duration:int,setPosition:int):void
{
this.dataForGanttGrid.addItemAt({title: title, start: start, duration: duration, percentComplete: .7},setPosition);
}
private function closePopup():void
{
PopUpManager.removePopUp(this);
}
]]>
</mx:Script>
<mx:VBox width="100%"
height="100%">
<project:GanttDataGrid width="100%"
height="100%"
max="10"
ganttItemEditor="{styledEditor}"
taskHeaderWidth="170"
dataProvider="{dataForGanttGrid}"/>
</mx:VBox>
</mx:TitleWindow>