Archive

Posts Tagged ‘DropDownList’

DropDownController PopupAnchor

November 8, 2011 Leave a comment

Lets pretend you have a popup that you want to show when a button is clicked, as in the following example:

<?xml version="1.0" encoding="utf-8"?>
<s:WindowedApplication 
	xmlns:fx="http://ns.adobe.com/mxml/2009"
	xmlns:mx="library://ns.adobe.com/flex/mx"
	xmlns:s="library://ns.adobe.com/flex/spark">
	
	<s:Button 
		label="Some Button that pops something up"
		horizontalCenter="0"
		verticalCenter="0"
		click="popup.displayPopUp = true;"/>

	<s:PopUpAnchor 
		id="popup"
		right="0"
		bottom="0">
		<s:Group>
			<s:Rect 
				width="50"
				height="50">
				<s:fill>
					<s:SolidColor color="0xFF00FF"/>
				</s:fill>
			</s:Rect>
		</s:Group>
	</s:PopUpAnchor>

</s:WindowedApplication>

How do you easily manage when the popup is closed in this case?
Read more…

Advertisements