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

Function getConfigCode

src/frameworks/tkinter/widgets/label.js:131–158  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

129 }
130
131 getConfigCode(){
132 const config = super.getConfigCode()
133
134 const anchor = this.getAttrValue("styling.anchor")
135 const fitWidth = this.state.fitContent.width
136 const fitHeight = this.state.fitContent.height
137
138 const {width, height} = this.getSize()
139
140 const {layout} = this.getParentLayout()
141
142 if (anchor)
143 config['anchor'] = `"${anchor}"`
144
145 // LABEL width and height are not pixel based instead its character based
146 // if (layout !== Layouts.PLACE){
147 // if (!fitWidth){
148 // config['width'] = width
149 // }
150
151 // if (!fitHeight){
152 // config['height'] = height
153 // }
154 // }
155
156
157 return config
158 }
159
160 generateCode(variableName, parent){
161

Callers

nothing calls this directly

Calls 1

getConfigCodeMethod · 0.45

Tested by

no test coverage detected