Flex的ID contentGroup的查询Flex、ID、contentGroup

由网友(故事少了结局)分享简介:IAM学习Flex和实践的皮肤。所以,我只是有一个疑问:iam learning Flex and practising skins. So, i just had one doubt:我已经写了一个名为自定义皮肤: ApplicationContainerSkin.mxml I have written o...

IAM学习Flex和实践的皮肤。所以,我只是有一个疑问:

iam learning Flex and practising skins. So, i just had one doubt:

我已经写了一个名为自定义皮肤: ApplicationContainerSkin.mxml

I have written one custom skin named : ApplicationContainerSkin.mxml

<?xml version="1.0" encoding="utf-8"?>
<s:SparkSkin 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:states>
        <s:State name="normal" />
        <s:State name="disabled" />
    </s:states>


    <fx:Metadata>
        [HostComponent("spark.components.Application")]
    </fx:Metadata>


    <fx:Declarations>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>

    <s:Group horizontalCenter="0" verticalCenter="0">

        <s:Rect left="0" right="0" top="0" bottom="0"
                radiusX="10" radiusY="10">
            <s:fill>
                <s:SolidColor color="#CCCCCC" />
            </s:fill>
        </s:Rect>


        <s:Group id="contentGroup"
                 left="30" right="30" top="30" bottom="30">

        </s:Group>

    </s:Group>

</s:SparkSkin>

我的疑问: 当我删除 S:组id =contentGroup的,IAM无法看到我的应用程序内的任何内容,所以这是为什么 contentGroup的'身份证必要

My Doubt: When I removed s:Group id="contentGroup" , iam unable to see any content inside my application, so why is this 'contentGroup' id necessary?

在哪里这个ID predefinedly规定?对不起,如果它是一个小白查询,但IAM急于知道它。我甚至试图检查源$ C ​​$ C,但我没有发现它,谁能告诉我它规定?如何我的内容使用该contentGroup的后只渲染ID ...? (我的意思是,它在内部如何运作的?)

where this id predefinedly specified.? sorry if its a noob query, but iam eager to knew it.I even tried to check the source code, but I didnt found it, Could anyone tell me where it specified and how does my content render only after using this contentGroup id...? ( I mean, how it internally works? )

等待你的答复!

推荐答案

换肤Spark组件注明皮肤部件,确定的ID。

Skinnable Spark components specify "skin parts," identified by the id.

应用程序组件,您要剥皮,定义2外观部件 - contentGroup的和controlBarGroup,你可以在这里的文档中看到:http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/Application.html#SkinPartSummary

The Application component, which you are skinning, defines 2 skin parts - contentGroup and controlBarGroup, as you can see in the documentation here: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/Application.html#SkinPartSummary

应用程序类使用contentGroup的外观部件(如果它在皮肤中添加)布置的内容。可以要求或没有皮肤的部分。不是必需的contentGroup的一部分,因此当你离开它,内容只是不显示。

The Application class uses the contentGroup skin part (if it has been added in the skin) to lay out the content. Skin parts can either be required or not. The contentGroup part is not required, and therefore when you left it out, the content just did not display.

阅读全文

相关推荐

最新文章