Notifications
Clear all
[Closed] ProgressBar placed below dotNetLabel disappeared when using in modal dialog
Nov 23, 2021 9:56 pm
I’ve found a weird bug: all progressBar placed below dotNet Label always disappeared after executing code in on rollout open
.
The requirements to reproduce are:
- createDialog modal:true
- Has dotNetControl “Label” in the same rollout
Here is reproducable code:
rollout progbarRollout "progbar"
(
progressbar progbar color:(color 100 100 230) width:400 height:25 value:0
dotNetControl title "Label" text:"0" height:20
progressbar progbar2 color:(color 0 0 130) width:400 height:25 value:50
progressbar progbar3 color:(color 0 130 130) width:400 height:25 value:50
on progbarRollout open do
(
title.text = "1"
progbar.value = progbar2.value = progbar3.value = 30
windows.processPostedMessages() -- update ui
sleep 1
title.text = "2"
progbar.value = progbar2.value = progbar3.value = 60
windows.processPostedMessages() -- update ui
sleep 1
)
)
createDialog progbarRollout 500 150 modal:true -- set modal:false can help, but I need modal:true to stop script execution
Set modal:false
will fix this but I need to find a workaround while keeping modal:true
.
Reproduced on Max 21 and 22.
2 Replies
Nov 23, 2021 9:56 pm
see if it helps
rollout progbarRollout "progbar"
(
progressbar progbar color:(color 100 100 230) width:400 height:25 value:0
dotNetControl title "Label" text:"0" height:20
progressbar progbar2 color:(color 0 0 130) width:400 height:25 value:50
progressbar progbar3 color:(color 0 130 130) width:400 height:25 value:50
button btn "run progress"
fn OnProgress =
(
progbar.value = mod (progbar.value += 5) 100.0
progbar2.value = mod (progbar2.value += 5) 100.0
progbar3.value = mod (progbar3.value += 5) 100.0
)
timer clock active:true interval:10
on clock tick do
(
progbar.visible = true
progbar2.visible = true
progbar3.visible = true
clock.active = false
)
on btn pressed do OnProgress()
)
CreateDialog progbarRollout width:400 modal:true