0
메뉴를 열면 Menu 아래의 Textinputs를 터치 할 수 없게하고 싶습니다.목록에서 캡쳐 입력으로 Textinput을 방지하는 방법
네비게이터에 세 개의 Textinput이 있습니다. 메뉴 (목록)를 열면이 Textinput을 지울 수 있습니다.
navigator.enable = false로 설정하면 Textinput과 Menu의 겹쳐진 영역을 잡아 당기면 Textinput은 hightlight가되지만 메뉴는 이벤트를 가져 오지 않습니다.
내 코드는 다음과 같습니다 :
test.mxml
<?xml version="1.0" encoding="utf-8"?>
<s:View xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark">
<s:Scroller id="scroller" width="100%" height="100%">
<s:VGroup width="100%" height="100%">
<s:VGroup width="100%">
<s:HGroup width="100%">
<s:Label width="200" text="IP(*)"/>
<s:TextInput id="txtIP" width="100%"/>
</s:HGroup>
<s:HGroup width="100%">
<s:Label width="200" text="Username(*)"/>
<s:TextInput id="txtUsr" width="100%"/>
</s:HGroup>
<s:HGroup width="100%">
<s:Label width="200" text="Password"/>
<s:TextInput id="txtPwd" width="100%"/>
</s:HGroup>
</s:VGroup>
<s:Spacer width="100%" height="70%"/>
</s:VGroup>
</s:Scroller>
</s:View>
가 대단히 감사합니다
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
applicationComplete="init()" applicationDPI="320">
<fx:Declarations>
<s:Move id="moveIn" duration="200" target="{lateralMenu}" xTo="0"/>
<s:Move id="moveOut" duration="200" target="{lateralMenu}" xTo="{_currentStageWidth - 500}"/>
</fx:Declarations>
<fx:Script>
<![CDATA[
import mx.events.FlexEvent;
import spark.events.IndexChangeEvent;
import spark.transitions.CrossFadeViewTransition;
private var _isMenuOpen:Boolean;
[Bindable]
private var _currentStageWidth:Number;
[Bindable]
private var _currentStageHeight:Number;
[Bindable]
private var _logined:Boolean=false;
public function get logined():Boolean { return _logined; }
public function set logined(logined:Boolean):void { _logined=logined; }
private function _onbtnHeaderMenu_ClickHandler(event:MouseEvent):void
{
_showMainMenu();
}
private function _menuBackground_ClickHandler(event:MouseEvent):void
{
_isMenuOpen = false;
moveOut.play();
navigator.enabled=true;
}
public function init():void
{
navigator.defaultPushTransition = new CrossFadeViewTransition();
navigator.defaultPopTransition = new CrossFadeViewTransition();
_currentStageWidth = stage.stageWidth*-1;
lateralMenu.x = _currentStageWidth - 500;
_currentStageHeight = navigator.height - 90;
lateralMenu.height = _currentStageHeight;
_isMenuOpen = false;
}
private function _showMainMenu() : void
{
if(_isMenuOpen == true)
{
moveOut.play();
_isMenuOpen = false;
navigator.enabled=true;
}
else if(_isMenuOpen == false)
{
moveIn.play();
_isMenuOpen = true;
navigator.enabled=false;
}
}
protected function componentsList_changeHandler(event:IndexChangeEvent):void
{
moveOut.play();
_isMenuOpen = false;
navigator.enabled=true;
}
]]>
</fx:Script>
<s:ViewNavigator id="navigator" width="100%" height="100%" firstView="LoginView">
<s:navigationContent>
<s:Button id="btnHeaderMenu" height="90" click="_onbtnHeaderMenu_ClickHandler(event)"/>
<s:Label id="lblHead" width="100%" height="90"
click="_onbtnHeaderMenu_ClickHandler(event)" color="#f7f8f8"
fontFamily="NunitoBold" fontSize="36" paddingLeft="150" text="login"
typographicCase="uppercase" verticalAlign="middle" verticalCenter="0"/>
</s:navigationContent>
</s:ViewNavigator>
<s:Group id="lateralMenu" y="90" width="100%" height="100%">
<s:List id="componentsList" width="500" height="100%" alpha="0.7"
change="componentsList_changeHandler(event)" contentBackgroundAlpha="0.5"
labelField="text">
<s:ArrayCollection id="listMenu">
<fx:Object text="LANGUAGE"/>
<fx:Object text="HOME"/>
<fx:Object text="WOW"/>
<fx:Object text="QUIT"/>
</s:ArrayCollection>
</s:List>
</s:Group>
</s:Application>
LoginView.mxml.