本文整理汇总了Python中zenmapGUI.higwidgets.higboxes.HIGHBox.set_spacing方法的典型用法代码示例。如果您正苦于以下问题:Python HIGHBox.set_spacing方法的具体用法?Python HIGHBox.set_spacing怎么用?Python HIGHBox.set_spacing使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类zenmapGUI.higwidgets.higboxes.HIGHBox
的用法示例。
在下文中一共展示了HIGHBox.set_spacing方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: delete_profile
# 需要导入模块: from zenmapGUI.higwidgets.higboxes import HIGHBox [as 别名]
# 或者: from zenmapGUI.higwidgets.higboxes.HIGHBox import set_spacing [as 别名]
def delete_profile(self, widget=None, extra=None):
if self.deletable:
dialog = HIGDialog(buttons=(gtk.STOCK_OK, gtk.RESPONSE_OK,
gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL))
alert = HIGEntryLabel('<b>'+_("Deleting Profile")+'</b>')
text = HIGEntryLabel(_('Your profile is going to be deleted! Click\
Ok to continue, or Cancel to go back to Profile Editor.'))
hbox = HIGHBox()
hbox.set_border_width(5)
hbox.set_spacing(12)
vbox = HIGVBox()
vbox.set_border_width(5)
vbox.set_spacing(12)
image = gtk.Image()
image.set_from_stock(gtk.STOCK_DIALOG_WARNING, gtk.ICON_SIZE_DIALOG)
vbox.pack_start(alert)
vbox.pack_start(text)
hbox.pack_start(image)
hbox.pack_start(vbox)
dialog.vbox.pack_start(hbox)
dialog.vbox.show_all()
response = dialog.run()
dialog.destroy()
if response == gtk.RESPONSE_CANCEL:
return True
self.profile.remove_profile(self.profile_name)
self.update_profile_entry()
self.destroy()
示例2: ProfileEditor
# 需要导入模块: from zenmapGUI.higwidgets.higboxes import HIGHBox [as 别名]
# 或者: from zenmapGUI.higwidgets.higboxes.HIGHBox import set_spacing [as 别名]
#.........这里部分代码省略.........
###
# Packing profile information tab on notebook
self.notebook.append_page(
self.profile_info_vbox, gtk.Label(_('Profile')))
self.profile_info_vbox.set_border_width(5)
table = HIGTable()
self.profile_info_vbox._pack_noexpand_nofill(self.profile_info_label)
self.profile_info_vbox._pack_expand_fill(HIGSpacer(table))
self.profile_description_scroll.add(self.profile_description_text)
vbox_desc = HIGVBox()
vbox_desc._pack_noexpand_nofill(self.profile_description_label)
vbox_desc._pack_expand_fill(hig_box_space_holder())
vbox_ann = HIGVBox()
vbox_ann._pack_expand_fill(hig_box_space_holder())
table.attach(
self.profile_name_label, 0, 1, 0, 1, xoptions=0, yoptions=0)
table.attach(self.profile_name_entry, 1, 2, 0, 1, yoptions=0)
table.attach(vbox_desc, 0, 1, 1, 2, xoptions=0)
table.attach(self.profile_description_scroll, 1, 2, 1, 2)
# Packing buttons on button_hbox
self.buttons_hbox._pack_expand_fill(hig_box_space_holder())
if self.deletable:
self.buttons_hbox._pack_noexpand_nofill(self.delete_button)
self.buttons_hbox._pack_noexpand_nofill(self.cancel_button)
self.buttons_hbox._pack_noexpand_nofill(self.save_button)
self.buttons_hbox.set_border_width(5)
self.buttons_hbox.set_spacing(6)
###
self.help_vbox._pack_noexpand_nofill(self.help_label)
self.help_vbox._pack_expand_fill(self.help_scroll)
self.help_scroll.add(self.help_field)
self.help_vbox.set_border_width(1)
self.help_vbox.set_spacing(1)
###
def __create_tab(self, tab_name, section_name, tab):
log.debug(">>> Tab name: %s" % tab_name)
log.debug(">>>Creating profile editor section: %s" % section_name)
vbox = HIGVBox()
if tab.notscripttab: # if notscripttab is set
table = HIGTable()
table.set_row_spacings(2)
section = HIGSectionLabel(section_name)
vbox._pack_noexpand_nofill(section)
vbox._pack_noexpand_nofill(HIGSpacer(table))
vbox.set_border_width(5)
tab.fill_table(table, True)
else:
hbox = tab.get_hmain_box()
vbox.pack_start(hbox, True, True, 0)
self.notebook.append_page(vbox, gtk.Label(tab_name))
def save_profile(self, widget):
if self.overwrite:
self.profile.remove_profile(self.profile_name)
profile_name = self.profile_name_entry.get_text()
if profile_name == '':
alert = HIGAlertDialog(