Solved

display hbox in center of datagrid

Posted on 2011-09-06
7
208 Views
Last Modified: 2012-05-12
Hi guys

I have a editable datagrid with one editable column. On KEY_UP event on that editable column i am displaying a HBox. I want to display the HBox on the center of the screen(on top of datgrid). any idea how i can do that?

Is there an attribute on HBox i can use?

thanks
0
Comment
Question by:royjayd
  • 4
  • 3
7 Comments
 
LVL 29

Expert Comment

by:dgofman
ID: 36492443
How about if you will use

PopupManager API's

http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/managers/PopUpManager.html

PopUpManager.createPopUp(), and PopUpManager.centerPopUp() methods


0
 
LVL 29

Expert Comment

by:dgofman
ID: 36492448
0
 

Author Comment

by:royjayd
ID: 36492975
Ok .Also can I put x and y coordinates in popupmanager . If I want to put the popup at x=10 y=10
is it possible?
Thanks
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 29

Expert Comment

by:dgofman
ID: 36492981
wait , you asking how to put on the center if you want to control yourself do not use centerPopUp API.
Just sen manually x and y
0
 

Author Comment

by:royjayd
ID: 36496260
can you show me an example with setting X and Y for popupmanager?

when i try like this it works
PopUpManager.centerPopUp(dataGrid);  

i want to set x and y coordinates to popupmanager.

thanks
0
 
LVL 29

Accepted Solution

by:
dgofman earned 500 total points
ID: 36499499
Did you try to write a code before asking me?

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
			   xmlns:s="library://ns.adobe.com/flex/spark" 
			   xmlns:mx="library://ns.adobe.com/flex/mx"
			   width="100%" height="100%" creationComplete="onComplete()">
		<fx:Script>
			<![CDATA[
                import mx.containers.Panel;
                import mx.managers.PopUpManager;
			    

                protected function onComplete():void
                {
                    var panel:Panel = PopUpManager.createPopUp(this, Panel) as Panel;
                    panel.width = 500;
                    panel.height = 400;
                    panel.x = (width - panel.width) / 2;
                    panel.y = (height - panel.height) / 2;
                }

			]]>
		</fx:Script>
</s:Application>

Open in new window

0
 

Author Comment

by:royjayd
ID: 36601937
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

First things first - Preparation We need all the part for this install and it's much nicer to have them all on hand when you need them so here's what's required. Download Eclipse 3.5 32 bit (I like the Classic flavour) from here. (http://www.e…
This problem is more common than not and I will show you some things to check to solve this problem.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

809 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question