本文整理汇总了Python中albow.Label.mouse_down方法的典型用法代码示例。如果您正苦于以下问题:Python Label.mouse_down方法的具体用法?Python Label.mouse_down怎么用?Python Label.mouse_down使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类albow.Label
的用法示例。
在下文中一共展示了Label.mouse_down方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: CheckBoxLabel
# 需要导入模块: from albow import Label [as 别名]
# 或者: from albow.Label import mouse_down [as 别名]
def CheckBoxLabel(title, *args, **kw):
tooltipText = kw.pop('tooltipText', None)
cb = CheckBox(*args, **kw)
lab = Label(title, fg_color=cb.fg_color)
lab.mouse_down = cb.mouse_down
if tooltipText:
cb.tooltipText = tooltipText
lab.tooltipText = tooltipText
class CBRow(Row):
margin = 0
@property
def value(self):
return self.checkbox.value
@value.setter
def value(self, val):
self.checkbox.value = val
row = CBRow((lab, cb))
row.checkbox = cb
return row
示例2: reload
# 需要导入模块: from albow import Label [as 别名]
# 或者: from albow.Label import mouse_down [as 别名]
def reload(self):
for i in list(self.subwidgets):
self.remove(i)
tool = self.tool
if len(tool.filterModules) is 0:
self.add(Label("No filter modules found!"))
self.shrink_wrap()
return
if self.selectedFilterName is None or self.selectedFilterName not in tool.filterNames:
self.selectedFilterName = tool.filterNames[0]
self.filterSelect = ChoiceButton(tool.filterNames, choose=self.filterChanged)
self.filterSelect.selectedChoice = self.selectedFilterName
filterLabel = Label("Filter:", fg_color=(177, 177, 255, 255))
filterLabel.mouse_down = lambda x: mcplatform.platform_open(directories.getFiltersDir())
filterLabel.tooltipText = "Click to open filters folder"
self.filterSelectRow = filterSelectRow = Row((filterLabel, self.filterSelect))
self.confirmButton = Button("Filter", action=self.tool.confirm)
self.filterOptionsPanel = None
while self.filterOptionsPanel is None:
module = self.tool.filterModules[self.selectedFilterName]
try:
self.filterOptionsPanel = FilterModuleOptions(self.tool, module, _parent=self)
except Exception, e:
alert(_("Error creating filter inputs for {0}: {1}").format(module, e))
traceback.print_exc()
self.tool.filterModules.pop(self.selectedFilterName)
self.selectedFilterName = tool.filterNames[0]
if len(tool.filterNames) == 0:
raise ValueError("No filters loaded!")