Jump to content

Recommended Posts

Posted

When i place Frame on mobile form clientEvents are not working. For Example Ext.panel.Panel afterlayout event.

for example 

function afterlayout(sender, layout, eOpts)
{
	alert('AF event!');
}

Frame is creating like this 

procedure TMainmForm.UnimFormCreate(Sender: TObject);
begin
  CFrame := TMymFrame.Create(self);
  CFrame.Visible := true;
  CFrame.Parent := self;
end;

On desktop form events are working.

Posted

Can you check this approach ?:

procedure TMymFrame.UniFrameCreate(Sender: TObject);
begin
  if not UniSession.IsMobile then
    ClientEvents.ExtEvents.Add(
      'afterlayout=function afterlayout(sender, layout, eOpts)'+
      '{'+
      '	alert(''Frame event (desktop)!'');'+
      '}'
    )
  else
    ClientEvents.ExtEvents.Add(
      'painted=function painted(sender, element, eOpts)'+
      '{'+
      '	alert(''Frame event (mobile)!'');'+
      '}'
    );
end;

 

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...