bug fixes related to code generation

This commit is contained in:
paul
2024-09-30 15:30:46 +05:30
parent c39960348d
commit b8bd0c74a6
14 changed files with 98 additions and 36 deletions

View File

@@ -84,7 +84,7 @@ class AnalogTimePicker extends TkinterBase{
handleColor: {
label: "Handle Color",
tool: Tools.COLOR_PICKER, // the tool to display, can be either HTML ELement or a constant string
value: "#000000c0",
value: "#000000",
onChange: (value) => {
this.setAttrValue("styling.handleColor", value)
}
@@ -178,7 +178,7 @@ class AnalogTimePicker extends TkinterBase{
const handleColor = this.getAttrValue("styling.handleColor")
const code = [
`${variableName} = AnalogPicker(master=${parent}, type=${mode===12 ? "constants.HOURS12" : "constants.HOURS24"})`,
`${variableName} = AnalogPicker(parent=${parent}, type=${mode===12 ? "constants.HOURS12" : "constants.HOURS24"})`,
]
if (theme){
@@ -198,7 +198,7 @@ class AnalogTimePicker extends TkinterBase{
"canvas_bg": `"${bgColor}"`,
"textcolor": `"${numColor}"`,
"bg": `"${clockColor}"`,
"handlecolor": `"${handleColor}"`,
"handcolor": `"${handleColor}"`,
"headcolor": `"${handleColor}"`
}

View File

@@ -157,7 +157,10 @@ class PandasTable extends TkinterBase{
const enableEdit = this.getAttrValue("enableEdit")
const code = [
`${variableName} = Table(master=${parent})`,
`${variableName}_table_frame = tk.Frame(master=${parent})`,
`${variableName}_table_frame.${this.getLayoutCode()}`,
`${variableName} = Table(parent=${variableName}_table_frame)`,
`${variableName}.editable = ${enableEdit ? "True" : "False"}`,
]
@@ -179,7 +182,6 @@ class PandasTable extends TkinterBase{
return [
...code,
`${variableName}.show()`,
`${variableName}.${this.getLayoutCode()}`
]
}