Hello, i have a question, can i have a progress bar eto who show the progress of a function who make a task in Rhino. Eg: I have this code, who count from 0 to 10 every second in a eto, why the eto don’t show?
import Rhino.UI
import Eto.Drawing as drawing
import Eto.Forms as forms
import time
class progressBar(forms.Dialog):
def __init__(self,title,textp):
self.Title = title
self.ClientSize = drawing.Size(300, 33)
self.Padding = drawing.Padding(5)
self.Resizable = False
self.main_lay = forms.PixelLayout()
self.progress = forms.ProgressBar()
self.progress.Size = drawing.Size(290,20)
self.progress.MinValue = 0
self.progress.MaxValue = 10
self.main_lay.Add(self.progress,0,0)
self.textp = textp
self.label = forms.Label()
self.label.Text = self.textp+" "+str(0)+"/"+str(10)
self.main_lay.Add(self.label,80,0)
self.Content = self.main_lay
for i in range(0,10):
time.sleep(1)
print i
self.progress.Value = self.progress.Value +1
self.label.Text = self.textp+" "+str(self.progress.Value)+"/"+str(10)
dialog = progressBar("Process","Gathering data")
dialog.ShowModal(Rhino.UI.RhinoEtoApp.MainWindow)