I built a long script to which I added a progress bar with the following code:
function StartProgressBar()
gaugeProgress = iup.gaugeProgress{}
gaugeProgress.show_text = "YES"
gaugeProgress.expand = "HORIZONTAL"
dlgProgress = iup.dialog{gaugeProgress; title = "Note Replacement in Progress"}
dlgProgress.size = "QUARTERxEIGHTH"
dlgProgress.menubox = "NO" -- Remove Windows close button and menu.
dlgProgress:showxy(iup.CENTER, iup.CENTER) -- Put up Progress Display
return dlgProgress
end
This is called before the loop, and the progress bar is updated during the loop (I am not calling MainLoop). At the end of the process, I call dlgProgress.destroy to clear it.
Until I focus on the progress bar, it works fine, but if the focus is lost, the program will work, so I'm sure I'm doing it wrong. Can someone tell me the right way. Detailed google did not find me examples for iup, lua progress bars.
Thanks in advance.
source
share