Jump to content

Recommended Posts

Posted
unimForm1.ShowToast('bla-bla-bla')

How do I change the time?

The message is displayed for a very short time :(

Posted

I just make proposoal to future ,

but in my real application I make a function and use her like that: UniSession.AddJs (Ext.toast('Message Text!', 'Caption of toast', 'duration'););

and I call her when I need her.

Posted

In the mobile version, the window does not close and hangs all the time

 

procedure ShowToastMy(const Title, Text: string; iDuration: integer = 5000);
begin
  UniSession.AddJs('Ext.toast(' + QuotedStr(Text) +  ', ' + QuotedStr(Title) + ', ' + iDuration.ToString + ');');
end;


ShowToastMy('Title', 'Text');

 

Screenshot_25.jpg

Posted
51 minutes ago, x11 said:

In the mobile version, the window does not close and hangs all the time

 





procedure ShowToastMy(const Title, Text: string; iDuration: integer = 5000);
begin
  UniSession.AddJs('Ext.toast(' + QuotedStr(Text) +  ', ' + QuotedStr(Title) + ', ' + iDuration.ToString + ');');
end;


ShowToastMy('Title', 'Text');

 

Screenshot_25.jpg

try with smaller duration and try without QuotedStr.

I use unigui with Android application (using WebView) and all Toast work corect.

Try out and this examples: https://docs.sencha.com/extjs/6.5.0/modern/Ext.Toast.html

and :

var t = Ext.create('Ext.Toast',{cls: 'mytoast',timeout: 2000});
t.show({message: 'foo'});

May be You need to add ',timeout: YourDuration'

UniSession.AddJs('Ext.toast(' + QuotedStr(Text) +  ', ' + QuotedStr(Title) + ', timeout:' + iDuration.ToString + ');');

Posted
2 hours ago, irigsoft said:

UniSession.AddJs('Ext.toast({message:' + QuotedStr(Text) + ', timeout:' + iDuration.ToString + '});');

thank you very match

it is works

 

It would be nice if the developers add the Duration parameter to unimForm1.ShowToast()

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...