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


Python TFrame.__init__方法代码示例

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


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

示例1: __init__

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import __init__ [as 别名]
	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,代码行数:29,代码来源:pager.py

示例2: init

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import __init__ [as 别名]
	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,代码行数:34,代码来源:ppanel.py

示例3: __init__

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import __init__ [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

示例4: __init__

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import __init__ [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 __init__ [as 别名]
	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,代码行数:11,代码来源:doctabs.py

示例6: __init__

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import __init__ [as 别名]
	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,代码行数:19,代码来源:colorspacesel.py

示例7: init

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import __init__ [as 别名]
	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,代码行数:21,代码来源:prefpanel.py

示例8: __init__

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import __init__ [as 别名]
	def __init__(self, parent, anchor='C', command = None, **kw):
		TFrame.__init__(self, parent, style='FlatFrame', **kw)
		self.command = command
		self.anchor = anchor
		#---------------------------------------------------------
		# Basepoint check
		# NW -- N -- NE
		# |     |     |
		# W  -- C --  E
		# |     |     |
		# SW -- S -- SE
		#
		# USER - basepoint
		
		frame=TFrame(self, style='FlatFrame')
		frame.pack(side = TOP, fill = BOTH)
		
		radio = UpdatedRadiobutton(frame, value = 'NW',variable = self.anchor, command = self.command)
		radio.pack(side=LEFT, anchor=W)
		radio = UpdatedRadiobutton(frame, value = 'N', variable = self.anchor, command = self.command)
		radio.pack(side=LEFT, anchor=W)
		radio = UpdatedRadiobutton(frame, value = 'NE', variable = self.anchor, command = self.command)
		radio.pack(side=LEFT, anchor=W)
		
		frame=TFrame(self, style='FlatFrame')
		frame.pack(side = TOP, fill = BOTH)
		
		radio = UpdatedRadiobutton(frame, value = 'W', variable = self.anchor, command = self.command)
		radio.pack(side=LEFT, anchor=W)
		radio = UpdatedRadiobutton(frame, value = 'C', variable = self.anchor, command = self.command)
		radio.pack(side=LEFT, anchor=W)
		radio = UpdatedRadiobutton(frame, value = 'E', variable = self.anchor, command = self.command)
		radio.pack(side=LEFT, anchor=W)
		
		frame=TFrame(self, style='FlatFrame')
		frame.pack(side = TOP, fill = BOTH)
		
		radio = UpdatedRadiobutton(frame, value = 'SW', variable = self.anchor, command = self.command)
		radio.pack(side=LEFT, anchor=W)
		radio = UpdatedRadiobutton(frame, value = 'S',  variable = self.anchor, command = self.command)
		radio.pack(side=LEFT, anchor=W)
		radio = UpdatedRadiobutton(frame, value = 'SE', variable = self.anchor, command = self.command)
		radio.pack(side=LEFT, anchor=W)
开发者ID:kindlychung,项目名称:sk1,代码行数:45,代码来源:basepoint.py

示例9: __init__

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import __init__ [as 别名]
	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,代码行数:39,代码来源:resframe.py


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