本文整理汇总了Python中zenmapGUI.higwidgets.higscrollers.HIGScrolledWindow.set_border_width方法的典型用法代码示例。如果您正苦于以下问题:Python HIGScrolledWindow.set_border_width方法的具体用法?Python HIGScrolledWindow.set_border_width怎么用?Python HIGScrolledWindow.set_border_width使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类zenmapGUI.higwidgets.higscrollers.HIGScrolledWindow
的用法示例。
在下文中一共展示了HIGScrolledWindow.set_border_width方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
# 需要导入模块: from zenmapGUI.higwidgets.higscrollers import HIGScrolledWindow [as 别名]
# 或者: from zenmapGUI.higwidgets.higscrollers.HIGScrolledWindow import set_border_width [as 别名]
def __init__(self, scans_store):
HIGVBox.__init__(self)
self.set_spacing(4)
scans_store.connect("row-changed", self._row_changed)
self.scans_list = gtk.TreeView(scans_store)
self.scans_list.get_selection().connect(
"changed", self._selection_changed)
status_col = gtk.TreeViewColumn(_("Status"))
cell = gtk.CellRendererText()
status_col.pack_start(cell)
status_col.set_cell_data_func(cell, status_data_func)
self.scans_list.append_column(status_col)
command_col = gtk.TreeViewColumn(_("Command"))
cell = gtk.CellRendererText()
command_col.pack_start(cell)
command_col.set_cell_data_func(cell, command_data_func)
self.scans_list.append_column(command_col)
scrolled_window = HIGScrolledWindow()
scrolled_window.set_border_width(0)
scrolled_window.add(self.scans_list)
self.pack_start(scrolled_window, True, True)
hbox = HIGHBox()
buttonbox = gtk.HButtonBox()
buttonbox.set_layout(gtk.BUTTONBOX_START)
buttonbox.set_spacing(4)
self.append_button = HIGButton(_("Append Scan"), gtk.STOCK_ADD)
buttonbox.pack_start(self.append_button, False)
self.remove_button = HIGButton(_("Remove Scan"), gtk.STOCK_REMOVE)
buttonbox.pack_start(self.remove_button, False)
self.cancel_button = HIGButton(_("Cancel Scan"), gtk.STOCK_CANCEL)
buttonbox.pack_start(self.cancel_button, False)
hbox.pack_start(buttonbox, padding=4)
self.pack_start(hbox, False, padding=4)
self._update()
示例2: ProfileEditor
# 需要导入模块: from zenmapGUI.higwidgets.higscrollers import HIGScrolledWindow [as 别名]
# 或者: from zenmapGUI.higwidgets.higscrollers.HIGScrolledWindow import set_border_width [as 别名]
#.........这里部分代码省略.........
self.help_field.get_buffer().set_text(
"Description\n\nThe description is a full description of what "
"the scan does, which may be long.")
def __create_widgets(self):
###
# Vertical box to keep 3 boxes
self.main_whole_box = HIGVBox()
self.upper_box = HIGHBox()
self.middle_box = HIGHBox()
self.lower_box = HIGHBox()
#self.main_vbox = HIGVBox()
self.command_entry = gtk.Entry()
self.command_entry_changed_cb_id = self.command_entry.connect(
"changed", self.command_entry_changed_cb)
self.scan_button = HIGButton(_("Scan"))
self.scan_button.connect("clicked", self.run_scan)
self.notebook = gtk.Notebook()
# Profile info page
self.profile_info_vbox = HIGVBox()
self.profile_info_label = HIGSectionLabel(_('Profile Information'))
self.profile_name_label = HIGEntryLabel(_('Profile name'))
self.profile_name_entry = gtk.Entry()
self.profile_name_entry.connect(
'enter-notify-event', self.update_help_name)
self.profile_description_label = HIGEntryLabel(_('Description'))
self.profile_description_scroll = HIGScrolledWindow()
self.profile_description_scroll.set_border_width(0)
self.profile_description_text = HIGTextView()
self.profile_description_text.connect(
'motion-notify-event', self.update_help_desc)
# Buttons
self.buttons_hbox = HIGHBox()
self.cancel_button = HIGButton(stock=gtk.STOCK_CANCEL)
self.cancel_button.connect('clicked', self.exit)
self.delete_button = HIGButton(stock=gtk.STOCK_DELETE)
self.delete_button.connect('clicked', self.delete_profile)
self.save_button = HIGButton(_("Save Changes"), stock=gtk.STOCK_SAVE)
self.save_button.connect('clicked', self.save_profile)
###
self.help_vbox = HIGVBox()
self.help_label = HIGSectionLabel(_('Help'))
self.help_scroll = HIGScrolledWindow()
self.help_scroll.set_border_width(0)
self.help_field = HIGTextView()
self.help_field.set_cursor_visible(False)
self.help_field.set_left_margin(5)
self.help_field.set_editable(False)
self.help_vbox.set_size_request(200, -1)
###
def __pack_widgets(self):
###
self.add(self.main_whole_box)