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


Python TFrame.columnconfigure方法代码示例

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


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

示例1: build_tab_license

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import columnconfigure [as 别名]
	def build_tab_license(self):
		panel = TFrame(self.root, style='FlatFrame', borderwidth=5)
		self.nb.add(panel, text=_('License'))

		subpanel = TFrame(panel, style='RoundedFrame', borderwidth=4)
		subpanel.grid(sticky=N + S + E + W)

		panel.rowconfigure(0, weight=1)
		panel.columnconfigure(0, weight=1)
		subpanel.rowconfigure(0, weight=1)
		subpanel.columnconfigure(0, weight=1)

		sb = TScrollbar(subpanel)
		sb.grid(row=0, column=1, sticky=N + S)

		text = Text(subpanel, highlightthickness=0,
				font=app.config.preferences.fixed_font, wrap=NONE)
		text.grid(row=0, column=0, sticky=N + S + E + W)

		text['yscrollcommand'] = sb.set
		sb['command'] = text.yview

		text['state'] = NORMAL
		import aboutdlg_lic
		txt = aboutdlg_lic.LICENSE
		text.insert(END, txt)
		text['state'] = DISABLED
开发者ID:kindlychung,项目名称:sk1,代码行数:29,代码来源:aboutdlg.py

示例2: build_tab_authors

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import columnconfigure [as 别名]
	def build_tab_authors(self):
		panel = TFrame(self.root, style='FlatFrame', borderwidth=5)
		self.nb.add(panel, text=_('Authors'))

		subpanel = TFrame(panel, style='RoundedFrame', borderwidth=4)
		subpanel.grid(sticky=N + S + E + W)

		panel.rowconfigure(0, weight=1)
		panel.columnconfigure(0, weight=1)
		subpanel.rowconfigure(0, weight=1)
		subpanel.columnconfigure(0, weight=1)

		sb = TScrollbar(subpanel)
		sb.grid(row=0, column=1, sticky=N + S)

		text = Text(subpanel, bg='white', highlightthickness=0, wrap=NONE)
		text.grid(row=0, column=0, sticky=N + S + E + W)

		text['yscrollcommand'] = sb.set
		sb['command'] = text.yview

		txt = _('\nTo report bugs please use project bugtracker: https://bugs.launchpad.net/sk1/\n\n')
		txt += _('Igor Novikov\n   [email protected]\n   Project Leader\n\n')
		txt += _('Maxim Barabash\n   [email protected]\n   Designer\n\n')
		txt += _('Acknowledgments:\n=======================================\n')
		txt += _('Valek Fillipov\n   CDR format reverse engineering\n\n')
		txt += _('Alexandre Prokoudine\n   [email protected]\n   Information support (http://linuxgraphics.ru)')
		text['state'] = NORMAL
		text.insert(END, txt)
		text['state'] = DISABLED
开发者ID:kindlychung,项目名称:sk1,代码行数:32,代码来源:aboutdlg.py

示例3: __init__

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

示例4: build_tab_localization

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import columnconfigure [as 别名]
	def build_tab_localization(self):
		panel = TFrame(self.root, style='FlatFrame', borderwidth=5)
		self.nb.add(panel, text=_('Localization'))

		subpanel = TFrame(panel, style='RoundedFrame', borderwidth=4)
		subpanel.grid(sticky=N + S + E + W)

		panel.rowconfigure(0, weight=1)
		panel.columnconfigure(0, weight=1)
		subpanel.rowconfigure(0, weight=1)
		subpanel.columnconfigure(0, weight=1)

		sb = TScrollbar(subpanel)
		sb.grid(row=0, column=1, sticky=N + S)

		text = Text(subpanel, bg='white', highlightthickness=0, wrap=NONE)
		text.grid(row=0, column=0, sticky=N + S + E + W)

		text['yscrollcommand'] = sb.set
		sb['command'] = text.yview

		text['state'] = NORMAL
		text.insert(END, TRANSLATORS)
		text['state'] = DISABLED
开发者ID:kindlychung,项目名称:sk1,代码行数:26,代码来源:aboutdlg.py

示例5: build_window

# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import columnconfigure [as 别名]

#.........这里部分代码省略.........

		hrule = tkruler.Ruler(frame, orient=tkruler.HORIZONTAL,
							  bg=config.preferences.ruler_color, relief='flat')

		hrule.grid(in_=frame, column=2, row=0, sticky='nsew', columnspan=2)
		hrule.bind('<Double-Button-1>', self.RulerDoublePressH)

		####################################

		vrule = tkruler.Ruler(frame, orient=tkruler.VERTICAL,
							  bg=config.preferences.ruler_color, relief='flat')

		vrule.grid(in_=frame, column=1, row=1, sticky='nsew', rowspan=2)
		vrule.bind('<Double-Button-1>', self.RulerDoublePressV)

		#ruler corner
		b = tkruler.RulerCorner(frame, bg=config.preferences.ruler_color)
		tooltips.AddDescription(b, _('Change system coordinates'))
		b.grid(column=1, row=0, sticky='news')

		resolution = config.preferences.screen_resolution
		self.canvas = SketchCanvas(root, toplevel=root, background='white', name='canvas',
				width=self.root.winfo_screenwidth(), height=self.root.winfo_screenheight(),
				resolution=resolution, main_window=self, document=self.document)

		self.canvas.grid(in_=frame, column=2, row=1, sticky='news')
		self.canvas.focus()
		self.canvas.SetScrollbars(hbar, vbar)
		self.canvas.SetRulers(hrule, vrule)

		vrule.SetCanvas(self.canvas)
		hrule.SetCanvas(self.canvas)

		frame.columnconfigure(0, weight=0)
		frame.columnconfigure(1, weight=0)
		frame.columnconfigure(2, weight=1)
		frame.columnconfigure(3, weight=0)
		frame.rowconfigure(0, weight=0)
		frame.rowconfigure(1, weight=1)
		frame.rowconfigure(2, weight=0)
		hbar['command'] = self.canvas._w + ' xview'
		vbar['command'] = self.canvas._w + ' yview'

		# the palette

		pal = palette.get_default_palette()

		palette_trough = TFrame(palette_frame, style='FlatFrame')
		palette_container = TFrame(palette_trough, style='FlatFrame')

		self.palette = palette.PaletteWidget(palette_container)
		self.palette.SetPalette(pal)
		ScrollXUnits = self.palette.ScrollXUnits
		ScrollXPages = self.palette.ScrollXPages
		CanScrollLeft = self.palette.CanScrollLeft
		CanScrollRight = self.palette.CanScrollRight

		but1 = UpdatedTButton(palette_frame, class_='Repeater', style='Pal2TopButton', image='pal_dbl_arrow_up',
					command=ScrollXPages, args=-1, sensitivecb=CanScrollLeft)
		but1.pack(side=TOP)
		but2 = UpdatedTButton(palette_frame, class_='Repeater', style='PalTopButton', image='pal_arrow_up',
					command=ScrollXUnits, args=-1, sensitivecb=CanScrollLeft)
		but2.pack(side=TOP)

		palette_trough.pack(side=TOP, fill=Y, expand=1)
开发者ID:kindlychung,项目名称:sk1,代码行数:69,代码来源:mainwindow.py


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