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.![]()
Professional Software Development Tools
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.![]()
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.
Yes, normal close the DialogEX, but if i am in the Richtext box and press esc the dialogex box hang and doesnt close.
Hello,
Here ist the Problem. Exists a hint to bypass the ESC key?
My Project - Richtex on DialogEx.apz
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.
OK,
My last sol. was not very good. If KeyLock Escape set to false, it disabled complet the System.
My current solution is:
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'.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
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