Jump to content

Recommended Posts

Posted

Hi,

 

Try this solution:

 

MainmForm -> ClientEvents -> UniEvents [Ext.Container[window]] add window.afterCreate fn:

function window.afterCreate(sender)
{
  sender.element.on("swipe",
    function(e){
      // your logic
      alert("onSwipe")
    }
  )
}

* function(e)... e = Ext.event.Touch

 

Best regards.

Posted

Hello,

I found how to catch direction of the swipe but I can not to find how to close current form in the script.

Hide method works but I need close. Have you any ideas?

function window.afterCreate(sender)

{

 

  sender.element.on("swipe",

    function(e){

      if(e.direction=='right')  {

      alert("onSwipeRight");         

      window.Close();

      }

      if(e.direction=='left')  {

      alert("onSwipeLeft")

      }

 

    }

  )

}

Posted

if I understand you correctly, try:

 

for example, for UnimForm3:

function window.afterCreate(sender)
{
  sender.element.on("swipe",
    function(e){
      ajaxRequest(sender, '_close', [])
    }
  )
}
procedure TUnimForm3.UnimFormAjaxEvent(Sender: TComponent; EventName: string;
  Params: TStrings);
begin
  if EventName = '_close' then
  begin
    Close;
  end;
end;

Best regards.

  • Like 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...