本文整理匯總了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