自拍偷在线精品自拍偷,亚洲欧美中文日韩v在线观看不卡

Flex開發(fā)過程中常見問題解答

開發(fā) 后端
Flex開發(fā)有很多值得學(xué)習(xí)的地方,本文向大家簡(jiǎn)單介紹一下Flex開發(fā)過程中遇到的一些問題及解決方法,相信本文介紹對(duì)你的學(xué)習(xí)一定會(huì)有所幫助。

本文和大家重點(diǎn)討論一下Flex組件開發(fā)總結(jié),在平時(shí)的Flex開發(fā)過程中遇到的問題以及解決辦法總結(jié)如下,希望本文的介紹能讓你有所收獲。

Flex組件開發(fā)總結(jié)

在平時(shí)的Flex開發(fā)過程中遇到的問題以及解決辦法總結(jié)如下:

1.Flex開發(fā)過程中如何監(jiān)聽鍵盤事件?

代碼說明:有兩種類型的鍵盤事件:KeyboardEvent.KEY_DOWN和KeyboardEvent.KEY_UP
以上是監(jiān)聽的是回車事件
要是想監(jiān)聽組合鍵,例如:Ctrl+Enter鍵,代碼如下:
 

  1. if(evt.keyCode==13&&evt.ctrlKey){  

2.Flex開發(fā)過程中怎么控制RichTextEditor的控制欄?

利用showControlBar屬性,控制RichTextEditor的控制欄,這樣把整個(gè)控制欄都關(guān)閉了
要是想分別控制控制欄中各寄宿控件,可以參考如下代碼:
 

  1. this.textEditor.alignButtons.height=0;  
  2. this.textEditor.alignButtons.visible=false;  
  3. this.textEditor.bulletButton.height=0;  
  4. this.textEditor.bulletButton.visible=false;  
  5. this.textEditor.linkTextInput.height=0;  
  6. this.textEditor.linkTextInput.visible=false;  
  7. this.textEditor._RichTextEditor_VRule1.height=0;  
  8. this.textEditor._RichTextEditor_VRule1.visible=false;  
  9. this.textEditor._RichTextEditor_VRule2.height=0;  
  10. this.textEditor._RichTextEditor_VRule2.visible=false

3.Flex開發(fā)過程中控件雙擊事件(DoubleClickEvent)怎么沒反應(yīng)?

  1. <mx:ButtondoubleClickEnabledmx:ButtondoubleClickEnabled="true"doubleClick="doubleClickHandler(event)"x="48"y="32"label="Button"/> 
  2. privatefunctiondoubleClickHandler(evt:MouseEvent):void  
  3. {  
  4. Alert.show("doubleClick");  

代碼說明:
doubleClickEnabled屬性:指定對(duì)象是否接收doubleClick事件。默認(rèn)值為false,這意味著在默認(rèn)情況下,不接收doubleClick事件。如果將doubleClickEnabled屬性設(shè)置為true,實(shí)例在其范圍內(nèi)接收doubleClick事件

4.Flex開發(fā)過程中怎么在TextArea的光標(biāo)位置插入字符?

  1. <mx:TextAreaidmx:TextAreaid="textEditor"x="11"y="366"width="399"/> 
  2. privatefunctioninsertString(insertStr:String):void  
  3. {  
  4. if(this.textEditor.selectionBeginIndex==this.textEditor.  
  5. selectionEndIndex)  
  6. {  
  7. varstartPart:String=this.textEditor.text.substring(0,this.textEditor.selectionBeginIndex);  
  8. varendPart:String=this.textEditor.text.substring(this.textEditor.selectionEndIndex,this.textEditor.text.  
  9. length);  
  10. startPart+=insertStr;  
  11. startPart+=endPart;  
  12. this.textEditor.text=startPart;  
  13. }  
  14. else  
  15. {  
  16. this.textEditor.text=insertStr;  
  17. }  

5.Flex開發(fā)過程中實(shí)現(xiàn)TextArea控件的滾動(dòng)條始終保持在最下面?

代碼說明:這段代碼是為了實(shí)現(xiàn)TextArea控件的滾動(dòng)條始終保持在最下面,以方便用戶查看聊天信息
要是VBox控件需要實(shí)現(xiàn)類似效果,可以看如下代碼:
 

  1. <mx:VBoxidmx:VBoxid="vd"updateComplete="updateCompleteHandler(event)"x="10"y="10"width="399"height="348"> 
  2. privatefunctionupdateCompleteHandler(evt:FlexEvent):void  
  3. {  
  4. thisthis.vd.verticalScrollPosition=this.vd.  
  5. maxVerticalScrollPosition;  
  6. }  
  7.  
  8. this.txt_content.addEventListener(FlexEvent.VALUE_COMMIT,VALUE_COMMITHandler);  
  9. privatefunctionVALUE_COMMITHandler(evt:FlexEvent):void{  
  10. txt_contenttxt_content.verticalScrollPosition=txt_content.  
  11. maxVerticalScrollPosition;  
  12. }  

【編輯推薦】

  1. 解析如何使用Flex開發(fā)DataGrid分頁控件
  2. FlexBuilder4十大新特性閃亮登場(chǎng)
  3. Flex開發(fā)者需要知道的哪點(diǎn)事
  4. 經(jīng)驗(yàn)總結(jié) Flex開發(fā)時(shí)需要注意的幾個(gè)問題
  5. 技術(shù)分享 在Flex中嵌入Flex字體的步驟

 

責(zé)任編輯:佚名 來源: csdn.net
相關(guān)推薦

2010-05-12 17:04:20

BlackBerry開

2010-04-06 17:26:26

Windows Pho

2010-07-28 11:25:08

Flex滾動(dòng)條

2010-09-13 14:43:47

無線技術(shù)常見問題

2023-10-10 08:01:13

2009-10-13 14:56:00

CCNA培訓(xùn)

2011-07-13 17:57:15

SQLite

2011-08-09 15:10:00

SQLite

2020-11-10 23:06:38

物聯(lián)網(wǎng)智能產(chǎn)品開發(fā)IOT

2010-12-27 14:50:16

Windows 部署服

2011-08-31 16:06:50

LuaWeb開發(fā)

2011-07-21 11:19:51

JAVA

2015-06-30 12:39:33

公有云問題解答

2025-03-28 10:19:06

2013-05-23 09:49:49

Chrome for google

2017-06-12 15:51:11

數(shù)據(jù)中心布線運(yùn)維

2013-03-04 13:58:10

2011-05-10 15:30:22

SEO

2010-08-27 10:29:17

DB2數(shù)據(jù)庫開發(fā)

2023-10-11 10:38:53

智能衛(wèi)生間物聯(lián)網(wǎng)
點(diǎn)贊
收藏

51CTO技術(shù)棧公眾號(hào)