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

Function constructor

src/frameworks/tkinter/widgets/mainWindow.js:18–51  ·  view source on GitHub ↗
(props)

Source from the content-addressed store, hash-verified

16 }
17
18 constructor(props) {
19 super(props)
20
21 this.droppableTags = {
22 exclude: ["image", "video", "media", "main_window", "toplevel"]
23 }
24
25 const newAttrs = removeKeyFromObject("margin", this.state.attrs)
26
27 this.state = {
28 ...this.state,
29 size: { width: MainWindow.initialSize.width, height: MainWindow.initialSize.height },
30 widgetName: "main",
31 attrs: {
32 ...newAttrs,
33 title: {
34 label: "Window Title",
35 tool: Tools.INPUT, // the tool to display, can be either HTML ELement or a constant string
36 toolProps: {placeholder: "Window title", maxLength: 40},
37 value: "Main Window",
38 onChange: (value) => this.setAttrValue("title", value)
39 },
40 logo: {
41 label: "Window Logo",
42 tool: Tools.UPLOADED_LIST,
43 toolProps: {filterOptions: ["image/jpg", "image/jpeg", "image/png"]},
44 value: "",
45 onChange: (value) => this.setAttrValue("logo", value)
46 }
47
48 }
49 }
50
51 }
52
53
54 // componentDidMount(){

Callers

nothing calls this directly

Calls 1

removeKeyFromObjectFunction · 0.90

Tested by

no test coverage detected