本文整理匯總了Python中Pmw.Balloon方法的典型用法代碼示例。如果您正苦於以下問題:Python Pmw.Balloon方法的具體用法?Python Pmw.Balloon怎麽用?Python Pmw.Balloon使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Pmw
的用法示例。
在下文中一共展示了Pmw.Balloon方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
# 需要導入模塊: import Pmw [as 別名]
# 或者: from Pmw import Balloon [as 別名]
def __init__(self, parent):
self.master = parent
self.denominator = []
self.numerator = []
self.numerator_widget = Pmw.EntryField(self.master,
labelpos='w',
label_text='Numerator',
entry_width = 25,
validate=coeff_string_check,
value='1.0 -6.0 12.0')
self.denominator_widget = Pmw.EntryField(self.master,
labelpos='w',
label_text='Denominator',
entry_width = 25,
validate=coeff_string_check,
value='1.0 5.0 14.0 27.0')
self.balloon = Pmw.Balloon(self.master)
try:
self.balloon.bind(self.numerator_widget,
"Numerator coefficients, e.g: 1.0 2.0")
except:
pass
try:
self.balloon.bind(self.denominator_widget,
"Denominator coefficients, e.g: 1.0 3.0 2.0")
except:
pass
widgets = (self.numerator_widget, self.denominator_widget)
for i in range(len(widgets)):
widgets[i].grid(row=i+1, column=0, padx=20, pady=3)
Pmw.alignlabels(widgets)
self.numerator_widget.component('entry').focus_set()
示例2: create_gui
# 需要導入模塊: import Pmw [as 別名]
# 或者: from Pmw import Balloon [as 別名]
def create_gui(self):
self.root.title(AUDIO_PLAYER_NAME)
self.balloon = Pmw.Balloon(self.root)
self.create_top_display()
self.create_button_frame()
self.create_list_box()
self.create_bottom_frame()
self.create_context_menu()
開發者ID:PacktPublishing,項目名稱:Tkinter-GUI-Application-Development-Blueprints-Second-Edition,代碼行數:10,代碼來源:view.py
示例3: __init__
# 需要導入模塊: import Pmw [as 別名]
# 或者: from Pmw import Balloon [as 別名]
def __init__(self, player):
self.player = player
player.parent = self
self.root = Tk()
self.root.title('TkPlayer')
self.root.iconbitmap('icons/mp.ico')
self.balloon = Pmw.Balloon(self.root)
self.create_console_frame()
self.create_button_frame()
self.create_list_frame()
self.create_bottom_frame()
self.create_context_menu()
self.root.protocol('WM_DELETE_WINDOW', self.close_player)
self.root.mainloop()