-
1. Re: Title window issue
huangxinghui Mar 23, 2011 12:55 AM (in response to senthil s)can you give some codes, please
Thanks
-
2. Re: Title window issue
senthil s Mar 23, 2011 2:45 AM (in response to huangxinghui)function nenu():void
{
var myMenu:Menu= Menu.createMenu(null,Upload_Count, false);
myMenu.labelField=
"@label";
myMenu.addEventListener(MenuEvent.ITEM_CLICK,itemClickUsermenu);
myMenu.setStyle(
"themeColor", "black");
myMenu.show();
}
function itemClickUsermenu(event:MenuEvent):void
{
if(event.item.@label=="Add")
{
createPopUp();
}
else if(event.item.@label=="Edit")
{
createPopUp();
}
else if(event.item.@label=="Edit Existing Data")
{
createPopUp();
}
}
//title window creation//
function createPopUp():void
{
var rtw:TitleWindow = new TitleWindow();
var lbl1:spark.components.Label=new spark.components.Label();
var lbl2:spark.components.Label=new spark.components.Label();
rtw.title="Explorer User Prompt.";
rtw.height = 150;
rtw.width = 550;
rtw.x =80;
rtw.y =50;
lbl1.text = "Script Prompt:";
lbl2.text = "New Option Value.";
lbl1.top = lbl1.left =lbl1.right = lbl1.bottom = 10;
lbl2.top = 20;
rtw.addEventListener("close", closeHandler);
rtw.addElement(lbl1);
rtw.addElement(lbl2);
PopUpManager.addPopUp(rtw, this, false);
}
This one is perfectly working in outside area .i mean ouside of the list...but not working witin the list contains datagrid.....
-if i use directly in the datagrid without list it is working good....list only problem for me...pls give any idea...
Thanks&Regards,
senthil.
-
3. Re: Title window issue
huangxinghui Mar 23, 2011 6:37 PM (in response to senthil s)have any errors?
i copy your codes and run, have no problems
can you show us the datagrid code?
Thanks
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical"> <mx:Script> <![CDATA[ import mx.collections.ArrayCollection; import popwin.InputWindow; import mx.controls.Menu; import mx.events.MenuEvent; import mx.managers.PopUpManager; [Bindable] private var arr:ArrayCollection = new ArrayCollection([ {STRING:"abc\nsdfgsdfg", NUMBER:123}, {STRING:"acd", NUMBER:4234}, {STRING:"bdc", NUMBER:1534523}, {STRING:"bbccafdsafas", NUMBER:124}, {STRING:"ghdfsghfh", NUMBER:143}, {STRING:"hdsg", NUMBER:12}, {STRING:"cgfsdgd", NUMBER:1}, {STRING:"12", NUMBER:5345} ]); private function createMenu():void { var myMenu:Menu= Menu.createMenu(null,{ STAFF_CODE: "12", STAFF_NAME: "Sys Adminasdfas",isSelected:true, children:[ {STAFF_CODE: "6073", STAFF_NAME: "testuser",isSelected:false, children:[ {STAFF_CODE: "6073", STAFF_NAME: "testuser",isSelected:false}, {STAFF_CODE: "6073", STAFF_NAME: "testuser",isSelected:false} ]}, {STAFF_CODE: "6073", STAFF_NAME: "testuser",isSelected:false}]}, false); myMenu.labelField="STAFF_NAME"; myMenu.addEventListener(MenuEvent.ITEM_CLICK,itemClickUsermenu); myMenu.setStyle("themeColor", "black"); myMenu.show(); } private function itemClickUsermenu(event:MenuEvent):void { createPopUp(); } private function createPopUp():void { var rtw:InputWindow = new InputWindow(); PopUpManager.addPopUp(rtw, this, false); } ]]> </mx:Script> <mx:Label id="tipLabel" text="ToolTips"/> <mx:DataGrid dataProvider="{arr}" width="100%" height="150" click="createMenu()"> <mx:columns> <mx:DataGridColumn headerText="STRING" dataField="STRING"/> <mx:DataGridColumn headerText="NUMBER" dataField="NUMBER"/> </mx:columns> </mx:DataGrid> </mx:Application>

