[size=large]1、
private function resizeComponent():void
{
if(detail.textHeight > detail.minHeight)
{
var newHeight:int = height + detail.textHeight - detail.minHeight;
if(newHeight <= maxHeight && newHeight >= minHeight)
detail.height = newHeight-20;
else
{
height = maxHeight-50
;
width = maxWidth;
}
}
PopUpManager.centerPopUp(this);
}
此方法是处在一个弹出窗体TileWindows中。
如果不指定TitleWindows的maxWidth与maxHeight时那么它的最大值将铺满整个屏幕;
设置了页面的minHeight与maxHeight, 那么页面默认地实际高度并非一定是页面minHeight;但TextArea控件的默认高度确实是TextArea中指定的minHeight。
2、 数据库中查询的一个时间段为00:11:34
然而查询到了Flex界面却变成24:11:34.Flex的时间格式...
3、 遗留问题:
使用Flex as代码来控制效果?
一个还不错的参考网址: http://www.dnbcw.com/biancheng/flash/lxyn189059.html
另外请参考《Flex3 cookbook》中的特效章节... ...
4、
<s:HGroup width="100%" height="100%">
<mx:Image width="56" height="56" source="@Embed('/assets/images/56/appPlatform.png')" y="20"/>
<s:VGroup width="100%" height="100%" paddingLeft="5" paddingTop="5" paddingRight="5" paddingBottom="5" horizontalAlign="center">
<s:Label width="100%" height="100%" verticalAlign="middle" text="{'应用平台:'+_datacenterProfile.totalApplicationPlatformCount+'个'}"/>
<s:Label width="100%" height="100%" verticalAlign="middle" text="{'当前运行:'+_datacenterProfile.totalRunningApplicationPlatformCount+'个'}"/>
</s:VGroup>
</s:HGroup>
此种布局中指定Image的top属性没用... ...
尝试使用<mx:Spacer>空间, 结果发现其只是左右移动而不能上下移动,spacer是根据其组件的布局来确定是占据纵向的空间还是横向空间的吗?
解决的办法:
<s:VGroup>
<mx:Spacer height="2"/>
<mx:Image width="56" height="56" source="@Embed('/assets/images/56/appPlatform.png')" y="40"/>
</s:VGroup>
注意此Group不设height属性或者属性值大于等于其包含的空间高度之和时, 对每一个TileGroup中元素(采用HGroup布局)右边的那个<V:Group>布局的位置会产生影响, 都会拉长... ...
寻找更好的解决方法中, 上述解决方法并非最佳的,因为空间嵌套得太深对渲染速度是有一定的影响的... ...
5、 如何监听键盘事件
使用KeyboardEvent; 事件类型有:
KeyboardEvent.KEY_DOWN 和 KeyboardEvent.KEY_UP. 可以使用&的方式来监听组合
事件。
6、 控件双击事件无效?(记得指定doubleClickEnabled属性为true)
7、 怎么在TextArea的光标位置插入字符?
<mx:TextArea id="textEditor" x="11" y="366" width="399"/>
private function insertString(insertStr:String):void
{
if (this.textEditor.selectionBeginIndex ==
this.textEditor.selectionEndIndex)
{
var startPart:String=this.textEditor.text.substring(0,
this.textEditor.selectionBeginIndex);
var endPart:String=this.textEditor.text.substring
(this.textEditor.selectionEndIndex, this.textEditor.text.length);
startPart+=insertStr;
startPart+=endPart;
this.textEditor.text=startPart;
}
else
{
this.textEditor.text=insertStr;
}
}
8、实现TextArea等控件时使滚动条始终保持在最下面
txt_content.verticalScrollPosition=txt_content.maxVerticalScrollPosition;
[/size]
分享到:
相关推荐
Flex学习笔记Flex学习笔记Flex学习笔记Flex学习笔记Flex学习笔记
flex布局笔记
flex学习笔记 flex学习笔记 flex学习笔记 flex学习笔记 flex学习笔记 flex学习笔记
没什么好说的 没什么好说的没什么好说的 没什么好说的 没什么好说的没什么好说的
flex,初学者,笔记,资料 flex 初学者 笔记 学习资料
Flex拖拽库Flex拖拽库flex拖拽库
Flex_CookBook_读书笔记(精品) Flex_CookBook_读书笔记(精品)
NULL 博文链接:https://sunshineyao.iteye.com/blog/859188
flex笔记 总结了actionscript在flex这的应用等 想想会有一定的帮助
Flex笔记Flex笔记Flex笔记
详尽的介绍了flex for arcgisserver开发,适合初次接触flex开发的程序员
最近开始学习Flex,其中用到了AS,AS2到AS3发生了很大的变化,完全的面向对象,知道这个特点以后我也一直没有特意的好好去学学AS3,但是随着最近学习的深入,还是有必要学习一下
Flex AS3笔记, 讲解FLEX的组件知识,FLEX与J2EE通讯原理 数据分布产等
Flex的事件机制笔记,是初级的笔记,对应初级的Flex程序员或爱好者有用
NULL 博文链接:https://sunshineyao.iteye.com/blog/815369
Flex入门到提高学习笔记(CHM格式)
关于Flex布局的笔记整理,能够详细理解Flex布局原理和用法,仅供自己学习。
Flex学习笔记1
这是作者自己亲自编写的教程,里面包含的有图解教程,各式jar,及配置文件,全部包含在内,如果你是一个决定学习flex初学者,我敢保证它肯定适合你!带上你走上flex开发旅途!
flex工作流源码