Uploaded image for project: 'Apache Flex'
  1. Apache Flex
  2. FLEX-33570

when I press a key to pop up a new window, how to forbid inputting into the edit control in the new window?

    XMLWordPrintableJSON

Details

    • Question
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • Adobe Flex SDK 3.2 (Release)
    • None
    • mx: TitleWindow
    • None
    • IE

    Description

      Hello,
      I press a key like "A" as shortcut to pop up a new window with an input control and meantime set focus to the input control. After the new window pop up, the input control would show a "A" on it.
      The code is as below:
      private var dialog:Dialog=new Dialog();

      private function OnKeyDown(event:KeyboardEvent):void
      {
      if (event.ctrlKey)

      { if(event.keyCode == 70) Show(); }

      }

      private function Show():void

      { PopUpManager.addPopUp(dialog, this, false); dialog.FindText.setFocus(); }

      </mx:Script>

      <mx:Form x="57" y="43" width="616" height="363" backgroundColor="#52EE9F">
      <mx:TextArea id="textArea" keyDown="OnKeyDown(event);" width="584" height="327"/>
      </mx:Form>

      I am looking forward to your reply. Thank you.

      Attachments

        1. focus ont on the new window.jpg
          7 kB
          Aaron
        2. Hello4.rar
          943 kB
          Aaron
        3. HelloFlex.rar
          934 kB
          Aaron

        Activity

          People

            aharui Alex Harui
            aofeng1 Aaron
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: