Andromo - Start Making Apps - Free Signup

Announcement

Collapse

New Forum Software

If you're here, you've found the new home for our forums. There will be some bugs to iron out, so thanks for your patience...
See more
See less

Richtext in DialogEx Withg Key ESC

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Richtext in DialogEx Withg Key ESC

    hello,

    I have a Richtext Window on a DialogEX Screen. If Richtext is focused (the cursor is in) and press Escape the DialogEx Screen hangs. No objects in the DialogEx Screen can't select.

  • #2
    ESC closes the dialog: this is the standard behavior of Windows dialog boxes, not AMS.

    What's wrong?
    We are slowly invading your planet to teach lazy humans to read the user manual.
    But don't be scared: we are here to help.

    Comment


    • #3
      Yes, normal close the DialogEX, but if i am in the Richtext box and press esc the dialogex box hang and doesnt close.

      Comment


      • #4
        We'll look into the issue you described.
        REF: AMS-556
        Darryl
        Indigo Rose Corporation

        Product Guides: AMS80 | SUF9 | TU30 | VP30 |MSIFACT |DeltaMAX

        Comment


        • #5
          Hello,

          Here ist the Problem. Exists a hint to bypass the ESC key?

          My Project - Richtex on DialogEx.apz

          Comment


          • #6
            Ah ou.. the Plugin helped me out.
            KeyLock.EnableKey(27, false); on DialogEx event Preload.
            If Richtext Focused and the Cursor is in the rtfbox and press ESC. DialogEX Window works normal.

            Comment


            • #7
              Originally posted by Kier View Post
              Ah ou.. the Plugin helped me out.
              KeyLock.EnableKey(27, false); on DialogEx event Preload.
              If Richtext Focused and the Cursor is in the rtfbox and press ESC. DialogEX Window works normal.
              Mean http://www.indigorose.com/forums/thr...hlight=keylock

              Comment


              • #8
                OK,
                My last sol. was not very good. If KeyLock Escape set to false, it disabled complet the System.

                My current solution is:
                Code:
                - On every Dialog Box where i have set a Richtext object, created a input object named 'ECS_Fake' (size2x2 pixel, using color from back and the same for front)
                - Dialog Box event 'preload'
                
                	RTFCode_Posn = RichText.GetPos("RichText1");
                	RTFCode_Size = RichText.GetSize("RichText1");
                
                - Dialog Box even 'on Mouse Move' 
                Disable_Enable_EscKey("RichText1",RTFCode_Posn,RTFCode_Size);
                
                - In the 'Global Functions'
                
                function Disable_Enable_EscKey(oFocus,RTFCode_Posn,RTFCode_Size)
                	local esc = KeyLock.IsKeyEnabled(27);
                	
                	if (e_X>=RTFCode_Posn.X) and (e_X<=RTFCode_Posn.X+RTFCode_Size.Width) and (e_Y>=RTFCode_Posn.Y) and (e_Y<=RTFCode_Posn.Y+RTFCode_Size.Height) then
                		if (esc==true) then -- Disable ESC Key ,we are in the RichText
                			KeyLock.EnableKey(27, false);
                			DialogEx.SetFocus(oFocus)
                			Input.SetProperties("ESC_Fake", {Enabled=false,Visible=false})
                		end
                	else
                		if (esc==false) then -- Enable ESC Key
                			KeyLock.EnableKey(27, true);
                			Input.SetProperties("ESC_Fake", {Enabled=true,Visible=true})
                			DialogEx.SetFocus("ESC_Fake")
                			Input.SetProperties("ESC_Fake", {Enabled=false,Visible=false})	
                		end
                	end
                end
                It disabled now the esc key if the mouse over the Richtext Object is and if the Mouse outside from Richtext Enabled the ESC Key and at the same time Focused the Input Object 'ESC_Fake'.

                Comment


                • #9
                  Change to and edit
                  if (e_X>=RTFCode_Posn.X-1) and (e_X<=RTFCode_Posn.X+RTFCode_Size.Width) and (e_Y>=RTFCode_Posn.Y-2) and (e_Y<=RTFCode_Posn.Y+RTFCode_Size.Height) then

                  Comment

                  Working...
                  X