x11 Posted November 6, 2020 Posted November 6, 2020 unimForm1.ShowToast('bla-bla-bla') How do I change the time? The message is displayed for a very short time Quote
irigsoft Posted November 7, 2020 Posted November 7, 2020 If possible, add a title too, please. like that: Ext.toast('Message Text!', 'Caption of toast', 'duration'); 1 Quote
irigsoft Posted November 7, 2020 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. Quote
x11 Posted November 7, 2020 Author 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'); Quote
irigsoft Posted November 7, 2020 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 + ');'); Quote
irigsoft Posted November 7, 2020 Posted November 7, 2020 I think correct way is: UniSession.AddJs('Ext.toast({message:' + QuotedStr(Text) + ', timeout:' + iDuration.ToString + '});'); 1 Quote
x11 Posted November 7, 2020 Author 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() Quote
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.