MCPcopy Create free account
hub / github.com/PaulleDemon/PyUIBuilder / generateCode

Function generateCode

src/frameworks/tkinter/widgets/checkButton.js:66–83  ·  view source on GitHub ↗
(variableName, parent)

Source from the content-addressed store, hash-verified

64 }
65
66 generateCode(variableName, parent){
67
68 const labelText = this.getAttrValue("checkLabel")
69 const config = convertObjectToKeyValueString(this.getConfigCode())
70
71 const code = [
72 `${variableName} = tk.Checkbutton(master=${parent}, text="${labelText}")`,
73 `${variableName}.config(${config})`,
74 ]
75
76 if (this.getAttrValue("defaultChecked")){
77 code.push(`${variableName}.select()`)
78 }
79
80 code.push(`${variableName}.${this.getLayoutCode()}`)
81
82 return code
83 }
84
85 getToolbarAttrs(){
86

Callers

nothing calls this directly

Calls 2

getConfigCodeMethod · 0.45

Tested by

no test coverage detected