Tkinter菜单小工具

我正在Tkinter创建一个菜单。创建菜单后,我希望能够更改radiobutton的标签。类似于.configure方法的东西。我该怎么做? 我希望能够将radiobuttons文本从“Hello”更改为“Hello!”。 片段:
    self.B3Me = Tkinter.Menu(self, tearoff=0,
                                activebackground='grey15',
                                activeforeground='grey95')
    self.B3MeVar = Tkinter.StringVar()
    self.B3Me.add_radiobutton(label='Hello', variable=self.B3MeVar,
                                 command=self.B3_menu_beh)
    
已邀请:
要修改标签,请使用
entryconfig
方法。您为此方法指定一个索引,该索引可以是项的整数位置,也可以是标签本身。例如:
self.B3Me.entryconfig("Hello", label="Goodbye!")
    

要回复问题请先登录注册