(variableName, parent)
| 100 | } |
| 101 | |
| 102 | generateCode(variableName, parent){ |
| 103 | // TODO: add orientation |
| 104 | |
| 105 | const config = this.getConfigCode() |
| 106 | |
| 107 | config["from_"] = this.getAttrValue("scale.min") |
| 108 | config["to"] = this.getAttrValue("scale.max") |
| 109 | config["number_of_steps"] = this.getAttrValue("scale.step") |
| 110 | |
| 111 | config["progress_color"] = `"${this.getAttrValue("styling.progressColor")}"` |
| 112 | |
| 113 | if (this.getAttrValue("orientation")){ |
| 114 | config["orientation"] = this.getAttrValue("orientation") |
| 115 | } |
| 116 | |
| 117 | const defaultValue = this.getAttrValue("scale.default") |
| 118 | |
| 119 | return [ |
| 120 | `${variableName}_var = ctk.DoubleVar(value=${defaultValue})`, |
| 121 | `${variableName} = ctk.CTkSlider(master=${parent}, variable=${variableName}_var)`, |
| 122 | `${variableName}.configure(${convertObjectToKeyValueString(config)})`, |
| 123 | `${variableName}.${this.getLayoutCode()}` |
| 124 | ] |
| 125 | } |
| 126 | |
| 127 | getToolbarAttrs(){ |
| 128 |
nothing calls this directly
no test coverage detected