- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个宽度设置为 100% 的组合框。但是,当其中一个元素变大时,组合框也会变大,从而在我的应用程序中产生滚动条和其他丑陋之处!如何将组合框包含在其父项中?
注意,如果下拉列表较大,只要关闭的组合框保持较小即可。
示例:
<?xml version="1.0" encoding="utf-8"?>
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml" width="100%" height="100%">
<!-- I'm using a Canvas instead of a VBox because the VBox spaces the elements too far appart -->
<mx:HBox id="tagsHBox" width="{formsHBox.width - 16}" x="8" y="8">
<!-- This label should align with the labels in the left form -->
<mx:Label text="Tags" id="tabLabel" width="{titleTxt.x + 4}" textAlign="right" />
<!-- This textbox should spread accross both forms, that's why it's in a seperate HBox -->
<mx:TextInput height="20" width="100%" />
</mx:HBox>
<mx:HBox id="formsHBox" x="8" y="{8 + tagsHBox.height}" width="{this.width-16}">
<mx:Form id="leftForm" width="50%">
<!-- Personal details -->
<mx:FormHeading label="Personal Details" width="100%" />
<mx:FormItem label="First name" width="100%">
<mx:TextInput text="{person.firstName}" width="100%"/>
</mx:FormItem>
<mx:FormItem label="Last name" width="100%">
<mx:TextInput text="{person.lastName}" width="100%"/>
</mx:FormItem>
<!-- And 15 more formItems :) -->
</mx:Form>
<mx:Form id="rightForm" width="50%">
<!-- Address -->
<mx:FormHeading label="Address" width="100%" />
<mx:FormItem label="Street" width="100%">
<mx:TextInput text="{person.address.street}" width="100%"/>
</mx:FormItem>
<mx:FormItem label="City" width="100%">
<mx:TextInput text="{person.address.city}" width="100%"/>
</mx:FormItem>
<mx:FormItem label="Country" width="100%">
<!-- This combobox right here is the troublemaker. There's a
country named 'South Georgia and the South Sandwich
Islands' consising of a few small islands in the southern
pacific and a name which is too long for my innocent
unsuspecting combobox -->
<form:ComboBox id="countryCombo" height="20" width="100%"
dataProvider="{model.systemDataModel.countries}" />
</mx:FormItem>
<!-- And 15 more formItems :) -->
</mx:Form>
</mx:HBox>
</mx:Canvas>
最佳答案
您也许可以改用 minWidth。将其设置为零或其他一些低值。我知道它适用于像 HBox 和 VBox 这样的容器,使它们停止变得比它们的父容器大,所以它也可以适用于 ComboBox。基本上,发生的情况是 minWidth="0"覆盖了 measuredMinWidth,这是父容器通常认为的最小可能大小的值,它可能大于容器自身的边界。
关于apache-flex - MXML:组合框宽度大于父宽度,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1833457/
我想做的是:创建一个带有一些子组件的 MXML 组件,然后通过 MXML 扩展它以创建一个具有更多子组件的新组件,而不会丢失原始集合。 换句话说 创建一个组件 bc.mxml 然后将其
正如标题所暗示的,“组件”(New –> MXML 组件)和“模块”(新建 –> MXML 模块)有什么区别? 谢谢, 大卫 最佳答案 模块被编译成 SWF 并在运行时使用 ModuleLoader
我一直在尝试创建一个自定义 mxml 组件来扩展另一个自定义 mxml 组件(即 MyMXMLComponent -> BaseMXMLComponent -> Group)。 我一直在读到,尝试向
在我的应用程序中使用 Flex-Blazeds-java...,在我的 Flex 应用程序端有两个 mxml 文件 Main.mxml 登录.mxml 在 Main.mxml 文件中有一个名为 Log
你好 我有一个正则表达式的问题。我在 MXML 中有一个 RegExpValidator,我希望它在源包含 a 或 b 时无效 我的 RegExpValidator 是 我的表达式是expressi
如果在 MXML 中可以完成的所有事情也可以在 ActionScript 中完成,而且很多事情在 ActionScript 中更容易完成(循环、条件等) 为什么要花时间学习 MXML? 我在这一点上的
我有一个宽度设置为 100% 的组合框。但是,当其中一个元素变大时,组合框也会变大,从而在我的应用程序中产生滚动条和其他丑陋之处!如何将组合框包含在其父项中? 注意,如果下拉列表较大,只要关闭的组合框
这是我尝试使用 MXML 库解析的 XML 文件: REQ 4567 192.168.1.1
我有一个可以运行的视频电话应用程序,但我现在正在尝试从数据库中获取一些数据。我对 PHP 最满意。 我正在尝试从名为“chat”的数据库中的“users”表获取 1 个值,其中 status=1(状态
我想在 AdvancedDataGrid 中提供我自己的 sortItemRenderer,如下所示: MyRenderer 是我编写的一个类,但 Flex 没有看到它并给出“未找到定义”错误,因为
当我在 MXML 组件中定义自定义属性时,我还想定义该属性的一组可能值,以便在调用代码完成函数时让 Flex Builder 显示(自定义属性的可能值)。 知道怎么做吗? 最佳答案 使用 [Inspe
我有一个只能在 classA 中使用的 classB。但是,classA 被编写为 mxml,而不是 actionscript 代码。是否可以在 MXML 中嵌套类或在同一个 .mxml 文件中的根标
我正在学习 Flex 并发现了一些奇怪的行为。当我尝试编译我的代码时,我抛出了这个错误 - 错误:调用可能未定义的方法 updateStory。我以前以这种方式使用过方法调用,但在这种情况下无法发现问
在我的MXML文件,我有一个带有三个 vbox 的选项卡导航器。
我怎么说 MXML 组件在某个包中?好吧,它在不同的文件夹中......我知道怎么做 ActionScript......但是当我在 MXML 中这样做时,我没有明确声明包,因为我不知道如何以及何时将
这是类(class): package fnc { import mx.containers.Canvas; public class Deck extends Canvas {
跳出框框思考... 可以采取哪些可能的基本方法来创建可以运行 Java 的 Flex 组件? 我知道我可以轻松地使用 Flex 浏览或启动 Java 应用程序,但有些事情只有当我可以从 MXML 组件
我有一个带有表单的 MXML,里面有两个 TextInput。我讨厌在 MXML 文件中包含任何代码(我来自 JavaScript 格式)所以我使用了 mx:Script source="extern
从本教程 http://www.brighthub.com/internet/web-development/articles/11010.aspx 我找到了下面的代码。有没有办法解决这个问题,所以
是否有一种简单的方法可以在 MXML 图形中绘制不涉及贝塞尔曲线的圆弧?或者我应该创建自己的组件? 谢谢! f 最佳答案 我最终创建了自己的 mxml 图形组件来绘制弧线。我覆盖 Ellipse Sp
我是一名优秀的程序员,十分优秀!