andyhill Posted October 15, 2017 Posted October 15, 2017 I am trying to set a TUnimEdit Font properties in code, please advise how - thanks in advance. procedure TMyForm.UnimFormCreate(Sender: TObject); var ss: TUniStrings; begin ss.Add('{'); ss.Add(' config.style = "color: blue; font-size: 12px;"'); ss.Add('}'); edtPhone.ClientEvents.UniEvents.Ext.field.Text.beforeinit.AddStrings(ss); end;
mhmda Posted October 15, 2017 Posted October 15, 2017 You can to refer to Touch docs: http://docs.sencha.com/touch/2.2.1/#!/api/Ext.field.Text To use it: function beforeInit(sender, config) { config.cls='xxxxx'; config.labelCls='yyyyy'; }
andyhill Posted October 15, 2017 Author Posted October 15, 2017 Yes but how do I do this in code at runtime in Delphi ?
Sherzod Posted October 16, 2017 Posted October 16, 2017 Hi, Yes but how do I do this in code at runtime in Delphi ? For example like this: 1. MainmForm -> OnCreate: procedure TMainmForm.UnimFormCreate(Sender: TObject); begin UnimEdit1.ClientEvents.UniEvents.Values['beforeInit'] := 'function (sender, config) {config.cls="_customCls"}'; end; 2. UniServerModule -> CustomCSS: ._customCls { font-size: 12px; } ._customCls .x-input-el { color: blue; } Best regards, 1
Recommended Posts