def shape_click(self, *event):
shape = self.shape_menu.get(self.shape_menu.curselection())
shape_index = self.shape_types.index(self.shape_type.get())
section_props = self.shape_sets[shape_index].get(shape)
if section_props[0] == 'F':
self.data_frame.configure(text="Section Properties - AISC 14th Edition: -- Selected Shape: "+shape)
else:
note = self.shape_special_note[shape_index]
self.data_frame.configure(text="Section Properties - AISC 14th Edition: -- Selected Shape: "+shape+" -- Note: "+note)
for labels in self.properties_labels:
labels.configure( text=' ')
props_counter = 0
props_list = []
for i in range(1,len(self.values_list)):
if section_props[i] == '-':
pass
else:
if self.values_units[i] == '':
string = '{0}{1}:\n{2}'.format(self.values_list[i],self.values_units[i],section_props[i])
else:
string = '{0}({1}):\n{2}'.format(self.values_list[i],self.values_units[i],section_props[i])
props_list.append(self.values_list[i])
self.properties_labels[props_counter].configure( text=string)
props_counter+=1
self.value_def_menu.destroy()
self.value_def_menu = tk.OptionMenu(self.value_def_frame, self.value_def, *props_list, command=self.value_definitions)
helv = tkFont.Font(family='Helvetica',size=self.f_size, weight='bold')
self.value_def_menu.config(font=helv)
self.value_def_menu.grid(row=0, column=0, padx=1, pady=1)
self.value_def.set(props_list[0])
self.value_definitions()
aisc_steel_shapes.py 文件源码
python
阅读 16
收藏 0
点赞 0
评论 0
评论列表
文章目录