我一直在谷歌上搜索这个问题,找不到任何好的网站......我想创建按钮和条目小部件,如下所示:
[A] [B] [C] [D] [E] [F]
[在此输入小工具] [确定]
我的代码如下所示:
类控制器(框架):
def __init__(self,parent): Frame.__init__(self, parent) self.parent = parent self.button1 = Button(parent, text = "A") self.button1.pack(side = TOP) self.button1 = Button(parent, text = "B") self.button1.pack(side = TOP) self.button1 = Button(parent, text = "C") self.button1.pack(side = TOP) self.button1 = Button(parent, text = "D") self.button1.pack(side = TOP) self.button1 = Button(parent, text = "E") self.button1.pack(side = TOP) self.button1 = Button(parent, text = "F") self.button1.pack(side = TOP) self.myentrybox = Entry(parent, width = 50) self.myentrybox.pack(side = LEFT) self.button = Button(parent, text = "OK") self.button.pack(side = RIGHT )
这看起来与我正在尝试创建的完全不同..
任何反馈将不胜感激。