本文整理汇总了Python中zenmapGUI.higwidgets.higboxes.HIGHBox.__init__方法的典型用法代码示例。如果您正苦于以下问题:Python HIGHBox.__init__方法的具体用法?Python HIGHBox.__init__怎么用?Python HIGHBox.__init__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类zenmapGUI.higwidgets.higboxes.HIGHBox
的用法示例。
在下文中一共展示了HIGHBox.__init__方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from zenmapGUI.higwidgets.higboxes import HIGHBox [as 别名]
# 或者: from zenmapGUI.higwidgets.higboxes.HIGHBox import __init__ [as 别名]
def __init__(self):
"""Initialize Scan Toolbar, including Events, and packing all
of the GUI elements in layout"""
HIGHBox.__init__(self)
self._create_target()
self._create_profile()
self.scan_button = gtk.Button(_("Scan"))
#self.scan_button = HIGButton(_("Scan "), gtk.STOCK_MEDIA_PLAY)
self.cancel_button = gtk.Button(_("Cancel"))
#self.cancel_button = HIGButton(_("Cancel "), gtk.STOCK_CANCEL)
self._pack_noexpand_nofill(self.target_label)
self._pack_expand_fill(self.target_entry)
self._pack_noexpand_nofill(self.profile_label)
self._pack_expand_fill(self.profile_entry)
self._pack_noexpand_nofill(self.scan_button)
self._pack_noexpand_nofill(self.cancel_button)
# Skip over the dropdown arrow so you can tab to the profile entry.
self.target_entry.set_focus_chain((self.target_entry.child,))
self.target_entry.child.connect('activate',
lambda x: self.profile_entry.grab_focus())
self.profile_entry.child.connect('activate',
lambda x: self.scan_button.clicked())
示例2: __init__
# 需要导入模块: from zenmapGUI.higwidgets.higboxes import HIGHBox [as 别名]
# 或者: from zenmapGUI.higwidgets.higboxes.HIGHBox import __init__ [as 别名]
def __init__(self):
HIGHBox.__init__(self)
self.information_label = gtk.Label()
self.entry = gtk.Entry()
self.pack_start(self.information_label, False)
self.information_label.show()
label = gtk.Label(_("Host Filter:"))
self.pack_start(label, False)
label.show()
self.pack_start(self.entry, True, True)
self.entry.show()
help_button = gtk.Button()
icon = gtk.Image()
icon.set_from_stock(gtk.STOCK_INFO, gtk.ICON_SIZE_BUTTON)
help_button.add(icon)
help_button.connect("clicked", self._help_button_clicked)
self.pack_start(help_button, False)
help_button.show_all()
self.entry.connect("changed", lambda x: self.emit("changed"))