How to Use the titleicon attribute in flex to add an icon to the title of the Panel container

Source: Internet
Author: User

The following example demonstrates how to use the titleicon attribute in flex to add an icon to the title of the Panel container.

Let's take a look at the demo (Right-click View Source or click here to view the source code):

 

The following is the complete code (or click here to view details ):

Download: main.mxml<?xml version="1.0" encoding="utf-8"?>
<mx:Application name="Panel_titleIcon_test"
        xmlns:mx="http://www.adobe.com/2006/mxml"
        layout="vertical"
        verticalAlign="middle"
        backgroundColor="white">
 
    <mx:String id="lorem" source="lorem.txt" />
 
    <mx:Panel id="panel"
            title="Panel title"
            titleIcon="@Embed('assets/Panel.png')">
        <mx:Text id="txt"
                text="{lorem}"
                width="500"
                textAlign="justify"
                selectable="false" />
    </mx:Panel>
 
</mx:Application>

This article from: http://blog.minidx.com/2008/10/19/1556.html

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.