nimarufa Posted November 6, 2018 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
Sherzod Posted November 7, 2018 Posted November 7, 2018 Hi, Can you make a simple testcase for this ?! Quote
Sherzod Posted November 8, 2018 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
nimarufa Posted November 8, 2018 Author Posted November 8, 2018 Yes, this workaround works! Thanks! Hope painted event will act like afterlayout. Quote
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.