English 中文(简体)
运用工具
原标题:Implementing toolstrip in flex

我是灵活方案拟定的新内容。 我想要使用一种习俗工具。 这一工具范围将包括一个菜单(或一个定制的等同物),显示诸如档案、Edit等普通菜单以及搜索箱。 它应当具有足够的灵活性,在今后纳入其他菜单,如书记等。 有些人是否建议对继承我的内容进行最适当的控制? 我一直想到<代码>mx:Group,s:BorderContainer<>code>,mx:HBox,但n t是能够相互选择的。 而他们当中没有一个似乎适合我的任务,因为它们只是明确了其他物体的布局。 是否有任何部门直接支持这种功能。 我也想到使用<条码>mx:Menu Bar <>/code>,但我不知道是否有足够的灵活性来添加诸如搜索箱等非门项目。

最佳回答

为了加快使用速度和方便使用,使用Mendu Bar。

也许这样:

//psuedo code
<HGroup> //draw your background for both components in the HGroup container
 <menuBar> //menubar has a transparent background
 <spacer width="100%">
 <searchBox>
</HGroup>
问题回答

在最基本的层面上,你的工具屏障将需要进行控制。 我在执行工具路障时通常使用“HGroup”集装箱,并视需要增加菜单、纽芬兰、分离器、搜索箱等。 也许,你想从某种背景,如梯度,看黑体。 灵活性4一般是用皮肤做成的,但我认为,对于这种简单的组成部分而言,这种简单的组成部分不需要根据不同的国家改变其表面形象,这并不过分。 我建议如下一些内容,即允许你在不必另立的皮肤档案的情况下为工具bar提取背景:

<?xml version="1.0" encoding="utf-8"?>
<s:Group xmlns:fx="http://ns.adobe.com/mxml/2009" 
         xmlns:s="library://ns.adobe.com/flex/spark" 
         xmlns:mx="library://ns.adobe.com/flex/mx" width="100%">
    <s:Rect left="0" right="0" top="0" bottom="0">
        <s:fill>
            <s:LinearGradient rotation="90">
                <s:GradientEntry color="0xe0e0e0"/>
                <s:GradientEntry color="0xa0a0a0"/>
            </s:LinearGradient>
        </s:fill>
    </s:Rect>
    <s:HGroup top="2" bottom="2" left="8" right="8" verticalAlign="middle">
        <s:Button label="Something"/>
        <s:Button label="Another"/>
        <s:Button label="Other Another"/>
        <mx:Spacer width="100%"/>
        <s:TextInput/>
    </s:HGroup>
</s:Group>




相关问题
Disable button tooltip in AS3

I want to disable the tooltip on certain buttons. The tooltip manager seems to be an all or nothing solution. Is it possible to disable the tooltip for just one or two buttons?

Multiple Remote call made simultenously

I was making multiple remote calls and they are done sequentially and when I am getting a result event back it s triggering calls to all the methods with ResultEvent as an argument . I am supposed to ...

Attaching a property to an event in Flex/AS3

I have a parameter that needs to be passed along with an event. After unsuccessful attempts to place it on the type by extending the class, I ve been advised in another SO question to write a custom ...

Clearing RSL in Cache

I have built a flex application which has a "main" project and it is assosciated with a few RSL s which are loaded and cached once i run my "main" application. The problem i am facing is that the ...

What s a good way of deserializing data into mock objects?

I m writing a mock backend service for my flex application. Because I will likely need to add/edit/modify the mock data over time, I d prefer not to generate the data in code like this: var mockData =...

AS3 try/catch out of memory

I m loading a few huge images on my flex/as3 app, but I can t manage to catch the error when the flash player runs out of memory. Here is the what I was thinking might work (I use ???? because i dont ...