本文整理汇总了Python中ttk.Notebook.index方法的典型用法代码示例。如果您正苦于以下问题:Python Notebook.index方法的具体用法?Python Notebook.index怎么用?Python Notebook.index使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ttk.Notebook
的用法示例。
在下文中一共展示了Notebook.index方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: NewActionModulation
# 需要导入模块: from ttk import Notebook [as 别名]
# 或者: from ttk.Notebook import index [as 别名]
class NewActionModulation(Frame):
def __init__(self, parent):
Frame.__init__(self, parent)
self.parent = parent
self.initUI()
def initUI(self):
self.parent.title("Test")
self.frameTab = Frame(self, relief=RAISED, borderwidth=1)
self.frameTab.grid(row=3, column=0, columnspan=4)
self.grid(row=0, column=0)
self.frameTab.grid(row=0, column=0)
self.note_book = Notebook(self.frameTab)
self.specific_actions = ActionModulation.ActionModulation(self.note_book)
self.note_book.add(self.specific_actions.getFrame(), text="specific actions")
self.general_actions = GeneralActionModulation.GeneralActionModulation(self.note_book)
self.note_book.add(self.general_actions.getFrame(), text="general actions")
self.note_book.grid(row=0, column=0)
self.frameButtons = Frame(self, relief=RAISED, borderwidth=1)
self.frameButtons.grid(row=3, column=0, columnspan=4)
self.buttonReset = Button(self.frameButtons, text="Reset")
self.buttonReset.grid(row=0, column=0)
self.buttonAbort = Button(self.frameButtons, text="Abort")
self.buttonAbort.grid(row=0, column=1)
self.buttonStop = Button(self.frameButtons, text="Stop")
self.buttonStop.grid(row=0, column=2)
self.buttonSendAction = Button(self.frameButtons, text="Send Action")
self.buttonSendAction.grid(row=0, column=4)
self.buttonSendEmotion = Button(self.frameButtons, text="Send Emotion")
self.buttonSendEmotion.grid(row=0, column=5)
def getCurrentTab(self):
return self.note_book.index(self.note_book.select())
def getFirstTab(self):
return self.specific_actions
def getSecondTab(self):
return self.general_actions
def getButtonSendAction(self):
return self.buttonSendAction
def getButtonSendEmotion(self):
return self.buttonSendEmotion
def getButtonReset(self):
return self.buttonReset
def getButtonAbort(self):
return self.buttonAbort
def getButtonStop(self):
return self.buttonStop