nimarufa Posted November 6, 2018 Share Posted November 6, 2018 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. Link to comment Share on other sites More sharing options...
Sherzod Posted November 7, 2018 Share Posted November 7, 2018 Hi, Can you make a simple testcase for this ?! Link to comment Share on other sites More sharing options...
nimarufa Posted November 8, 2018 Author Share Posted November 8, 2018 Here is it FrameEventTest.zip Link to comment Share on other sites More sharing options...
Sherzod Posted November 8, 2018 Share Posted November 8, 2018 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; Link to comment Share on other sites More sharing options...
nimarufa Posted November 8, 2018 Author Share Posted November 8, 2018 Yes, this workaround works! Thanks! Hope painted event will act like afterlayout. Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now