当前位置: 首页>>代码示例>>Python>>正文


Python TFrame.pack方法代码示例

本文整理汇总了Python中sk1sdk.libttk.TFrame.pack方法的典型用法代码示例。如果您正苦于以下问题:Python TFrame.pack方法的具体用法?Python TFrame.pack怎么用?Python TFrame.pack使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在sk1sdk.libttk.TFrame的用法示例。


在下文中一共展示了TFrame.pack方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import pack [as 别名]
	def __init__(self, parent, **kw):
		TFrame.__init__(self, parent, style='FlatFrame', **kw)	
			
		spot_frame = TFrame(self, borderwidth=2, style='FlatFrame')
		spot_frame.pack(side=TOP)
		
		label = TLabel(spot_frame, text=_('Color name:'), justify=LEFT)
		label.pack(side=TOP)
		
		self.colorname_value = StringVar('')
		
		self.colorname = TEntrybox(spot_frame, text='', width=25, textvariable=self.colorname_value)
		self.colorname.set_state('readonly')
		self.colorname.pack(side=BOTTOM, fill=X)
		
		cmyk_frame = TFrame(self, borderwidth=2, style='FlatFrame')
		cmyk_frame.pack(side=TOP)
		
		self.CMYK_label = TLabel(cmyk_frame, text='C:\nM:\nY:\nK:', justify=LEFT)
		self.CMYK_label.pack(side=LEFT, padx=10)
		
		self.RGB_label = TLabel(cmyk_frame, text='R:\nG:\nB:', justify=LEFT)
		self.RGB_label.pack(side=LEFT, padx=10)
		
		self.HTML_label = TLabel(self, text='HTML:', justify=LEFT)
		self.HTML_label.pack(side=BOTTOM, pady=5)		
开发者ID:kindlychung,项目名称:sk1,代码行数:28,代码来源:colordigitizer.py

示例2: build_dlg

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import pack [as 别名]
	def build_dlg(self):

		parent = TFrame(self.top, style='FlatFrame', borderwidth=10)
		parent.pack(side=TOP, fill=BOTH, expand=1)

		bwpanel = BrowsePanel(parent, self, style='FlatFrame')
		bwpanel.pack(side=TOP, fill=X, expand=0)

		Frame(parent, relief='flat', height=5).pack(side=TOP, fill=X, expand=0)

		cmdpanel = CommandPanel(parent, self, style='FlatFrame')
		cmdpanel.pack(side=BOTTOM, fill=X, expand=0)

		Frame(parent, relief='flat', height=5).pack(side=BOTTOM, fill=X, expand=0)

		places = PlacesPanel(parent, self, borderwidth=3)
		places.pack(side=LEFT, fill=Y, expand=0)

		Frame(parent, relief='flat', width=5).pack(side=LEFT, fill=Y, expand=0)

		filepnl = FilePanel(parent, self, clr='white')
		filepnl.pack(side=TOP, fill=BOTH, expand=1)

		self.top.bind('<Escape>', self.cancel)
		self.top.protocol('WM_DELETE_WINDOW', self.cancel)
开发者ID:kindlychung,项目名称:sk1,代码行数:27,代码来源:filedialog.py

示例3: init

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import pack [as 别名]
	def init(self, master):
		PluginPanel.init(self, master)
		top = TFrame(self.panel, style='FlatFrame', borderwidth=7)
		top.pack(side = TOP, fill=BOTH)
		
		sign = TFrame(top, style='RoundedFrame', borderwidth=5)
		sign.pack(side=TOP)

		self.sign = TLabel(sign, image='color_converter')
		self.sign.pack(side=TOP)
		
		self.cs_name = StringVar(top)
		self.cs_name.set(RGB)
		
		label = TLabel(top, text=_("Colorspace:")+" ")
		label.pack(side = TOP, anchor=W)
		
		self.colorspaces = TCombobox(top, state='readonly', postcommand = self.set_cs, 
									 values=self.make_cs_list(), width=14, style='ComboNormal',
									 textvariable=self.cs_name)
		self.colorspaces.pack(side = TOP, fill=X, pady=3)
		
		button = UpdatedButton(top, text = _("Apply"),
								command = self.apply_colorspace,
								sensitivecb = self.is_selection)
		button.pack(side = BOTTOM, expand = 1, fill = X, pady=3)
		self.Subscribe(SELECTION, button.Update)
		


		self.init_from_doc()
		self.subscribe_receivers()
开发者ID:kindlychung,项目名称:sk1,代码行数:34,代码来源:csconverter_plugin.py

示例4: __init__

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import pack [as 别名]
	def __init__(self, parent, color=None, **kw):
		TFrame.__init__(self, parent, style='FlatFrame', **kw)

		frame = TFrame(self, style="RoundedFrame", borderwidth=5)
		frame.pack(side=LEFT)

		self.color_monitor = Canvas(frame, width=100, height=50, relief='flat')
		self.color_monitor.pack(side=TOP)
开发者ID:kindlychung,项目名称:sk1,代码行数:10,代码来源:colorchooser.py

示例5: init

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import pack [as 别名]
	def init(self, master):
		PluginPanel.init(self, master)
		top = self.panel

		grid_top = TFrame(top, borderwidth=2, style='FlatFrame')
		grid_top.pack(side=TOP, expand=1, fill=X)

		button_frame = self.create_std_buttons(top)
		button_frame.pack(side=BOTTOM, fill=BOTH, expand=1)
# ===========================================================
		do_apply = self.do_apply

		label = TLabel(top, text=" " + _("Grid origin") + " ", style="FlatLabel")
		label.pack()
		frame = TLabelframe(top, labelwidget=label, style='Labelframe', borderwidth=4)

		frame.pack(side=TOP, fill=X, pady=4, padx=2)

		f = TFrame(frame, style='FlatFrame')
		self.var_xorig = create_length_entry(top, f, do_apply)
		label = TLabel(f, text="X: ", anchor=E)
		label.pack(side=RIGHT, fill=X)
		f.pack(side=TOP, fill=X, pady=2)


		f = TFrame(frame, style='FlatFrame')
		self.var_yorig = create_length_entry(top, f, do_apply)
		label = TLabel(f, text="Y: ", anchor=E)
		label.pack(side=RIGHT, fill=X)
		f.pack(side=TOP, fill=X, pady=2)

# ===========================================================

		label = TLabel(top, text=" " + _("Grid size") + " ", style="FlatLabel")
		label.pack()
		frame = TLabelframe(top, labelwidget=label, style='Labelframe', borderwidth=4)
		frame.pack(side=TOP, fill=X, pady=4, padx=2)

		f = TFrame(frame, style='FlatFrame')
		self.var_xwidth = create_length_entry(top, f, do_apply)
		label = TLabel(f, text="ΔX: ", anchor=E)
		label.pack(side=RIGHT, fill=X)
		f.pack(side=TOP, fill=X, pady=2)


		f = TFrame(frame, style='FlatFrame')
		self.var_ywidth = create_length_entry(top, f, do_apply)
		label = TLabel(f, text="ΔY: ")
		label.pack(side=RIGHT, fill=X)
		f.pack(side=TOP, fill=X, pady=2)

		app.mw.docmanager.activedoc.Subscribe(GRID, self.init_from_doc)
		app.mw.Subscribe(DOCUMENT, self.init_from_doc)
		self.init_from_doc()
开发者ID:kindlychung,项目名称:sk1,代码行数:56,代码来源:grid_plugin.py

示例6: build_dlg

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import pack [as 别名]
	def build_dlg(self):
		root = TFrame(self.top, style='FlatFrame', borderwidth = 10)
		root.pack(side = TOP, fill = BOTH, expand = 1)
		
		top = TFrame(root, style='FlatFrame', borderwidth = 5)
		top.pack(side = TOP, fill = X, expand = 1)
		label = TLabel(top, text = _("Insert:")+" ", style='FlatLabel')
		label.pack(side = LEFT)
		self.numpages_spin = TSpinbox(top,  var=1, vartype=0, textvariable = self.numpages,
						min = 1, max = 1000, step = 1, width = 6, command = self.ok)
		self.numpages_spin.pack(side = LEFT)		
		label = TLabel(top, text = " "+_("page(s)"), style='FlatLabel')
		label.pack(side = LEFT)


		middle = TFrame(root, style='FlatFrame', borderwidth = 5)
		middle.pack(side = TOP, fill = X, expand = 1)
		
		rbframe = TFrame(middle, style='FlatFrame', borderwidth = 5)
		rbframe.pack(side = LEFT)
		self.var_reference = StringVar(self.master)
		if self.is_before:
			self.var_reference.set('before')
		else:
			self.var_reference.set('after')			
		radio = UpdatedRadiobutton(rbframe, value = 'before', text = _("Before")+" ", variable = self.var_reference)
		radio.pack(side=TOP, anchor=W)
		radio = UpdatedRadiobutton(rbframe, value = 'after', text = _("After")+" ", variable = self.var_reference)
		radio.pack(side=TOP, anchor=W)	
		
		label = TLabel(middle, text = " "+_("page No.:")+" ", style='FlatLabel')
		label.pack(side = LEFT)
		self.pagenum_spin = TSpinbox(middle, var=app.mw.document.active_page+1, vartype=0, textvariable = self.pagenum,
						min = 1, max = len(app.mw.document.pages), step = 1, width = 6, command = self.ok)
		self.pagenum_spin.pack(side = LEFT)
		if len(app.mw.document.pages)==1:
			self.pagenum_spin.set_state('disabled')
			

		bottom = TFrame(root, style='FlatFrame', borderwidth = 5)
		bottom.pack(side = BOTTOM, fill = X, expand = 1)
		cancel = TButton(bottom, text=_("Cancel"), command=self.cancel)
		cancel.pack(side = RIGHT)

		label = TLabel(bottom, text = '  ', style='FlatLabel')
		label.pack(side = RIGHT)
		ok = TButton(bottom, text=_("OK"), command=self.ok)
		ok.pack(side = RIGHT)
		self.focus_widget = ok
		
		self.top.bind('<Escape>', self.cancel)
		self.top.protocol('WM_DELETE_WINDOW', self.cancel)		
		self.top.resizable (width=0, height=0)
开发者ID:kindlychung,项目名称:sk1,代码行数:55,代码来源:insertpagedlg.py

示例7: build_dlg

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import pack [as 别名]
	def build_dlg(self):
		root = self.top
		top = TFrame(root, style='FlatFrame', borderwidth=10)
		top.pack(side=TOP, fill=BOTH, expand=1)

		frame = TFrame(top, name='top', style='FlatFrame')
		frame.pack(side=TOP, fill=BOTH, expand=1)
		label = TLabel(frame, image='messagebox_' + self.image, style='FlatLabel')
		label.pack(side=LEFT, padx=5, pady=5)
		label = TLabel(frame, text=self.message, name='msg', style='FlatLabel', justify='center', anchor='center')
		label.pack(side=RIGHT, fill=BOTH, expand=1)

		frame = TFrame(top, name='bot', style='FlatFrame')
		frame.pack(side=BOTTOM)#, fill = X, expand = 1)

		command = self.ok
		for i in range(len(self.buttons)):
			button = UpdatedButton(frame, text='  ' + self.buttons[i] + '  ', command=command, args=i)
			button.grid(column=i, row=0, sticky='ew', padx=10, pady=0)
			if i == self.default:
				if TkVersion >= 8.0:
					button['default'] = 'active'
				self.focus_widget = button
			else:
				if TkVersion >= 8.0:
					button['default'] = 'normal'

		if self.default is not None:
			top.bind('<Return>', self.invoke_default)

		frame = TFrame(top, name='mid', style='FlatFrame', borderwidth=1)
		frame.pack(side=TOP, fill=X)

		root.resizable (width=0, height=0)
开发者ID:kindlychung,项目名称:sk1,代码行数:36,代码来源:sketchdlg.py

示例8: build_dlg

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import pack [as 别名]
	def build_dlg(self):		
		root = TFrame(self.top, style='FlatFrame', borderwidth = 10)
		root.pack(side = TOP, fill = BOTH, expand = 1)
	
		label = TLabel(root, text = '', style='FlatLabel', textvariable=info1)
		label.pack(side = TOP, anchor=W, pady=5)
		
		label = TLabel(root, text = '', style='FlatLabel', textvariable=info2)
		label.pack(side = TOP, anchor=W, pady=5)
		
		self.prgrs = TProgressbar(root, orient = 'horizontal', style='Horizontal.Progress',
								length = 450, value=10, variable=info3)
		self.prgrs.pack(side = TOP, anchor=W)

		self.top.protocol('WM_DELETE_WINDOW', self.cancel)		
		self.top.resizable (width=0, height=0)
开发者ID:kindlychung,项目名称:sk1,代码行数:18,代码来源:progressdialog.py

示例9: PluginBrowser

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import pack [as 别名]
class PluginBrowser(PluginPanel):

	name = 'PluginBrowser'
	title = _("Plugin Browser")
	icon = 'strip_pbrowser'

	built = 0
	fill = BOTH
	expand = 1

	def init(self, master):
		PluginPanel.init(self, master)
		top = self.panel
		ctheme = app.uimanager.currentColorTheme

		self.browserframe = TFrame(top, style='RoundedFrame', borderwidth=5)
		self.browserframe.pack(side=TOP, fill=BOTH, expand=1)
		self.scanvas = ScrolledCanvas(self.browserframe, bg=ctheme.editfieldbackground, height=150, width=170)
		self.scanvas.frame.pack(side=TOP, fill=BOTH, expand=1)
		self.after_idle(self.rebuild_pb)


	def rebuild_pb(self):
		self.build_plugins_tree()
		ctheme = app.uimanager.currentColorTheme
		item = PluginsTreeItem(self.ptree, self.pcontainer)
		node = TreeNode(self.scanvas.canvas, None, item, ctheme)
		node.expand()

	def build_plugins_tree(self):
		self.ptree = PluginCategory('ROOT', _("Plugins"))
		objprop_group = PluginCategory('ObjProp', _("Object properties"))
		layout_group = PluginCategory('Layout', _("Layout"))
		transform_group = PluginCategory('Transform', _("Transformation"))
		shaping_group = PluginCategory('Shaping', _("Shaping"))
		effects_group = PluginCategory('Effects', _("Effects"))
		extentions_group = PluginCategory('Extentions', _("Extensions"))

		objprop_group.contents = app.objprop_plugins
		layout_group.contents = app.layout_plugins
		transform_group.contents = app.transform_plugins
		shaping_group.contents = app.shaping_plugins
		effects_group.contents = app.effects_plugins
		extentions_group.contents = app.extentions_plugins

		self.ptree.contents += [objprop_group, layout_group, transform_group,
							shaping_group, effects_group, extentions_group]
开发者ID:kindlychung,项目名称:sk1,代码行数:49,代码来源:pbrowser.py

示例10: init

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import pack [as 别名]
	def init(self, master):
		PluginPanel.init(self, master)

		top = TFrame(self.panel, style='FlatFrame', borderwidth=5)
		top.pack(side=TOP, fill=BOTH)

		sign = TFrame(top, style='RoundedFrame', borderwidth=5)
		sign.pack(side=TOP)

		self.sign = TLabel(sign, image='effects_blend')
		self.sign.pack(side=TOP)

		button_frame = TFrame(top, style='FlatFrame')
		button_frame.pack(side=BOTTOM, fill=BOTH, expand=1)

		self.update_buttons = []
		button = UpdatedButton(top, text=_("Apply"),
								command=self.apply_blend,
								sensitivecb=self.doc_can_blend)
		button.pack(in_=button_frame, side=LEFT, expand=1, fill=X)
		self.document.Subscribe(SELECTION, button.Update)
		self.update_buttons.append(button)


		steps_frame = TFrame(top, style='FlatFrame', borderwidth=15)
		steps_frame.pack(side=TOP)
		label = TLabel(steps_frame, text="  " + _("Steps:") + " ")
		label.pack(side=LEFT, anchor=E)

		self.var_steps = IntVar(top)
		self.var_steps.set(config.preferences.blend_panel_default_steps)

		self.entry = TSpinbox(steps_frame, var=10, vartype=0, textvariable=self.var_steps,
									min=1, max=100000, step=1, width=6, command=self.apply_blend)
		self.entry.pack(side=LEFT, anchor=E)


		button = UpdatedButton(top, text=_("Select Start"),
								sensitivecb=self.can_select,
								command=self.select_control,
								args=SelectStart)
		button.pack(side=BOTTOM, fill=X, expand=1, pady=3)
		self.document.Subscribe(SELECTION, button.Update)
		self.update_buttons.append(button)

		button = UpdatedButton(top, text=_("Select End"),
								sensitivecb=self.can_select,
								command=self.select_control,
								args=SelectEnd)
		button.pack(side=BOTTOM, fill=X, expand=1)
		self.document.Subscribe(SELECTION, button.Update)
		self.update_buttons.append(button)

		self.init_from_doc()
		self.subscribe_receivers()
开发者ID:kindlychung,项目名称:sk1,代码行数:57,代码来源:blend_plugin.py

示例11: init

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import pack [as 别名]
	def init(self, master):
		PluginPanel.init(self, master)
		
		self.initial_color = self.default_color
		self.current_color = copy.copy(self.initial_color)

		top = TFrame(self.panel, style='FlatFrame', borderwidth=5)
		top.pack(side=TOP, fill=BOTH)

		self.selector = ColorSpaceSelector(top, self.refresh_widgets, self.current_color, self.sign)
		self.selector.pack(side=TOP, expand=1, fill=X)
		
		self.picker = ColorChooserWidget(top, self.refresh_widgets, self.current_color)
		self.picker.pack(side=TOP, expand=1, fill=X)	
		
		self.digitizer = ColorDigitizer(top, self.refresh_widgets, self.current_color)
		self.digitizer.pack(side=TOP, expand=1, fill=X)


		button = UpdatedButton(top, text=_("Apply"),
								command=self.apply_pattern,
								sensitivecb=self.is_selection)
		button.pack(side=BOTTOM, expand=1, fill=X)
		self.Subscribe(SELECTION, button.Update)
		
		button_frame = TFrame(top, style='FlatFrame', borderwidth=1)
		button_frame.pack(side=BOTTOM, fill=X, pady=5)
		
		button = TButton(button_frame, style='TSmallbutton', text=' ', image='small_colorpicker', command=self.copy_from)
		button.pack(side=LEFT)
		tooltips.AddDescription(button, _("Copy From..."))
		
		button = TButton(button_frame, style='TSmallbutton', text=' ', image='restore_color', command=self.restore_color)
		button.pack(side=LEFT, padx=5)
		tooltips.AddDescription(button, _("Restore color"))
		
		self.var_autoupdate = IntVar(top)
		self.var_autoupdate.set(1)
		
		self.autoupdate_check = TCheckbutton(button_frame, text=_("Auto Update"), variable=self.var_autoupdate,
											command=self.init_from_doc)
		self.autoupdate_check.pack(side=RIGHT, anchor=W, padx=10)

		self.init_from_doc()
		self.subscribe_receivers()
开发者ID:kindlychung,项目名称:sk1,代码行数:47,代码来源:fill_plugin.py

示例12: build_dlg

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import pack [as 别名]
	def build_dlg(self):
		root = self.top

		top = TFrame(root, borderwidth=5, style='FlatFrame')
		top.pack(side=TOP, expand=0, fill=BOTH)

		top2 = TFrame(top, style='FlatFrame')
		top2.pack(side=TOP, expand=0, fill=X)

		format_label = TLabel(top2, text=_('Style name:'), borderwidth=0)
		format_label.pack(side=LEFT, pady=3)

		self.entry_name = TEntrybox(top, command=self.ok, width=15)
		self.entry_name.pack(side=TOP, fill=X)

		top2 = TFrame(top, height=5, style='FlatFrame')
		top2.pack(side=TOP, expand=0, fill=X)

		prop_cont = TLabelframe(top, text=_('Style properties'), padding=10)
		prop_cont.pack(side=TOP, fill=X)

		properties = self.object.Properties()
		self.flags = {}
		for prop in property_names:
			type = property_types[prop]
			if type == FillProperty:
				state = self.object.has_fill and NORMAL or DISABLED
			elif type == LineProperty:
				state = self.object.has_line and NORMAL or DISABLED
			elif type == FontProperty:
				state = self.object.has_font and NORMAL or DISABLED
			else:
				# unknown property type!
				continue
			long, short = property_titles[prop]
			self.flags[prop] = var = IntVar(root)
			var.set(state == NORMAL)
			radio = TCheckbutton(prop_cont, text=long, state=state, variable=var)
			radio.pack(side=TOP, anchor=W)

		top2 = TFrame(top, height=3, style='FlatFrame')
		top2.pack(side=TOP, expand=0, fill=X)

		but_frame = Frame(top)
		but_frame.pack(side=TOP, fill=X)

		button = TButton(but_frame, text=_("Cancel"), command=self.cancel)
		button.pack(side=RIGHT, padx=5)
		button = TButton(but_frame, text=_("OK"), command=self.ok)
		button.pack(side=RIGHT, padx=5)

		root.resizable (width=0, height=0)

		self.entry_name.set_focus()
开发者ID:kindlychung,项目名称:sk1,代码行数:56,代码来源:styledlg.py

示例13: init

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import pack [as 别名]
	def init(self, master):
		PluginPanel.init(self, master)

		top = TFrame(self.panel, style='FlatFrame', borderwidth=5)
		top.pack(side = TOP, fill=BOTH)
		
		sign = TFrame(top, style='RoundedFrame', borderwidth=5)
		sign.pack(side = TOP)

		self.sign=TLabel(sign, image='messagebox_construct')
		self.sign.pack(side=TOP)

		button = UpdatedButton(top, text = _("Apply"),
								command = self.apply_action,
								sensitivecb = self.is_correct_selection)
		button.pack(side = BOTTOM, expand = 1, fill = X)
		self.Subscribe(SELECTION, button.Update)

		self.init_from_doc()
		self.subscribe_receivers()
开发者ID:kindlychung,项目名称:sk1,代码行数:22,代码来源:outline.py

示例14: init

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import pack [as 别名]
	def init(self, master):
		PluginPanel.init(self, master)

		top = TFrame(self.panel, style='FlatFrame', borderwidth=5)
		top.pack(side = TOP, fill=BOTH)
		
		sign = TFrame(top, style='RoundedFrame', borderwidth=5)
		sign.pack(side = TOP)

		self.sign=TLabel(sign, image='shaping_divide')
		self.sign.pack(side=TOP)

		button = UpdatedButton(top, text = _("Apply"),
								command = self.apply_action,
								sensitivecb = self.is_correct_selection)
		button.pack(side = BOTTOM, expand = 1, fill = X)
		self.Subscribe(SELECTION, button.Update)
		
		button_frame = TFrame(top, style='FlatFrame', borderwidth=1)
		button_frame.pack(side = BOTTOM, fill=X, pady=5)
				
		self.var_originals = IntVar(top)
		self.var_originals.set(1)
		
		self.autoupdate_check = TCheckbutton(button_frame, text = _("Leave originals"), 
											variable = self.var_originals)
		self.autoupdate_check.pack(side = LEFT, anchor=W, padx=10)

		self.init_from_doc()
		self.subscribe_receivers()
开发者ID:kindlychung,项目名称:sk1,代码行数:32,代码来源:divide.py

示例15: build_dlg

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import pack [as 别名]
	def build_dlg(self):
		root = TFrame(self.top, style='FlatFrame', borderwidth = 10)
		root.pack(side = TOP, fill = BOTH, expand = 1)

		middle = TFrame(root, style='FlatFrame', borderwidth = 5)
		middle.pack(side = TOP, fill = X, expand = 1)
	
		label = TLabel(middle, text = _("Go to page No.:")+" ", style='FlatLabel')
		label.pack(side = LEFT)
		self.pagenum_spin = TSpinbox(middle, var=app.mw.document.active_page+1, vartype=0, textvariable = self.pagenum,
						min = 1, max = len(app.mw.document.pages), step = 1, width = 6, command = self.ok)
		self.pagenum_spin.pack(side = LEFT)
		if len(app.mw.document.pages)==1:
			self.pagenum_spin.set_state('disabled')
			

		bottom = TFrame(root, style='FlatFrame', borderwidth = 5)
		bottom.pack(side = BOTTOM, fill = X, expand = 1)
		cancel = TButton(bottom, text=_("Cancel"), command=self.cancel)
		cancel.pack(side = RIGHT)

		label = TLabel(bottom, text = '  ', style='FlatLabel')
		label.pack(side = RIGHT)
		ok = TButton(bottom, text=_("OK"), command=self.ok)
		ok.pack(side = RIGHT)
		self.focus_widget = ok
		
		self.top.bind('<Escape>', self.cancel)
		self.top.protocol('WM_DELETE_WINDOW', self.cancel)		
		self.top.resizable (width=0, height=0)
开发者ID:kindlychung,项目名称:sk1,代码行数:32,代码来源:gotopagedlg.py


注:本文中的sk1sdk.libttk.TFrame.pack方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。