Jump to content

Recommended Posts

Hi Fenix,

 

 

It could actually be an "imagelist". Or a button as follows. How can I access these pictures? (fa_phone, fa_photo, ...)

 

https://www.w3schools.com/bootstrap/bootstrap_dropdowns.asp

 

Other question, How to change the icon with code?

 

procedure TFAgent.ACW1Click(Sender: TObject);
begin
btnDurum.ButtonStyles:=bs_warning;//<-- No problem
btnDurum.IconFont:=fa_folder_open;//<-- Don't change
end;
Best regards
Link to comment
Share on other sites

Hi multimesut,

 

 

It could actually be an "imagelist". Or a button as follows. How can I access these pictures? (fa_phone, fa_photo, ...)

This is a font, not a saved image. Reference http://fontawesome.io/

 

Other question, How to change the icon with code?

According to the message I sent you, please update your version.
 
 
Any questions, let me know.
 
Best regards
Link to comment
Share on other sites

Thank you Fenix. I've been trying the following code. Its Work.

swal({
  title: 'Aktarılacak numarayı giriniz',
  input: 'text',
  showCancelButton: true,
  confirmButtonText: 'Aktar',
  cancelButtonText: 'İptal',
  showLoaderOnConfirm: true,
  preConfirm: function (number) {
    return new Promise(function (resolve, reject) {
		if (isNaN(number)) {
			reject('Sadece rakam girebilirsiniz!')
		} else {
			//mycode
			resolve()
		}
    })
  },
  allowOutsideClick: false
}).then(function (number) {
  swal({
    type: 'success',
    title: 'Aktarma İşlemi Başarılı',
    html: 'Aktarılan numara: ' + number
  })
})
Link to comment
Share on other sites

  • 4 weeks later...

Hi Fenix , 

 

Your SFComponents are really looking good to build Unigui App .

I guess you are good at  Bootstrap dealing with Unigui components .

It would be better if you could support  such as a FloatingPanel component with Bootstrap.( i don't know the name  exactly )

 

For example , On desktop , Bootstrap shows all panels as much as it can show as full screen  and

On mobile when it is resizing as smaller size , All panels are re-arranged again and fitted again along with the width of screen size.

 

If you can support it , i will be able to be one of your members . 

 

Best regards,

Link to comment
Share on other sites

  • 2 weeks later...

Hi

 

How can i add other button languages to the SweetAlert. Is there a file which contains
the translation or do i have the edit the UniSFSweetAlert

 

I can change the Portugese value for Yes and No into the value for dutch

but when selecting the language for the component i can choose from

English and Potugese.

 

And is itpossible to make the buttons same size/length

 

Regards Peter

Link to comment
Share on other sites

  • 1 month later...

Hi,

 
We recently bought your components UniSF. It's an issue with it. I try to create TUniSFBitBtn dynamically, but I can't do it.
 
I try to do it with this code:
procedure TMainForm.UniFormCreate(Sender: TObject);
var
  UniSFBitBtn2: TUniSFBitBtn;
begin
  UniSFBitBtn2 := TUniSFBitBtn(InsertControl(TUniSFBitBtn.Create(Self)));

  UniSFBitBtn2.Name := 'UniSFBitBtn2';
  UniSFBitBtn2.Parent := Self;
  UniSFBitBtn2.Left := 64;
  UniSFBitBtn2.Top := 231;
  UniSFBitBtn2.Width := 113;
  UniSFBitBtn2.Height := 121;
  UniSFBitBtn2.Hint := '';
  UniSFBitBtn2.Caption := 'Dr. Mohammad';
  UniSFBitBtn2.TabOrder := 1;
  UniSFBitBtn2.ClientEvents.UniEvents.Add('beforeInit=function(sender, config){ sender.action = '#39'badgetext'#39);
  UniSFBitBtn2.ClientEvents.UniEvents.Add('; sender.plugins = [{  ptype:'#39'badgetext'#39',  defaultText: 0,  disa');
  UniSFBitBtn2.ClientEvents.UniEvents.Add('bleOpacity:1,  disableBg:'#39'red'#39',  align:'#39'right'#39' }];}');
  UniSFBitBtn2.IconAlign := TUniIconAlign.iaTop;
  UniSFBitBtn2.IconFont := fa_lock;
  UniSFBitBtn2.IconFontColor := fc_white;
  UniSFBitBtn2.IconFontSize := fs_48;
  UniSFBitBtn2.ButtonStyles := bs_info;
end;
And my test app doesn't started. I discovered, that problem is with this strings of code:
  UniSFBitBtn2.ClientEvents.UniEvents.Add('beforeInit=function(sender, config){ sender.action = '#39'badgetext'#39);
  UniSFBitBtn2.ClientEvents.UniEvents.Add('; sender.plugins = [{  ptype:'#39'badgetext'#39',  defaultText: 0,  disa');

When i remove they, all starts good, but button shows improperly.

 
If I add button not on main form, app starts. But when test form opened error is shown:
 
Ajax error
 
 O18D=new Ext.window.Window({id:"O18D_id",retfalse:{},onEsc:Ext.emptyFn,layout:"fit",title:"test window",resizable:false,maximizable:false,minimizable:false,uniFMask:{beforeclose:true},width:258,height:258,x:744,y:291});O18D.nm="O18D";_cdo_("UniForm27");UniForm27.ajxS=AjaxSuccess;UniForm27.ajxF=AjaxFailure;O18D.rootObj=true;UniForm27.appRoot="/";_cdo_(null,O18D,"window",UniForm27); O195=new Ext.form.Panel({id:"O195_id",border:false,tabItems:new Ext.util.MixedCollection(),layout:"absolute"});O195.nm="O195";_cdo_(null,O195,"form",UniForm27);O18D.add(O195); O19D= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O18D&Evt=beforeclose&this="+P0.nm+""+_gv_(O195),success:AjaxSuccess,failure:AjaxFailure,obj:O18D,e:"beforeclose"});});O19D.nm="O19D";O18D.on("beforeclose",O19D); O19E= (function(P0){_saf_(P0);return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O18D&Evt=activate&this="+P0.nm+""+_gv_(O195),success:AjaxSuccess,failure:AjaxFailure,obj:O18D,e:"activate"});});O19E.nm="O19E";O18D.on("activate",O19E); O19F= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O18D&Evt=deactivate&this="+P0.nm+""+_gv_(O195),success:AjaxSuccess,failure:AjaxFailure,obj:O18D,e:"deactivate"});});O19F.nm="O19F";O18D.on("deactivate",O19F);O18D.on("deactivate",function(f){_sdf_(f)}); O1A0=new Ext.button.Button({id:"O1A0_id",text:"Dr. Mohammad",beforeinit:function(sender, config){ sender.action = 'badgetext',tabIndex:267,scale:"large",iconAlign:"top",iconCls:"x-uni-btn-icon-top",width:115,height:121,x:8,y:129});O1A0.nm="O1A0";_cdo_("UniSFBitBtn0",O1A0,null,UniForm27);_coxe_(UniForm27,"UniSFBitBtn0","; sender","plugins ", [{  ptype:'badgetext',  defaultText: 0,  disa);_coxe_(UniForm27,"UniSFBitBtn0",null,"",);O195.add(O1A0); O1A4= (function(P0,P1,P2){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O18D&Evt=resize&this="+P0.nm+"&w="+P1+"&h="+P2+""+_gv_(O195),success:AjaxSuccess,failure:AjaxFailure,obj:O18D,e:"resize"});});O1A4.nm="O1A4";O18D.on("resize",O1A4); O1A5= (function(P0,P1,P2){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O18D&Evt=move&this="+P0.nm+"&x="+P1+"&y="+P2+""+_gv_(O195),success:AjaxSuccess,failure:AjaxFailure,obj:O18D,e:"move"});});O1A5.nm="O1A5";O18D.on("move",O1A5); O1A6= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O18D&Evt=maximize&this="+P0.nm+""+_gv_(O195),success:AjaxSuccess,failure:AjaxFailure,obj:O18D,e:"maximize"});});O1A6.nm="O1A6";O18D.on("maximize",O1A6); O1A7= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O18D&Evt=minimize&this="+P0.nm+""+_gv_(O195),success:AjaxSuccess,failure:AjaxFailure,obj:O18D,e:"minimize"});});O1A7.nm="O1A7";O18D.on("minimize",O1A7); O1A8= (function(P0){return Ext.Ajax.request({url:"/HandleEvent",params:"Ajax=1&IsEvent=1&Obj=O18D&Evt=restore&this="+P0.nm+""+_gv_(O195),success:AjaxSuccess,failure:AjaxFailure,obj:O18D,e:"restore"});});O1A8.nm="O1A8";O18D.on("restore",O1A8);O18D.show("");O18D.retfalse.beforeclose=1;_axy_(O18D);O18D.uniMask={ldMask:false,maskWaitData:false,maskUseMsg:true};O18D.uniMask.targetObj=null;O1A0.addToTab(2670);
 
And form doesn't opens. The reason is same - two strings.
 
Is it possible to fix this issue? Thank you.
Link to comment
Share on other sites

Hello, You can test;

procedure TMainForm.UniFormCreate(Sender: TObject);
var
  UniSFBitBtn2: TUniSFBitBtn;
  x: String;
begin
  UniSFBitBtn2 := TUniSFBitBtn(InsertControl(TUniSFBitBtn.Create(Self)));

  UniSFBitBtn2.Name := 'UniSFBitBtn2';
  UniSFBitBtn2.Parent := Self;
  UniSFBitBtn2.Left := 64;
  UniSFBitBtn2.Top := 231;
  UniSFBitBtn2.Width := 113;
  UniSFBitBtn2.Height := 121;
  UniSFBitBtn2.Hint := '';
  UniSFBitBtn2.Caption := 'Dr. Mohammad';
  UniSFBitBtn2.TabOrder := 1;
  x:='sender.action = '#39'badgetext'#39';';
  x:=x+'sender.plugins = [{  ptype:'#39'badgetext'#39',  defaultText: 0,  disableOpacity:1,';
  x:=x+'disableBg:'#39'red'#39',  align:'#39'right'#39' }];';
  UniSFBitBtn2.JSInterface.JSAddListener('beforeInit', UniSFBitBtn2.JSInterface.JSFunction('sender, config', x));
  //UniSFBitBtn2.ClientEvents.UniEvents.Add('beforeInit=function(sender, config){ sender.action = '#39'badgetext'#39);
  //UniSFBitBtn2.ClientEvents.UniEvents.Add('; sender.plugins = [{  ptype:'#39'badgetext'#39',  defaultText: 0,  disa');
  //UniSFBitBtn2.ClientEvents.UniEvents.Add('bleOpacity:1,  disableBg:'#39'red'#39',  align:'#39'right'#39' }];}');
  UniSFBitBtn2.IconAlign := TUniIconAlign.iaTop;
  UniSFBitBtn2.IconFont := fa_lock;
  UniSFBitBtn2.IconFontColor := fc_white;
  UniSFBitBtn2.IconFontSize := fs_48;
  UniSFBitBtn2.ButtonStyles := bs_info;
end;
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...