x11 Posted November 6, 2020 Share Posted November 6, 2020 unimForm1.ShowToast('bla-bla-bla') How do I change the time? The message is displayed for a very short time Link to comment Share on other sites More sharing options...
irigsoft Posted November 7, 2020 Share Posted November 7, 2020 If possible, add a title too, please. like that: Ext.toast('Message Text!', 'Caption of toast', 'duration'); 1 Link to comment Share on other sites More sharing options...
x11 Posted November 7, 2020 Author Share Posted November 7, 2020 how it use Link to comment Share on other sites More sharing options...
irigsoft Posted November 7, 2020 Share Posted November 7, 2020 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. Link to comment Share on other sites More sharing options...
x11 Posted November 7, 2020 Author Share Posted November 7, 2020 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'); Link to comment Share on other sites More sharing options...
irigsoft Posted November 7, 2020 Share Posted November 7, 2020 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'); 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 + ');'); Link to comment Share on other sites More sharing options...
irigsoft Posted November 7, 2020 Share Posted November 7, 2020 I think correct way is: UniSession.AddJs('Ext.toast({message:' + QuotedStr(Text) + ', timeout:' + iDuration.ToString + '});'); 1 Link to comment Share on other sites More sharing options...
Sherzod Posted November 7, 2020 Share Posted November 7, 2020 Link to comment Share on other sites More sharing options...
x11 Posted November 7, 2020 Author Share Posted November 7, 2020 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() Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now