marcick Well-Known Member Licensed User Longtime User Mar 16, 2023 #1 running a code like this B4X: Expand Collapse Copy For RecordPointer=0 To ExportList.Size-1 If RecordPointer>xx Then hd.ProgressDialogShow("exporting " & Floor(100*RecordPointer/ExportList.Size) & "%") Sleep(0) xx=xx+100 End If ' do some tasks with database and with HTTP (with "Wait for" also) Next I have sometimes wrong behaviour of progressdialog, that disappear. On Ipad it works fine, but on Iphone12 not. I tried to put a "progressdialog.hide" before "progressdialog.show" and it works better (but you see some flicker). Anyway it is not reliable. I like this progressdialog because it's very simple to use when you are doing something in a loop and wants to show progress while userinteraction is blocked. But, how to make it works perfect ? I checked also as suggested in another thread B4XDialog, but can't find how to do the equivalent of progresdialog.
running a code like this B4X: Expand Collapse Copy For RecordPointer=0 To ExportList.Size-1 If RecordPointer>xx Then hd.ProgressDialogShow("exporting " & Floor(100*RecordPointer/ExportList.Size) & "%") Sleep(0) xx=xx+100 End If ' do some tasks with database and with HTTP (with "Wait for" also) Next I have sometimes wrong behaviour of progressdialog, that disappear. On Ipad it works fine, but on Iphone12 not. I tried to put a "progressdialog.hide" before "progressdialog.show" and it works better (but you see some flicker). Anyway it is not reliable. I like this progressdialog because it's very simple to use when you are doing something in a loop and wants to show progress while userinteraction is blocked. But, how to make it works perfect ? I checked also as suggested in another thread B4XDialog, but can't find how to do the equivalent of progresdialog.
Erel B4X founder Staff member Licensed User Longtime User Mar 19, 2023 #2 You should call ProgressDialogShow once, before the loop starts. Upvote 0
marcick Well-Known Member Licensed User Longtime User Mar 19, 2023 #3 Yes, but I want to show the progess during the loop. I partially solved obfuscating the panel with alpha 0.2 and bringing to front another panel that show the progress. I don’t have the same user interaction disabled but it’s acceptable Upvote 0
Yes, but I want to show the progess during the loop. I partially solved obfuscating the panel with alpha 0.2 and bringing to front another panel that show the progress. I don’t have the same user interaction disabled but it’s acceptable
Erel B4X founder Staff member Licensed User Longtime User Mar 19, 2023 #4 Of course. You don't need to call it multiple times. The Sleep(0) is required (not every iteration). Upvote 0
marcick Well-Known Member Licensed User Longtime User Mar 19, 2023 #5 I was calling it every 100 iterations to update the progress %. You mean that progressdialog is not good to be used like this, correct ? Upvote 0
I was calling it every 100 iterations to update the progress %. You mean that progressdialog is not good to be used like this, correct ?
Erel B4X founder Staff member Licensed User Longtime User Mar 20, 2023 #6 B4X: Expand Collapse Copy hd.ProgressDialogShow(...) For i = 1 to 10000000 'do many things If i mod 1000 = 0 Then Sleep(0) Next hd.ProgressDialogHide Upvote 0
B4X: Expand Collapse Copy hd.ProgressDialogShow(...) For i = 1 to 10000000 'do many things If i mod 1000 = 0 Then Sleep(0) Next hd.ProgressDialogHide
marcick Well-Known Member Licensed User Longtime User Mar 20, 2023 #7 I don't understand. Check my first post. I want the text in the progressdialog box changes, showing from 0% to 100%. Upvote 0
I don't understand. Check my first post. I want the text in the progressdialog box changes, showing from 0% to 100%.
Erel B4X founder Staff member Licensed User Longtime User Mar 21, 2023 #8 You are correct. Still, don't update it every iteration. Upvote 0
A Amateurtje Member Licensed User Longtime User Aug 29, 2023 #9 did you ever solved your wishes?? Showing the progressdialog without flickering but WITH the progress % in the text (in steps of x% ias said (not every iteration)..This still does not work with calling the progress dialog before the loop (as far as i can see/understand/test)... Upvote 0
did you ever solved your wishes?? Showing the progressdialog without flickering but WITH the progress % in the text (in steps of x% ias said (not every iteration)..This still does not work with calling the progress dialog before the loop (as far as i can see/understand/test)...
marcick Well-Known Member Licensed User Longtime User Aug 31, 2023 #10 Amateurtje said: did you ever solved your wishes?? Showing the progressdialog without flickering but WITH the progress % in the text (in steps of x% ias said (not every iteration)..This still does not work with calling the progress dialog before the loop (as far as i can see/understand/test)... Click to expand... Solved but not with progressdialog. I use a label to show the progress and set Alpha property 0.1 to the background panel Upvote 0
Amateurtje said: did you ever solved your wishes?? Showing the progressdialog without flickering but WITH the progress % in the text (in steps of x% ias said (not every iteration)..This still does not work with calling the progress dialog before the loop (as far as i can see/understand/test)... Click to expand... Solved but not with progressdialog. I use a label to show the progress and set Alpha property 0.1 to the background panel
A Amateurtje Member Licensed User Longtime User Sep 1, 2023 #11 marcick said: Solved but not with progressdialog. I use a label to show the progress and set Alpha property 0.1 to the background panel Click to expand... Oke. Thats a good idea.. So, the Progressdialog is not really ment to show the 'progress' then.. . Thanks for your reaction? Upvote 0
marcick said: Solved but not with progressdialog. I use a label to show the progress and set Alpha property 0.1 to the background panel Click to expand... Oke. Thats a good idea.. So, the Progressdialog is not really ment to show the 'progress' then.. . Thanks for your reaction?