Log In  
  Getting Started  
compared with
Current by matthew horn
on Apr 22, 2008 14:16.

(show comment)
 
Key
These lines were removed. This word was removed.
These lines were added. This word was added.

View page history


There are 1 changes. View first change.

 {section}
 {column:width=80%}
  
 h2. Canvas container - absolute positioning
  
 * Canvas is the only container that lets you explicitly specify the location of its children within the container.
 * Canvas has only one layout value - absolute.
 * Use the x and y properties of child components for pixel-perfect layouts.
 * If the display window is resized, the child components stay fixed in place and may appear cut off.
 * Using absolute positioning you can make child controls overlap if desired.
 {column}
 {column}
 {adbe-prev:http://learn.adobe.com/wiki/display/Flex/Box+Model}
 {adbe-next:http://learn.adobe.com/wiki/display/Flex/Canvas+-+relative}
 {rate:title=User rating|theme=dynamic|key=focal|display=default}
 {column}
 {section}
 {code}
 <?xml version="1.0" encoding="utf-8"?>
 <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
  layout="absolute"
  backgroundColor="#FFFFFF"
  backgroundAlpha="0">
  
  <mx:Canvas x="23" y="34">
  
  <mx:Button label="&lt; prev"
  x="4" y="97" />
  
  <mx:Image source="assets/animals03.jpg"
  x="85" y="4" />
  
  <mx:Label text="Photographed by Elsie Weil"
  x="85" y="230" />
  
  <mx:Button label="next &gt;"
  x="381" y="97" />
  
  </mx:Canvas>
  
 </mx:Application>
 {code}
  
 h2. Rendered Sample
  
  {test-flash:500|300|Use_B_Canvas_Absolute.swf}Use_B_Canvas_Absolute{test-flash}
  {test-flash:300|400|Use_B_Canvas_Absolute.swf}Use_B_Canvas_Absolute{test-flash}
  
 {adbe-prev:http://learn.adobe.com/wiki/display/Flex/Box+Model}
 {adbe-next:http://learn.adobe.com/wiki/display/Flex/Canvas+-+relative}
Powered by Atlassian Confluence 2.7.1, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators