本文整理汇总了Python中sk1sdk.libttk.TLabel类的典型用法代码示例。如果您正苦于以下问题:Python TLabel类的具体用法?Python TLabel怎么用?Python TLabel使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了TLabel类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: 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)
示例2: __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)
示例3: 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()
示例4: create_balloon
def create_balloon(self, root):
self.root = root
self.balloon = Toplevel(self.root)
self.balloon.withdraw()
self.balloon.overrideredirect(1)
self.balloon["relief"] = 'flat'
label = TLabel(self.balloon, text='Tooltip', style='Tooltips')
label.pack(ipadx=2, ipady=2)
self.balloon_label = label
示例5: __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)
示例6: 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='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()
示例7: __init__
def __init__(self, parent, mainwindow):
self.parent = parent
self.mainwindow = mainwindow
self.doc = self.mainwindow.document
self.panel = TFrame(self.parent, name='ctxPanel', style='ToolBarFrame', borderwidth=2)
label = TLabel(self.panel, image="toolbar_left")
label.pack(side=LEFT)
self.initPanels()
self.mainwindow.Subscribe(DOCUMENT, self.doc_changed)
self.ReSubscribe()
self.changeContent(forPage)
示例8: build_dlg
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()
示例9: __init__
def __init__(self, parent):
CtxSubPanel.__init__(self, parent)
self.my_changes=0
self.var_unit = StringVar(self.mw.root)
self.var_unit.set(config.preferences.default_unit)
label = TLabel(self.panel, text=_("Units:"))
label.pack(side = LEFT, padx=2)
self.entry_width = TCombobox(self.panel, state='readonly', postcommand = self.applyUnits,
values=self.make_units(), width=4, style='ComboNormal', textvariable=self.var_unit)
self.entry_width.pack(side = LEFT, padx=2)
config.preferences.Subscribe(CHANGED, self.update)
示例10: __init__
def __init__(self, master, root, mw, cnf={}, **kw):
self.mw = mw
self.root = root
self.master = master
ResizableTFrame.__init__(self, master, root, size=240, orient=LEFT,
min=240, max=400)
b = TLabel(self.panel, style='HLine')
b.pack(side=BOTTOM, fill=X)
self.pbrowser = PluginBrowser()
self.plugins = app.objprop_plugins + app.layout_plugins
self.plugins += app.transform_plugins + app.extentions_plugins
self.plugins += app.effects_plugins + app.shaping_plugins
self.plugins += [self.pbrowser]
示例11: 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()
示例12: __init__
def __init__(self, parent):
self.receivers={}
self.parent=parent
self.mw=self.parent.mainwindow
self.doc=self.parent.mainwindow.document
self.panel=TFrame(parent.panel, style='FlatFrame', borderwidth=0)
self.separator = TLabel(self.panel, image = "toolbar_sep")
self.mw.Subscribe(DOCUMENT, self.doc_changed)
self.setNormal()
示例13: __init__
def __init__(self, parent):
self.my_changes=0
CtxSubPanel.__init__(self, parent)
self.var_jump_number=DoubleVar(self.mw.root)
unit = config.preferences.default_unit
var_jump_unit = StringVar(self.mw.root)
self.var_jump = LengthVar(10, unit, self.var_jump_number, var_jump_unit)
label = TLabel(self.panel, text=_("Jump:"))
label.pack(side = LEFT, padx=2)
self.entry_jump = TSpinbox(self.panel, var=0,
vartype=1, textvariable = self.var_jump_number,
min = 0, max = 1000, step = .1, width = 6, command = self.applyJump)
self.entry_jump.pack(side = LEFT, padx=2)
config.preferences.Subscribe(CHANGED, self.update)
self.var_jump.set(config.preferences.handle_jump)
self.update(0, 0)
示例14: 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
示例15: __init__
def __init__(self, parent):
CtxSubPanel.__init__(self, parent)
self.angle=DoubleVar(self.mw.root)
self.angle.set(0)
label = TLabel(self.panel, image='context_R')
label.pack(side = LEFT)
self.entry_width = TSpinbox(self.panel, var=0, vartype=1, textvariable = self.angle,
min = -360, max = 360, step = 1, width = 6, command = self.applyRotate)
tooltips.AddDescription(self.entry_width, _('Rotation angle'))
self.entry_width.pack(side = LEFT, padx=5)
b = TButton(self.panel, command=self.rotLeft, style='Toolbutton', image='context_rotate_ccw')
tooltips.AddDescription(b, _(u'Rotate -90°'))
b.pack(side = LEFT)
b = TButton(self.panel, command=self.rot180, style='Toolbutton', image='context_rotate')
tooltips.AddDescription(b, _(u'Rotate 180°'))
b.pack(side = LEFT)
b = TButton(self.panel, command=self.rotRight, style='Toolbutton', image='context_rotate_cw')
tooltips.AddDescription(b, _(u'Rotate 90°'))
b.pack(side = LEFT)