Set padding verticallayout In Flex 4 | flex examples

Source: Internet
Author: User

BelowCodeDemonstrate how to set the padding style of a Panel (or other containers) throughPaddingleft,Paddingright,PaddingtopAnd/orPaddingbottomProperties.

 
<?XML Version= "1.0" Encoding= "UTF-8"?>
 
<! -- Http://blog.flexexamples.com/2009/05/20/setting-padding-on-a-spark-verticallayout-in-flex-gumbo/ -->
 
<S: Application Name= "Spark_verticallayout_padding_test"
 
Xmlns: FX= "Http://ns.adobe.com/mxml/2009"
Xmlns: S= "Library: // ns.adobe.com/flex/spark"
 
Xmlns: MX= "Library: // ns.adobe.com/flex/mx">
 
<S: controlbarcontent>
 
<MX: Form Paddingtop= "0" Paddingbottom= "0">
 
<MX: formitem Label= "Paddingleft :">
<S: hslider ID= "Sliderleft"
 
Minimum= "0"
 
Maximum= "50"
 
Value= "0" />
 
</MX: formitem>
 
<MX: formitem Label= "Paddingright :">
<S: hslider ID= "Sliderright"
 
Minimum= "0"
 
Maximum= "50"
 
Value= "0" />
 
</MX: formitem>
 
<MX: formitem Label= "Paddingtop :">
<S: hslider ID= "Slidertop"
 
Minimum= "0"
 
Maximum= "50"
 
Value= "0" />
 
</MX: formitem>
 
<MX: formitem Label= "Paddingbottom :">
<S: hslider ID= "Sliderbottom"
 
Minimum= "0"
 
Maximum= "50"
 
Value= "0" />
 
</MX: formitem>
 
</MX: Form>
 
</S: controlbarcontent>
 
 
<S: Panel Title= "Spark panel title"
 
Width= "90%" Height= "90%"
 
Horizontalcenter= "0" Verticalcenter= "0">
 
<S: Layout>
<S: verticallayout Paddingleft= "{Sliderleft. Value }" Paddingright= "{Sliderright. Value }"
 
Paddingtop= "{Slidertop. Value }" Paddingbottom= "{Sliderbottom. Value }" />
 
</S: Layout>
 
<S: button ID= "Btn1"
 
Label= "Red"
Basecolor= "Red"
 
Width= "100%" Height= "100%" />
 
<S: button ID= "Btn2"
 
Label= "Orange"
 
Basecolor= "Haloorange"
 
Width= "100%" Height= "100%" />
<S: button ID= "Btn3"
 
Label= "Yellow"
 
Basecolor= "Yellow"
 
Width= "100%" Height= "100%" />
 
<S: button ID= "Btn4"
 
Label= "Green"
 
Basecolor= "Halogreen"
Width= "100%" Height= "100%" />
 
<S: button ID= "Btn5"
 
Label= "Blue"
 
Basecolor= "Haloblue"
 
Width= "100%" Height= "100%" />
 
</S: Panel>
</S: Application>

Demo address http://dl.dropbox.com/u/4509565/FlexExamples_com/Spark_VerticalLayout_padding_test/main.html available
Dropbox has to go over the wall to view

Reprinted from setting padding on a spark verticallayout In Flex 4 | flex examples

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.