Indigo Rose Software

Professional Software Development Tools

 
+ Reply to Thread
Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2006
    Posts
    29

    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. #2
    Join Date
    Feb 2007
    Location
    Como, Italy
    Posts
    1,623
    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.

  3. #3
    Join Date
    Feb 2006
    Posts
    29
    Yes, normal close the DialogEX, but if i am in the Richtext box and press esc the dialogex box hang and doesnt close.

  4. #4
    Join Date
    Jul 2001
    Location
    Indigo Rose Software
    Posts
    1,856
    We'll look into the issue you described.
    REF: AMS-556
    Darryl
    Indigo Rose Corporation

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

  5. #5
    Join Date
    Feb 2006
    Posts
    29
    Hello,

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

    My Project - Richtex on DialogEx.apz

  6. #6
    Join Date
    Feb 2006
    Posts
    29
    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.

  7. #7
    Join Date
    Feb 2006
    Posts
    29
    Quote 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

  8. #8
    Join Date
    Feb 2006
    Posts
    29
    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'.

  9. #9
    Join Date
    Feb 2006
    Posts
    29
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts