【问题标题】:UI rendering inconsistencies in Flex applicationFlex 应用程序中的 UI 呈现不一致
【发布时间】:2009-04-27 15:25:26
【问题描述】:

有没有人注意到 Flex 应用程序中的 UI 呈现不一致。我在中继器内遇到单选按钮和文本控件问题。下面是一个示例...

什么会导致这种不一致?电脑性能、网速?

下面的转发器有一个 XML Web 服务作为数据提供者,使用 Flex 的 e4x 支持。在给定的 Flex 应用程序中可以呈现的数据是否存在阈值?

请注意,大多数时间 Flex 可以正常渲染应用程序,但 大多数时间在此应用程序中还不够好。

谢谢。

alt text http://img87.imageshack.us/img87/1435/error3b.jpg

MXML 代码如下,根据要求:

<mx:Repeater id="rpQuestions" width="100%" height="100%" dataProvider="{srv.lastResult..Question}"> <mx:Box backgroundColor="#FFFF99" width="100%"> <mx:Text styleName="questionText" text ="{rpQuestions.currentIndex+1 +': ' +rpQuestions.currentItem.@QuestionText}" fontSize ="12" width="100%" selectable="false" /> </mx:Box> <mx:HBox visible="{rpQuestions.currentItem..Image.length() > 0}" includeInLayout="{rpQuestions.currentItem..Image.length() > 0}"> <mx:Repeater id="rpImages" dataProvider=quot;{rpQuestions.currentItem..Image}" > <mx:Image source="{rpImages.currentItem.@Path}" width="350" height="250" /> </mx:Repeater> </mx:HBox> <mx:Repeater id="rpAnswers" dataProvider="{rpQuestions.currentItem..Answer}" width="75%" height="75%"> <mx:HBox> <mx:Spacer width="12" /> <!-- NOTE: the RadioButton's label property is not used because long text won't wrap. Instead we use a Text control. --> <mx:RadioButton groupName="{rpQuestions.currentItem.@QuestionID}" value="{rpAnswers.currentItem.@AnswerID}" click="_questionAnswerd(event)" selected="{rpAnswers.currentItem.@Selected == '1'}" /> <mx:Text text="{rpAnswers.currentItem.@Answer}" width="600" selectable="false" /> <!-- End--> </mx:HBox> </mx:Repeater> </mx:Repeater>

【问题讨论】:

  • 刚刚编辑的问题包括 mxml。

标签: apache-flex flex3 air flash


【解决方案1】:

我会尝试确保中继器内的 hbox 设置了一个高度百分比(比如 100% 用于带有单选按钮的高度,其中继器设置为 75%)。

或者您可以在中继器完成创建子组件(“repeatEnd”事件)后尝试使显示/大小无效。

【讨论】:

    【解决方案2】:

    【讨论】:

      猜你喜欢
      • 2011-03-19
      • 2017-03-31
      • 1970-01-01
      • 2014-09-19
      • 1970-01-01
      • 1970-01-01
      • 2020-10-13
      • 1970-01-01
      • 2016-09-16
      相关资源
      最近更新 更多