def SetBaseWidgets(self, rowControl):
## ???? (?????, ??????, ??????) ???????
def SetSizeLabel():
self.lblSpSize.configure(text="Order: " + str(self.shSpectr.Size) + ', ' + str(self.shSpectr.numSp + 1))
def SetSpParameters():
self.scIndex.configure(to=self.toIndex())
self.scVMarksize.configure(to=int(self.shSpectr.numZ-1))
self.scColor.configure(to=int(self.shSpectr.numZ-1))
SetSizeLabel()
self.SetIndexLabel()
self.SetLabelVectorColor()
self.SetLabelMSVector()
def ChangeBaseSet(val):
self.shSpectr.BaseSet=val
self.shSpectr.SetForm()
SetSpParameters()
def ChangeSize(val):
iSize = int(float(val))
self.shSpectr.Size= iSize
self.shSpectr.SetForm()
SetSpParameters()
def ChangeIndex(val):
ind = int(float(val))
self.shSpectr.ChangeIndex(ind*self.shSpectr.NumPlots)
self.SetIndexLabel()
rowControl = self.AddLabel(rowControl, "Base", colsp=1)
vBaseSet = self.shSpectr.BaseSets()
sBaseSet = tk.StringVar(self.frControl)
self.omBaseSet = ttk.OptionMenu(self.frControl, sBaseSet, self.shSpectr.BaseSet, *vBaseSet, command=ChangeBaseSet)
rowControl = PlaceWidget(self.omBaseSet, rowControl, col=1, stick='wn')
self.lblSpSize = ttk.Label(self.frControl)
PlaceWidget(self.lblSpSize, rowControl)
SetSizeLabel()
self.scSize = ttk.Scale(self.frControl, orient='horizontal', length=self.colWidth2, from_=self.shSpectr.SizeRange[0], to=self.shSpectr.SizeRange[1], value=self.shSpectr.Size, command=ChangeSize)
rowControl = PlaceWidget(self.scSize, rowControl, col=1, colspan=1, stick='ne')
rowControl = self.AddLabel(rowControl, "Index", self.lblColor, 1)
self.lblSpIndex = ttk.Label(self.frControl) #, text="Index: 0"
PlaceWidget(self.lblSpIndex, rowControl)
self.scIndex = ttk.Scale(self.frControl, orient='horizontal', length=self.colWidth2, from_=0, to=self.toIndex(), value=int(self.shSpectr.iSpectr/self.shSpectr.NumPlots), command=ChangeIndex)
rowControl = PlaceWidget(self.scIndex, rowControl, col=0, colspan=2, stick='ne')
self.SetIndexLabel()
return self.AddLabel(rowControl)
评论列表
文章目录