AHilberink Well-Known Member Licensed User Longtime User Sep 13, 2019 #1 Hi, I want to use ProgressDialogShow during Panel.LoadLayout, but it seems not possible. Do I overlook something or is this a correct behaviour? The Layout file is big and takes time to load. Code: Copy ProgressDialogShow pnlWeek.LoadLayout("Week") ProgressDialogHide pnlWeek is part of TabStrip. Best regards, André
Hi, I want to use ProgressDialogShow during Panel.LoadLayout, but it seems not possible. Do I overlook something or is this a correct behaviour? The Layout file is big and takes time to load. Code: Copy ProgressDialogShow pnlWeek.LoadLayout("Week") ProgressDialogHide pnlWeek is part of TabStrip. Best regards, André
DonManfred Expert Licensed User Longtime User Sep 13, 2019 #2 Code: Copy ProgressDialogShow sleep(250) pnlWeek.LoadLayout("Week") ' It only take milliseconds... Doung a ProgressDialogShow here is a mistake. ProgressDialogHide sleep(250) Upvote 0
Code: Copy ProgressDialogShow sleep(250) pnlWeek.LoadLayout("Week") ' It only take milliseconds... Doung a ProgressDialogShow here is a mistake. ProgressDialogHide sleep(250)
AHilberink Well-Known Member Licensed User Longtime User Sep 13, 2019 #3 DonManfred said: Code: Copy ProgressDialogShow sleep(250) pnlWeek.LoadLayout("Week") ' It only take milliseconds... Doung a ProgressDialogShow here is a mistake. ProgressDialogHide sleep(250) Click to expand... Hi DonManfred, I understand your It only take milliseconds... Doung a ProgressDialogShow here is a mistake. If the load takes milliseconds, there is no time to Show, before the Hide is executed. I understand. My load takes about 10-15 seconds and starts by pressing a button. My users now press twice or more, because it looks nothing happening. I test with your code and Yes it is showing now, but during the LoadLayout the ProgressDialog is freezing. Strange. Now I have lost of more milliseconds because of the sleep. Anyway, now it works. Thank you for helping. Best regards, André Upvote 0
DonManfred said: Code: Copy ProgressDialogShow sleep(250) pnlWeek.LoadLayout("Week") ' It only take milliseconds... Doung a ProgressDialogShow here is a mistake. ProgressDialogHide sleep(250) Click to expand... Hi DonManfred, I understand your It only take milliseconds... Doung a ProgressDialogShow here is a mistake. If the load takes milliseconds, there is no time to Show, before the Hide is executed. I understand. My load takes about 10-15 seconds and starts by pressing a button. My users now press twice or more, because it looks nothing happening. I test with your code and Yes it is showing now, but during the LoadLayout the ProgressDialog is freezing. Strange. Now I have lost of more milliseconds because of the sleep. Anyway, now it works. Thank you for helping. Best regards, André
DonManfred Expert Licensed User Longtime User Sep 13, 2019 #4 AHilberink said: My load takes about 10-15 seconds Click to expand... I´m pretty sure it is NOT the LoadLayout which took this time Upvote 0
AHilberink said: My load takes about 10-15 seconds Click to expand... I´m pretty sure it is NOT the LoadLayout which took this time
AHilberink Well-Known Member Licensed User Longtime User Sep 13, 2019 #5 DonManfred said: I´m pretty sure it is NOT the LoadLayout which took this time Click to expand... I test it with this code: Code: Copy Log(DateTime.Time(DateTime.Now)) pnlWeek.LoadLayout("Week") Log(DateTime.Time(DateTime.Now)) Maybe something to do with my Samsung Tab A? I discover that a Sleep(15) also does the job, so thanks again for your help. Upvote 0
DonManfred said: I´m pretty sure it is NOT the LoadLayout which took this time Click to expand... I test it with this code: Code: Copy Log(DateTime.Time(DateTime.Now)) pnlWeek.LoadLayout("Week") Log(DateTime.Time(DateTime.Now)) Maybe something to do with my Samsung Tab A? I discover that a Sleep(15) also does the job, so thanks again for your help.
DonManfred Expert Licensed User Longtime User Sep 13, 2019 #6 AHilberink said: I test it with this code Click to expand... hiding the resulting timedifference is of no help Upvote 0
AHilberink said: I test it with this code Click to expand... hiding the resulting timedifference is of no help
JohnC Expert Licensed User Longtime User Sep 13, 2019 #7 Maybe one of these two methods might work: Code: Copy Sub Activity_Resume ProgressDialogHide End Sub or this... Code: Copy Sub Activity_Create(FirstTime As Boolean) .... (your code) .... (your code) CallSubDelayed(Me,"HideProgress") 'place this as last line in Activity_Create Call Sub Sub HideProgress() ProgressDialogHide End Sub Upvote 0
Maybe one of these two methods might work: Code: Copy Sub Activity_Resume ProgressDialogHide End Sub or this... Code: Copy Sub Activity_Create(FirstTime As Boolean) .... (your code) .... (your code) CallSubDelayed(Me,"HideProgress") 'place this as last line in Activity_Create Call Sub Sub HideProgress() ProgressDialogHide End Sub