Adobe
Products

Top destinations

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • SiteCatalyst
  • Students
  • Elements family

Adobe Creative Cloud

  • What is Adobe Creative Cloud?
  • Design
  • Web
  • Photography
  • Video
  • Students
  • Teams
  • Enterprise
  • Educational institutions

Design and photography

  • Photoshop
  • Illustrator
  • InDesign
  • Adobe Muse
  • Lightroom

Video

  • Adobe Premiere
  • After Effects

Web development and HTML5

  • Edge Tools & Services [opens in a new window]
  • Dreamweaver
  • Gaming [opens in a new window]

Adobe Marketing Cloud

  • What is Adobe Marketing Cloud?
  • Digital analytics
  • Social marketing
  • Web experience management
  • Testing and targeting
  • Media optimization

Analytics

  • SiteCatalyst
  • Adobe Discover
  • Insight

Social

  • Adobe Social

Experience Manager

  • CQ
  • Scene7

Target

  • Test&Target
  • Recommendations
  • Search&Promote

Media Optimizer

  • AdLens
  • AudienceManager
  • AudienceResearch

Document services

  • Acrobat
  • EchoSign [opens in a new window]
  • FormsCentral [opens in a new window]
  • SendNow [opens in a new window]
  • Acrobat.com [opens in a new window]

Publishing

  • Digital Publishing Suite

  • See all products
Business solutions

By business need

  • Digital analytics
  • Digital publishing
  • Document management
  • Media optimization
  • Social marketing
  • Testing and targeting
  • Video editing and serving
  • Web development [opens in a new window]
  • Web experience management
  • See all business needs

By industry

  • Broadcast
  • Education
  • Financial services
  • Government
  • Publishing
  • Retail
  • See all industries
Support & Learning

I need help

  • Products
  • Adobe Creative Cloud
  • Adobe Marketing Cloud
  • Forums [opens in a new window]

I want to learn

  • Training and tutorials
  • Certification [opens in a new window]
  • Adobe Developer Connection
  • Adobe Design Center
  • Adobe TV [opens in a new window]
  • Adobe Marketing Center
  • Adobe Labs [opens in a new window]
Download
  • Product trials
  • Adobe Flash Player
  • Adobe Reader
  • Adobe AIR
  • See all downloads
Company
  • Careers at Adobe
  • Investor Relations
  • Newsroom
  • Privacy
  • Corporate Social Responsibility
  • Customer Showcase
  • Contact us
  • More company info
Buy
  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers
  • Adobe Marketing Cloud sales [opens in a new window]
Search
 
Info Sign in
Why sign in? Sign in to manage your account and access trial downloads, product extensions, community areas, and more.
Welcome,
My Adobe
My orders
My information
My preferences
My products and services
Sign out
My cart
Privacy My Adobe
Adobe
Products Sections Buy   Search  
Solutions Company
Help Learning
Sign in Sign out Privacy My Adobe
Preorder Estimated Availability Date. Your credit card will not be charged until the product is shipped. Estimated availability date is subject to change. Preorder Estimated Availability Date. Your credit card will not be charged until the product is ready to download. Estimated availability date is subject to change.
Qty:
Purchase requires verification of academic eligibility
Subtotal
Promotions
Estimated shipping
Tax
Calculated at checkout
Total
Review and Checkout
Adobe Developer Connection / Flex Developer Center / Flex in a Week /

Exercise 5.7: Creating a vertical title bar on a Panel container

by Trilemetry

Trilemetry
  • Trilemetry, Inc.

Content

  • Move the background elements
  • Move the text elements and make them vertical

Modified

23 May 2011

Page tools

Share on Facebook
Share on Twitter
Share on LinkedIn
Bookmark
Print
Flash BuilderFlexRIA
Was this helpful?
Yes   No

By clicking Submit, you accept the Adobe Terms of Use.

 
Thanks for your feedback.

Requirements

Prerequisite knowledge

  • Exercise 1.1: Setting up Flash Builder and your project files
  • Exercise 5.1: Using text controls
  • Exercise 5.2: Defining selector styles
  • Exercise 5.3: Using advanced CSS selectors
  • Exercise 5.5: Creating and applying skins
  • Exercise 5.6: Creating custom skin properties

User level

Beginning

Required products

  • Flash Builder 4.7 Premium (Download trial)

Exercise files

  • ex5_07_starter.zip
  • ex5_07_solution.zip

In this exercise you will learn how to use a skin to make the Panel container title bar vertical (see Figure 1).

For this exercise you customize the Panel container skins.
Figure 1. Review your task for this exercise.

In this exercise you will learn how to:

  • Move the background elements
  • Move the text elements and make them vertical

Move the background elements

In this section, you will use the PanelContainerSkin.mxml skin component to adjust the Panel container title skins so that they display vertically intead of horizontally.

  1. Download the ex5_07_starter.zip file provided in the Exercise files section and extract the ex5_07_starter.fxp to your computer.
  2. Open Flash Builder.
  3. Import the ex5_07_starter.fxp file.
  4. Open the ex5_07_starter.mxml file.
  5. Run the application.

    You should see the application shown in Figure 2.

Run the application.
Figure 2. Run the application.
  1. Return to Flash Builder
  2. Within the Package Explorer view, open the PanelContainerSkin.mxml file from the skins package.
  3. Locate the skins:PanelSkin tag.
  4. To the skins:PanelSkin tag, add the rotation property with a value of 90 and the top, bottom, and right properties all with a value of 0.
<skins:PanelSkin rotation="90" top="0" bottom="0" right="0"/>
  1. Locate the Group container with the id of contentGroup and remove the top property.
  2. Save the file and run the application.

    You should see the Panel container title skin located on the right of each Panel container, but is overlapped by the Panel container content and the content within each panel has shifted up (see Figure 3).

 Add a rotation to the Panel container title bar.
Figure 3. Add a rotation to the Panel container title bar.
  1. Return to the ex5_07_starter.mxml file.
  2. To the EmployeeOfTheMonth component instance, add the width property with a value of 227.
<components:EmployeeOfTheMonth width="227"/>
  1. Repeat step 13 for the Cafeteria and MonthlyEvents component instances.
  2. Save the file and run the application.

    You should see that the content is contained within each panel container, except for the Calorie Information in the Cafeteria panel (see Figure 4). Also note that the text for the employee's title in the Employee of the Month panel is very close to the edge of the panel.

The Calorie Information is not contained within the Cafeteria panel
Figure 4. The Calorie Information is not contained within the Cafeteria panel.

Move the text elements and make them vertical

In this section, you will adjust the position of the text elements and you will make the panel title display vertically along the panel title skins.

  1. Return to Flash Builder and open Cafeteria.mxml from the components package.
  2. Locate the RichText container tag and reassign the value of the width property to 100%.
  3. Save the file.
  4. Open the EmployeeOfTheMonth.mxml file from the components package.
  5. Locate the Label control with the text Hardware Engineering Product Manager. Change the value of the width property to 100 and change the value of the height property to 50.
  6. Save the file and run the application.

    You should see the content in the Cafeteria panel does not overlap with the panel skin and the employee's title in the Employee of the Month panel has better spacing (see Figure 5).

The content in the Cafeteria Special panel does not overlap with the panel skin
Figure 5. The content in the Cafeteria Special panel does not overlap with the panel skin.
  1. Return to Flash Builder and open the PanelContainerSkin.mxml file.
  2. Locate the titleDisplay Label control and add the rotation property with a value of 90.
  3. From the Label control, remove the verticalAlign and left properties.
  4. To the Label control, reassign the right property with a value of 8 and the top property with a value of 35.
<s:Label id="titleDisplay" linebreak="explicit" right="8" top="35" height="30" fontWeight="bold" color="#FFFFFF" rotation="90"/>
  1. Save the file and run the application.

    The title text is now displayed vertically along the right side of the Panel containers, but the colored box is not positioned above the panel title (see Figure 6).

The title text is displayed vertically
Figure 6. The title text is displayed vertically.
  1. Return to the PanelContainerSkin.mxml file in Flash Builder.
  2. Locate the second Rect block.
  3. To the opening Rect tag, add the right property with a value of 0.
<s:Rect height="23" width="23" right="0"> <s:fill> <s:SolidColor id="headerSkinColor"/> </s:fill> </s:Rect>
  1. Save the file and run the application.

    You should see the color blocks are now properly positioned above the panel titles (see Figure 7). Note that, in the Monthly Events panel is a gap between the bottom of the Scroller and the bottom of the Panel container. This happened because you added a padding property to the VerticalLayout class of the Monthly Events Panel in a previous exercise.

The color blocks are positioned above the panel titles
Figure 7. The color blocks are positioned above the panel titles.
  1. Return to Flash Builder and open the MonthlyEvents.mxml file from the components package.
  2. Locate the VerticalLayout class nested in the layout property block under the Properties of the parent comment.
  3. Remove the paddingBottom property from the VerticalLayout tag.
  4. Save the file and run the application.

Note that the Scroller now goes to the bottom of the Monthly Events panel container (see Figure 8).

The Scroller goes to the bottom of the Monthly Events panel
Figure 8. The Scroller goes to the bottom of the Monthly Events panel.

In this exercise you learned how to use a skin to make the Panel container title bar vertical. In the next exercise you learn how to use a skin to animate Button states.

Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License+Adobe Commercial Rights

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License. Permissions beyond the scope of this license, pertaining to the examples of code included within this work are available at Adobe.

More Like This

  • Exercise 5.10: Creating a production build
  • Exercise 5.8: Animating Button components
  • Exercise 3.4: Passing data to the server with the WebService class
  • Exercise 3.7: Using two-way binding
  • Exercise 2.8: Creating an ArrayCollection of value objects
  • Exercise 3.4: Passing data to the server with the RemoteObject class
  • Exercise 3.6: Validating form data
  • Exercise 4.4: Using the Spark DataGrid control
  • Exercise 4.6: Navigating using navigator containers
  • Exercise 5.1: Using text controls

Products

  • Adobe Creative Cloud
  • Creative Suite
  • Adobe Marketing Cloud
  • Acrobat
  • Photoshop
  • Digital Publishing Suite
  • Elements family
  • SiteCatalyst
  • For education

Download

  • Product trials
  • Adobe Reader
  • Adobe Flash Player
  • Adobe AIR

Support & Learning

  • Product help
  • Forums

Buy

  • For personal and professional use
  • For students, educators, and staff
  • For small and medium businesses
  • Volume Licensing
  • Special offers

Company

  • News room
  • Partner programs
  • Corporate social responsibility
  • Career opportunities
  • Investor Relations
  • Events
  • Legal
  • Security
  • Contact Adobe
Choose your region United States (Change)
Choose your region Close

North America

Europe, Middle East and Africa

Asia Pacific

  • Canada - English
  • Canada - Français
  • Latinoamérica
  • México
  • United States

South America

  • Brasil
  • Africa - English
  • Österreich - Deutsch
  • Belgium - English
  • Belgique - Français
  • België - Nederlands
  • България
  • Hrvatska
  • Česká republika
  • Danmark
  • Eastern Europe - English
  • Eesti
  • Suomi
  • France
  • Deutschland
  • Magyarország
  • Ireland
  • Israel - English
  • ישראל - עברית
  • Italia
  • Latvija
  • Lietuva
  • Luxembourg - Deutsch
  • Luxembourg - English
  • Luxembourg - Français
  • الشرق الأوسط وشمال أفريقيا - اللغة العربية
  • Middle East and North Africa - English
  • Moyen-Orient et Afrique du Nord - Français
  • Nederland
  • Norge
  • Polska
  • Portugal
  • România
  • Россия
  • Srbija
  • Slovensko
  • Slovenija
  • España
  • Sverige
  • Schweiz - Deutsch
  • Suisse - Français
  • Svizzera - Italiano
  • Türkiye
  • Україна
  • United Kingdom
  • Australia
  • 中国
  • 中國香港特別行政區
  • Hong Kong S.A.R. of China
  • India - English
  • 日本
  • 한국
  • New Zealand
  • 台灣

Southeast Asia

  • Includes Indonesia, Malaysia, Philippines, Singapore, Thailand, and Vietnam - English

Copyright © 2013 Adobe Systems Incorporated. All rights reserved.

Terms of Use | Privacy | Cookies

Ad Choices

Reviewed by TRUSTe: site privacy statement