0
동적으로 문자가로드되는 tilelist의 선택한 기호에 대한 행의 선택된 텍스트를 바꿉니다! 기호를 선택한 다음 특정 문자를 다운로드 (바꾸기)하고 다른 문자가 다음 문자로 선택되거나 문자가 선택되지 않은 경우 선택한 문자 수를 결정할 수있는 방법을 모르겠습니다. tsyfry ... 그 다음 메시지 ...문자열의 어떤 문자가 할당되었는지 어떻게 알 수 있습니까?
타일리스트에서 선택한 문자로 바뀝니다. ... 나머지는 어떻게합니까!
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx"
applicationComplete="contactsService.send()"
creationComplete="init()"
layout="absolute" viewSourceURL="srcview/index.html">
<fx:Script>
<![CDATA[
private function replaceSelect(event:MouseEvent):void
{
var obj:Object = lst.selectedItem;
var selStr:int = txt.selectionBeginIndex;
var selEnd:int = txt.selectionEndIndex;
if((lst.selectedItem != null)&&(selStr!=selEnd))
{
txt.text = txt.text.substring(0,selStr)+lst.selectedItem.toString()+txt.text.substring(selEnd,txt.text.length)
}
lst.visible = false;
}
[Bindable]
private var cm:ContextMenu;
private function init():void {
var cmi:ContextMenuItem = new ContextMenuItem("Special Characters", true);
cmi.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, cmSelect);
cm = new ContextMenu();
cm.hideBuiltInItems();
cm.customItems = [cmi];
}
private function cmSelect(evt:ContextMenuEvent):void {
lst.visible = true;
}
]]>
</fx:Script>
<fx:Declarations>
<mx:HTTPService id="contactsService"
resultFormat="e4x"
url="symbols.xml"/>
</fx:Declarations>
<mx:Panel width="508" height="487" x="20" y="20">
<mx:TextInput
id="txt"
text="Test String Flex"
contextMenu="{cm}"
width="303"/>
<mx:TileList
id="lst"
visible="false"
dataProvider="{contactsService.lastResult.symb}"
columnCount="4"
columnWidth="25"
rowCount="3"
rowHeight="25"
verticalScrollPolicy="on"
click="{replaceSelect(event)}"/>
</mx:Panel>
</mx:Application>
나는 완전히 당신이 – Sersh
어떤 부분을 쓴 것을 이해할 수 없다 도움이
희망으로 역사를받을 수 있나요? "역사"와 "실행 취소"작업을 저장하려고합니까? – Imran
아니요, 문자를 선택할 때 기호가로드 될 때 필요합니다. 다른 문자가로드 된 2자를 선택하고 선택하지 않은 경우 하나의 문자가 아닌 경우 ... 메시지 표시 ... 한 문자가 선택되지 않았 음 출신입니다. 러시아에 따르면 설명하기가 어렵습니다. (((( – Sersh