本文整理汇总了Python中sk1sdk.libttk.TFrame.grid方法的典型用法代码示例。如果您正苦于以下问题:Python TFrame.grid方法的具体用法?Python TFrame.grid怎么用?Python TFrame.grid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sk1sdk.libttk.TFrame
的用法示例。
在下文中一共展示了TFrame.grid方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: build_tab_license
# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import grid [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
示例2: build_tab_authors
# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import grid [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
示例3: build_tab_localization
# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import grid [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
示例4: build_window
# 需要导入模块: from sk1sdk.libttk import TFrame [as 别名]
# 或者: from sk1sdk.libttk.TFrame import grid [as 别名]
def build_window(self):
root = self.application.root
# the menu
self.mbar = TFrame(root, name='menubar', style='MenuBarFrame', borderwidth=2)
self.mbar.pack(fill=X)
# the toolbar
self.tbar = TFrame(root, name='toolbar', style='ToolBarFrame', borderwidth=2)
self.tbar.pack(fill=X)
# the context panel
self.ctxpanel = ctxPanel.ContexPanel(root, self)
self.ctxpanel.panel.pack(fill=X)
b = ToolbarButton(self.ctxpanel.panel, self.commands.PCshowHide, image="show_side_panel")
tooltips.AddDescription(b, self.commands.PCshowHide.menu_name)
b.pack(side=RIGHT)
# the status bar
self.status_bar = TFrame(root, name='statusbar', style='FlatFrame')
self.status_bar.pack(side=BOTTOM, fill=X)
# the tools bar
self.tframe = TFrame(root, name='tools_frame', style='FlatFrame', borderwidth=2)
self.tframe.pack(side=LEFT, fill=Y)
# the palette
p_frame = TFrame(root, style='FlatFrame')
p_frame.pack(side='right', fill=Y)
palette_frame = TFrame(p_frame, style='FlatFrame')
palette_frame.pack(side='right', fill=Y, pady=5, padx=3)
b = TLabel(root, style='VLine2')
b.pack(side=RIGHT, fill=Y)
####################################
# Drawing area creating
####################################
pc_frame = TFrame(root, style='FlatFrame')
pc_frame.pack(side='right', fill=Y, expand=1)
self.pc = PluginContainer(pc_frame, self.root, self)
base_frame = TFrame(root, name='drawing_area_frame', style='FlatFrame')
base_frame.pack(side=LEFT, fill=BOTH, expand=1)
self.tabspanel = TabsPanel(base_frame, self)
self.tabspanel.pack(side=TOP, fill=X)
self.docmanager.Activate(self.tabspanel)
label = TLabel(base_frame, style='DrawingAreaBottom', image='space_5')
label.pack(side=BOTTOM, fill=X)
label = TLabel(base_frame, style='DrawingAreaLeft', image='space_5')
label.pack(side=LEFT, fill=Y, expand=1)
label = TLabel(base_frame, style='DrawingAreaRight', image='space_5')
label.pack(side=RIGHT, fill=Y, expand=1)
####################################
frame = TFrame(base_frame, name='canvas_frame', style='FlatFrame')
frame.pack(side=LEFT, fill=BOTH, expand=1)
vbar = TScrollbar(frame)
vbar.grid(in_=frame, column=3, row=1, sticky='ns')
vbar.bind('<Button-4>', self.ScrollUpCanvas)
vbar.bind('<Button-5>', self.ScrollDownCanvas)
############Pager###################
pframe = TFrame(frame, style='FlatFrame')
pframe.grid(in_=frame, column=2, row=2, sticky='ew')
lab = Pager(pframe, self)
lab.pack(side=LEFT, fill=Y)
####################################
hbar = TScrollbar(pframe, orient=HORIZONTAL)
hbar.pack(side=RIGHT, fill=X, expand=1)
hbar.bind('<Button-4>', self.ScrollLeftCanvas)
hbar.bind('<Button-5>', self.ScrollRightCanvas)
####################################
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
#.........这里部分代码省略.........