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. Quote 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 ?! Quote 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 Quote 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; Quote 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. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.