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

Class Frame

src/frameworks/tkinter/widgets/frame.js:8–194  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6
7
8class Frame extends TkinterBase{
9
10 static widgetType = "frame"
11 static displayName = "Frame"
12
13 constructor(props) {
14 super(props)
15
16 this.droppableTags = {
17 exclude: ["image", "video", "media", "toplevel", "main_window"]
18 }
19
20 this.state = {
21 ...this.state,
22 fitContent: {width: true, height: true},
23 widgetName: "Frame",
24 attrs: {
25 ...this.state.attrs,
26 padding: {
27 label: "padding",
28 padX: {
29 label: "Pad X",
30 tool: Tools.NUMBER_INPUT,
31 toolProps: {min: 0, max: 140},
32 value: null,
33 onChange: (value) => {
34 // this.setWidgetInnerStyle("paddingLeft", `${value}px`)
35 // this.setWidgetInnerStyle("paddingRight", `${value}px`)
36
37 // const widgetStyle = {
38
39 // }
40 this.setState((prevState) => ({
41
42 widgetInnerStyling: {
43 ...prevState.widgetInnerStyling,
44 paddingLeft: `${value}px`,
45 paddingRight: `${value}px`
46 }
47 }))
48
49
50 this.setAttrValue("padding.padX", value)
51 }
52 },
53 padY: {
54 label: "Pad Y",
55 tool: Tools.NUMBER_INPUT,
56 toolProps: {min: 0, max: 140},
57 value: null,
58 onChange: (value) => {
59
60 this.setState((prevState) => ({
61
62 widgetInnerStyling: {
63 ...prevState.widgetInnerStyling,
64 paddingTop: `${value}px`,
65 paddingBottom: `${value}px`

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected