Home | History | Annotate | Download | only in lib-tk

Lines Matching refs:script

49 def _format_optvalue(value, script=False):
51 if script:
52 # if caller passes a Tcl script to tk.call, all the values need to
59 def _format_optdict(optdict, script=False, ignore=None):
62 E.g. (script=False):
71 opts.append(_format_optvalue(value, script))
78 # E.g. (script=False):
100 def _format_mapdict(mapdict, script=False):
103 E.g. (script=False):
113 _format_optvalue(_mapdict_values(value), script)))
117 def _format_elemcreate(etype, script=False, *args, **kw):
139 opts = _format_optdict(kw, script)
146 opts = (_format_optvalue(args[1], script),)
148 if script:
182 script = []
191 script.append(head + " -children {")
195 script.append(newscript)
197 script.append('%s}' % (' ' * indent))
199 script.append(head)
201 return '\n'.join(script), indent
204 """Returns an appropriate script, based on settings, according to
207 script = []
208 # a script will be generated according to settings passed, which
214 script.append("ttk::style configure %s %s;" % (name, s))
218 script.append("ttk::style map %s %s;" % (name, s))
225 script.append("ttk::style layout %s {\n%s\n}" % (name, s))
240 script.append("ttk::style element create %s %s %s %s" % (
243 return '\n'.join(script)
486 script = _script_from_settings(settings) if settings else ''
490 "-parent", parent, "-settings", script)
493 "-settings", script)
504 script = _script_from_settings(settings)
505 self.tk.call(self._name, "theme", "settings", themename, script)