本文整理汇总了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()