David Oliveira Posted May 23, 2014 Share Posted May 23, 2014 Problem to set UniEvents runtime, example: procedure TFmeCadastroMestre.UniFormCreate(Sender: TObject); ... uniGUIClientEvents.TUniClientEvents(EdtCodigo.ClientEvents).UniEvents.Add('afterrender=function afterrender(sender, eOpts)'); uniGUIClientEvents.TUniClientEvents(EdtCodigo.ClientEvents).UniEvents.Add('{'); uniGUIClientEvents.TUniClientEvents(EdtCodigo.ClientEvents).UniEvents.Add(' sender.emptyText = "123";'); uniGUIClientEvents.TUniClientEvents(EdtCodigo.ClientEvents).UniEvents.Add('}'); or EdtCodigo.ClientEvents.UniEvents.Text := 'afterrender=function afterrender(sender, eOpts)'#13#10'{'#13#10' sender.e' + 'mptyText = "123";'#13#10'}'; ... end; Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted May 23, 2014 Administrators Share Posted May 23, 2014 EdtCodigo.ClientEvents.ExtEvents.add('afterrender=function afterrender(sender, eOpts) { }'); Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted May 23, 2014 Administrators Share Posted May 23, 2014 Or EdtCodigo.ClientEvents.ExtEvents.Values['afterrender']:='function(sender, eOpts) { }'); Quote Link to comment Share on other sites More sharing options...
Administrators Farshad Mohajeri Posted May 23, 2014 Administrators Share Posted May 23, 2014 procedure TMainForm.UniFormCreate(Sender: TObject); begin UniButton1.ClientEvents.ExtEvents.Values['click']:='function(sender){alert("Click")}'; UniEdit1.ClientEvents.ExtEvents.Values['change']:='function(sender, newValue){MainForm.UniEdit2.setValue(newValue)}'; Self.ClientEvents.ExtEvents.Values['form.click']:='function(sender){MainForm.UniEdit2.setValue("form.click")}'; Self.ClientEvents.ExtEvents.Values['window.move']:='function(sender){MainForm.UniEdit2.setValue("window.move")}'; end; Quote Link to comment Share on other sites More sharing options...
David Oliveira Posted May 23, 2014 Author Share Posted May 23, 2014 procedure TMainForm.UniFormCreate(Sender: TObject); begin UniButton1.ClientEvents.ExtEvents.Values['click']:='function(sender){alert("Click")}'; UniEdit1.ClientEvents.ExtEvents.Values['change']:='function(sender, newValue){MainForm.UniEdit2.setValue(newValue)}'; Self.ClientEvents.ExtEvents.Values['form.click']:='function(sender){MainForm.UniEdit2.setValue("form.click")}'; Self.ClientEvents.ExtEvents.Values['window.move']:='function(sender){MainForm.UniEdit2.setValue("window.move")}'; end; great trick brow.... gracias! 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.