def expand(self):
self.expFrame = f = tk.Frame(self)
f.columnconfigure(0, weight=1)
f.grid(sticky='we')
f1 = tk.Frame(f)
f1.columnconfigure(1, weight=1)
f1.grid(sticky='we')
labels = ['Path-fitting', 'Auto-rejoin', 'Offset x', 'Offset z', 'Repeat']
for row, text in enumerate(labels):
l = tk.Label(f1, text=text, font=self.labelFont, anchor='w')
l.grid(row=row, column = 0, sticky='we')
PF = ttk.Combobox(f1, takefocus=False, width=6, font=self.labelFont,
textvariable = self.pathfitting,
values=('None', 'Stretch', 'Scale'), state="readonly")
PF.grid(row=0, column = 1, sticky='we')
PF.bind("<<ComboboxSelected>>", self.draw)
JM = ttk.Combobox(f1, takefocus=False, width=6, font=self.labelFont,
textvariable = self.joint_mode,
values=('None', 'Lift', 'Bend'), state="readonly")
JM.grid(row=1, column = 1, sticky='we')
JM.bind("<<ComboboxSelected>>", self.draw)
OS_x = FloatEntry(f1, textvariable = self.x_offset, font=self.labelFont, width=5)
OS_x.grid(row=2, column = 1, sticky='we')
OS_x.bind('<Return>', self.draw)
OS_x.bind('<FocusOut>', self.draw)
OS_z = FloatEntry(f1, textvariable = self.z_offset, font=self.labelFont, width=5)
OS_z.grid(row=3, column = 1, sticky='we')
OS_z.bind('<Return>', self.draw)
OS_z.bind('<FocusOut>', self.draw)
RP = tk.Checkbutton(f1, variable=self._repeat, command=self.draw)
RP.grid(row=4, column = 1, sticky='w')
sep = ttk.Separator(f, orient=tk.HORIZONTAL)
sep.grid(padx=2, sticky='we')
f2 = tk.Frame(f)
for i in range(0, 3):
f2.columnconfigure(i, weight=1)
f2.grid(sticky='we')
DS = tk.Checkbutton(f2, text='Display', width=5, font=self.labelFont,
indicatoron=False, bd=1, variable=self._display,
command=self.draw)
DS.grid(row=0, column=0, sticky='wens', pady=2, padx=1)
self.SET = tk.Button(f2, text='Set', width=5, font=self.labelFont, bd=1, command=self.applyCommand)
self.SET.grid(row=0, column=1, sticky='we', pady=2, padx=1)
self.ADD = tk.Button(f2, text='Add', width=5, font=self.labelFont, bd=1, command = lambda: self.applyCommand(mode='add'))
self.ADD.grid(row=0, column=2, sticky='we', pady=2, padx=1)
评论列表
文章目录