• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python libttk.TFrame类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: __init__

	def __init__(self, parent, mainwindow):
		self.parent=parent
		self.mainwindow=mainwindow
		TFrame.__init__(self, self.parent, name = 'pagerPanel', style='FlatFrame', borderwidth=0)
		top_border=TLabel(self, style='FlatLabel', image='space_1')
		top_border.pack(side=TOP, fill=X)
		
		self.container=TFrame(self, style='FlatFrame', borderwidth=0)

		space=TLabel(self.container, style='FlatLabel', image='space_3')
		space.pack(side=LEFT, fill=Y)
		self.home_but=TButton(self.container, style='PagerHome', command=self.PageHome)
		self.home_but.pack(side=LEFT)
		self.home_but=TButton(self.container, style='PagerPrevious', command=self.PagePrevious)
		self.home_but.pack(side=LEFT)
		self.text=TLabel(self.container, style='FlatLabel', text=' '+_('Page 2 of 2')+' ')
		self.text.pack(side=LEFT)
		self.home_but=TButton(self.container, style='PagerNext', command=self.PageNext)
		self.home_but.pack(side=LEFT)
		self.home_but=TButton(self.container, style='PagerEnd', command=self.PageEnd)
		self.home_but.pack(side=LEFT)
		space=TLabel(self.container, style='FlatLabel', image='space_3')
		space.pack(side=LEFT, fill=Y)
		self.mainwindow.Subscribe(DOCUMENT, self.Resubscribe)
		self.Resubscribe()
		self.doc_paged()
		self.text.bind('<Double-Button-1>', self.GoToPage)
开发者ID:kindlychung,项目名称:sk1,代码行数:27,代码来源:pager.py


示例2: build_dlg

	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,代码行数:25,代码来源:filedialog.py


示例3: init

	def init(self, master):
		self.master = master
		self.mw = app.mw
		self.pcontainer = self.master.master
		self.document = self.mw.document
		TFrame.__init__(self, self.master, style='FlatFrame', borderwidth=0)
		self.top = TFrame(self, style='PWinHead', borderwidth=3)
		self.panel = TFrame(self, style='PWinBody', borderwidth=3)
		self.activated = 1
		self.visible = 1
		self.packed = 1

		for item in self.pcontainer.loaded:
			if not item.collapsed:
				item.collapse_panel()

		self.pack(side=TOP, fill=self.fill, expand=self.expand, padx=1, pady=1)
		self.top.pack(side=TOP, fill=X)
		self.panel.pack(side=TOP, fill=BOTH, expand=1)

		self.iconlabel = TLabel(self.top, style='PWLabel', image=self.icon)
		self.textlabel = TLabel(self.top, style='PWLabel', text=self.title, anchor=W)
		if not 'bold' in self.textlabel['font'].split():
			self.textlabel['font'] += ' bold'
		self.closebut = TButton(self.top, style='PWButton', image='close_pw', command=self.close_panel)
		self.collapsebut = TButton(self.top, style='PWButton', image='minimize_pw', command=self.click)
		self.iconlabel.pack(side=LEFT, padx=2)
		self.textlabel.pack(side=LEFT, fill=BOTH, expand=1, padx=3)
		self.closebut.pack(side=RIGHT)
		self.collapsebut.pack(side=RIGHT)
		self.textlabel.bind("<Button-1>", self.click)
		self.mw.Subscribe(DOCUMENT, self.doc_changed)
开发者ID:kindlychung,项目名称:sk1,代码行数:32,代码来源:ppanel.py


示例4: __init__

	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,代码行数:8,代码来源:colorchooser.py


示例5: destroy

	def destroy(self):
		self.entry.unbind_all(self.entry)
		self.entry.destroy()
		self.button_frame.destroy()
		self.up_button.destroy()
		self.down_button.destroy()
		self.command = self.args = None
		TFrame.destroy(self)
开发者ID:kindlychung,项目名称:sk1,代码行数:8,代码来源:ttk_ext.py


示例6: __init__

	def __init__(self, parent, mainwindow):
		self.parent = parent
		self.mainwindow = mainwindow
		TFrame.__init__(self, self.parent, name='tabsPanel', style='FlatFrame',
					borderwidth=0)
		self.left_label = TLabel(self, style=LEFT_CORNER, image='space_3')
		self.right_label = TLabel(self, style=RIGHT_CORNER, image='space_3')
		self.stub_label = TLabel(self, style='DrawingAreaTop', image='space_5')
		self.stub_label.pack(side=TOP, fill=X)
开发者ID:kindlychung,项目名称:sk1,代码行数:9,代码来源:doctabs.py


示例7: build_dlg

	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,代码行数:30,代码来源:gotopagedlg.py


示例8: init

	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,代码行数:30,代码来源:divide.py


示例9: __init__

	def __init__(self, parent, callback, color=None, **kw):
		self.color = color
		self.parent = parent
		TFrame.__init__(self, parent, style='FlatFrame', **kw)
		self.rgb_digitizer = RGBDigitizer(self, callback)
		self.cmyk_digitizer = CMYKDigitizer(self, callback)
		self.spot_digitizer = SPOTDigitizer(self)
		self.empty_digitizer = EmptyDigitizer(self)
		self.current_digitizer = self.empty_digitizer
		self.current_digitizer.pack(side=LEFT)
		self.set_color(color)
开发者ID:kindlychung,项目名称:sk1,代码行数:11,代码来源:colordigitizer.py


示例10: __init__

class ScrolledCanvas:
	def __init__(self, master, **opts):
		if not opts.has_key('yscrollincrement'):
			opts['yscrollincrement'] = 20
		self.master = master		
		self.frame = TFrame(master, style="FlatFrame")
		self.frame.rowconfigure(0, weight=1)
		self.frame.columnconfigure(0, weight=1)
		self.canvas = Canvas(self.frame, **opts)
		self.canvas.grid(row=0, column=0, sticky="nsew")
		self.vbar = TScrollbar(self.frame, name="vbar")
		self.vbar.grid(row=0, column=1, sticky="nse")
		self.hbar = TScrollbar(self.frame, name="hbar", orient="horizontal")
		self.hbar.grid(row=1, column=0, sticky="ews")
		self.canvas['yscrollcommand'] = lambda f, l: self.scroll_sh(self.vbar, f, l)
		self.vbar['command'] = self.canvas.yview
		self.canvas['xscrollcommand'] = lambda f, l: self.scroll_sh(self.hbar, f, l)
		self.hbar['command'] = self.canvas.xview
		self.canvas.bind("<Key-Prior>", self.page_up)
		self.canvas.bind("<Key-Next>", self.page_down)
		self.canvas.bind("<Key-Up>", self.unit_up)
		self.canvas.bind("<Key-Down>", self.unit_down)
		self.canvas.bind("<Alt-Key-2>", self.zoom_height)
		self.canvas.bind("<Button-4>", self.unit_up)
		self.canvas.bind("<Button-5>", self.unit_down)
		self.canvas.focus_set()
	def page_up(self, event):
		self.canvas.yview_scroll(-1, "page")
		return "break"
	def page_down(self, event):
		self.canvas.yview_scroll(1, "page")
		return "break"
	def unit_up(self, event):
		first,last=self.vbar.get()
		if first <= 0 and last >= 1:
			return "break"
		self.canvas.yview_scroll(-1, "unit")
		return "break"
	def unit_down(self, event):
		first,last=self.vbar.get()
		if first <= 0 and last >= 1:
			return "break"
		self.canvas.yview_scroll(1, "unit")
		return "break"
	def zoom_height(self, event):
		return "break"
	def scroll_sh(self, scroll, first, last):
	    first, last = float(first), float(last)
	    if first <= 0 and last >= 1:
	        scroll.grid_remove()
	    else:
	        scroll.grid()
	    scroll.set(first, last)
开发者ID:kindlychung,项目名称:sk1,代码行数:53,代码来源:scrolledcanvas.py


示例11: build_dlg

	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,代码行数:16,代码来源:progressdialog.py


示例12: PluginBrowser

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,代码行数:47,代码来源:pbrowser.py


示例13: __init__

	def __init__(self, parent, callback, color, sign, allow_emtpy=1, **kw):
		self.color=color
		self.callback=callback
		TFrame.__init__(self, parent, style='FlatFrame', **kw)
		self.cs_name = StringVar(self)
		self.set_cs_name(self.color)
		
		self.colorspaces = TCombobox(self, state='readonly', postcommand = self.set_cs, 
									 values=self.make_cs_list(allow_emtpy), width=17, style='ComboNormal',
									 textvariable=self.cs_name)
		self.colorspaces.pack(side = BOTTOM, fill=X, pady=3)
		
		label = TLabel(self, text=_("Colorspace:")+" ")
		label.pack(side = LEFT, anchor='sw')
		
		label = TLabel(self, image=sign)
		label.pack(side = RIGHT)
开发者ID:kindlychung,项目名称:sk1,代码行数:17,代码来源:colorspacesel.py


示例14: init

	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)
开发者ID:kindlychung,项目名称:sk1,代码行数:10,代码来源:pbrowser.py


示例15: init

	def init(self, master):
		
		TFrame.__init__(self, master)
		
		##### Title #########################
		
		self.title_label=TLabel(self, text=self.title, font=config.preferences.large_font, justify=LEFT)
		self.title_label.pack(side=TOP, anchor=W)
		
		##### line #########################
				
		line = TLabel(self, style='HLine2')
		line.pack(side = TOP, fill = X)				

		##### here should be panel content #########################
		
		self.init_vars()		
		self.build()
		self.activated=1
开发者ID:kindlychung,项目名称:sk1,代码行数:19,代码来源:prefpanel.py


示例16: init

	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,代码行数:32,代码来源:csconverter_plugin.py


示例17: __init__

	def __init__(self, parent, toplevel, size=300, orient=LEFT, min=200, max=500, cnf={}, **kw):
		TFrame.__init__(self, parent, style='FlatFrame', **kw)
		self.parent = parent
		self.panel = TFrame(self, style='FlatFrame')
		self.orient = orient
		self.min = min
		self.max = max
		self.size = size
		self.toplevel = toplevel
		self.canv_size = 0
		self.counter = 0

		if orient in [LEFT, RIGHT]:
			self.spacer = Frame(self, width=size, height=1)
			self.grip = TButton(self, style='VGrip', cursor=appconst.CurHResize)
			if orient == LEFT:
				self.spacer.pack(side=TOP)
				self.grip.pack(side=LEFT, fill=Y)
				self.panel.pack(side=RIGHT, fill=BOTH, expand=1)
			else:
				self.spacer.pack(side=TOP)
				self.grip.pack(side=RIGHT, fill=Y)
				self.panel.pack(side=LEFT, fill=BOTH, expand=1)
		else:
			self.spacer = Frame(self, width=1, height=size)
			self.grip = TButton(self, style='HGrip', cursor=appconst.CurVResize)
			if orient == BOTTOM:
				self.grip.pack(side=BOTTOM, fill=X)
				self.spacer.pack(side=RIGHT)
				self.panel.pack(side=LEFT, fill=BOTH, expand=1)
			else:
				self.grip.pack(side=TOP, fill=X)
				self.spacer.pack(side=RIGHT)
				self.panel.pack(side=LEFT, fill=BOTH, expand=1)

		self.grip.bind ("<Button-1>", self.start)
		self.grip.bind ("<ButtonRelease-1>", self.stop)
开发者ID:kindlychung,项目名称:sk1,代码行数:37,代码来源:resframe.py


示例18: build_dlg

	def build_dlg(self):

		root = self.top
		top = TFrame(root, style='FlatFrame', borderwidth=13)
		top.pack(side=TOP)

		label = TLabel(top, text=_("Please select the object categories whose\n default properties you want to change"))
		label.pack(side=TOP, anchor=W)
		frame = TFrame(top, style='FlatFrame', borderwidth=10)
		frame.pack(side=TOP)
		self.var_graphics_style = IntVar(top)
		self.var_graphics_style.set(0)
		if self.category != 'font':
			self.var_graphics_style.set(1)
		button = TCheckbutton(frame, text=_("Graphics Objects"), state=(self.category == 'font' and DISABLED or NORMAL), variable=self.var_graphics_style)
		button.pack(side=TOP, anchor=W)
		self.var_text_style = IntVar(top)
		self.var_text_style.set(0)
		if self.category == 'font':
			self.var_text_style.set(1)
		button = TCheckbutton(frame, text=_("Text Objects"), state=(self.category == 'line' and DISABLED or NORMAL), variable=self.var_text_style)
		button.pack(side=TOP, anchor=W)

		label = TLabel(top, style="HLine")
		label.pack(side=TOP, fill=BOTH)

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

		button = TButton(but_frame, text=_("Cancel"), command=self.cancel)
		button.pack(side=RIGHT, expand=1)

		button = TButton(but_frame, text=_("OK"), command=self.ok)
		button.pack(side=RIGHT, expand=1)


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


示例19: __init__

	def __init__(self, master=None, min=0, max=100, step=1, textvariable=None, var=0, vartype=0, 
				command=None, state=NORMAL, width=5, args=(), **kw):
		'''vartype=0 - integer   vartype=1 - float '''
		self.min_value=min
		self.max_value=max
		self.step=step
		self.variable=var
		self.vartype=vartype
		if textvariable:
			self.text_var=textvariable
		else:
			self.text_var=StringVar()
		self.command=command
		self.state=state
		self.width=width
		apply(TFrame.__init__, (self, master), kw)
		self["style"]="FlatFrame"
		self.entry=TEntryExt(self, textvariable=self.text_var, width=self.width, style='SpinEntry')
		self.entry.pack(side = LEFT, expand = 1, fill = BOTH)
		self.button_frame=TFrame(self,style="FlatFrame")
		self.button_frame.pack(side = LEFT,fill = Y)
		self.up_button=TButton(self.button_frame, class_='Repeater', command=self.increase, 
							image='pal_arrow_up', style='SpinUpButton', takefocus=0)
		self.up_button.pack(side = TOP)
		self.down_button=TButton(self.button_frame, class_='Repeater', command=self.decrease,
							image='pal_arrow_down', style='SpinDownButton', takefocus=0)
		self.down_button.pack(side = TOP)
		if self.vartype==1: 
			self.variable=float(self.variable)
		else:
			self.variable=int(self.variable)
		self.text_var.set(str(self.variable))
		self.entry.bind('<Button-4>', self.wheel_increase)
		self.entry.bind('<Button-5>', self.wheel_decrease)
		self.entry.bind('<Key-Up>', self.wheel_increase)
		self.entry.bind('<Key-Down>', self.wheel_decrease)
		self.entry.bind('<Key-Return>', self.apply_command)
		self.entry.bind('<Key-KP_Enter>', self.apply_command)
开发者ID:kindlychung,项目名称:sk1,代码行数:38,代码来源:ttk_ext.py


示例20: init

	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,代码行数:45,代码来源:fill_plugin.py



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python libttk.TLabel类代码示例发布时间:2022-05-27
下一篇:
Python events.emit函数代码示例发布时间:2022-05-27
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap