Skip to content

Commit 2cc00f9

Browse files
committed
test old multiline text field
1 parent 71e9391 commit 2cc00f9

File tree

7 files changed

+64
-117
lines changed

7 files changed

+64
-117
lines changed

custom_tkinter.py

Lines changed: 0 additions & 38 deletions
This file was deleted.

json-schemas/schema2.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
{
22
"$schema": "http://json-schema.org/draft-04/schema#",
3-
"$id": "https://example.com/employee.schema.json",
43
"title": "Artikel",
54
"description": "Example of a json schema for an article",
65
"type": "object",
76
"additionalProperties": false,
87
"properties": {
9-
"namebla": {
10-
"description": "the name",
8+
"title": {
9+
"description": "the title",
1110
"type": "string"
1211
},
13-
"lastname": {
14-
"description": "the lastname",
12+
"description": {
13+
"description": "short description",
14+
"type": "string"
15+
},
16+
"author": {
17+
"description": "author name",
1518
"type": "string"
1619
}
1720
}

simple-git-editor.py

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,19 +189,29 @@ def show_json_dialog(self, json_data, schema, file_path):
189189
for nested_prop, nested_details in details['properties'].items():
190190
nested_label = ctk.CTkLabel(frame, text=nested_prop)
191191
nested_label.grid(row=nested_row, column=0, padx=10, pady=2)
192-
nested_text = ctk.CTkEntry(frame)
192+
nested_text = ctk.CTkEntry(frame, height=64)
193193
nested_text.insert(0, str(value.get(nested_prop, '')))
194194
nested_text.grid(row=nested_row, column=1, padx=10, pady=2, sticky='ew')
195+
# nested_text = tk.Text(dialog, height=3, wrap='word')
196+
# nested_text.insert('end', str(value))
197+
# nested_text.grid(row=row, column=1, padx=10, pady=5, sticky='ew')
195198
frame.grid_columnconfigure(1, weight=1)
196199
self.widget_references[f"{prop}.{nested_prop}"] = nested_text
197200
nested_row += 1
198201
else:
199-
text = ctk.CTkEntry(dialog)
202+
text = ctk.CTkEntry(dialog, height=64)
200203
text.insert(0, str(value))
201204
text.grid(row=row, column=1, padx=10, pady=5, sticky='ew')
205+
# text = tk.Text(dialog, height=3, wrap='word')
206+
# text.insert('end', str(value))
207+
# text.grid(row=row, column=1, padx=10, pady=5, sticky='ew')
202208
self.widget_references[prop] = text
203209

204210
row += 1
211+
212+
dialog.grid_rowconfigure(0, weight=1)
213+
dialog.grid_columnconfigure(1, weight=1)
214+
205215

206216
dialog.protocol("WM_DELETE_WINDOW", lambda: self.on_dialog_close(dialog, json_data, schema, file_path))
207217

@@ -224,6 +234,7 @@ def parse_input(data, schema_properties, parent=None):
224234

225235
if widget:
226236
input_value = widget.get()
237+
# input_value = widget.get("1.0", "end-1c")
227238

228239
# Convert input value to the correct type based on the schema
229240
if details.get('type') == 'number':

simple-git-editor.spec

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# -*- mode: python ; coding: utf-8 -*-
2+
3+
4+
a = Analysis(
5+
['simple-git-editor.py'],
6+
pathex=[],
7+
binaries=[],
8+
datas=[('.venv/Lib/site-packages/customtkinter', 'customtkinter/')],
9+
hiddenimports=[],
10+
hookspath=[],
11+
hooksconfig={},
12+
runtime_hooks=[],
13+
excludes=[],
14+
noarchive=False,
15+
)
16+
pyz = PYZ(a.pure)
17+
18+
exe = EXE(
19+
pyz,
20+
a.scripts,
21+
[],
22+
exclude_binaries=True,
23+
name='simple-git-editor',
24+
debug=False,
25+
bootloader_ignore_signals=False,
26+
strip=False,
27+
upx=True,
28+
console=False,
29+
disable_windowed_traceback=False,
30+
argv_emulation=False,
31+
target_arch=None,
32+
codesign_identity=None,
33+
entitlements_file=None,
34+
)
35+
coll = COLLECT(
36+
exe,
37+
a.binaries,
38+
a.datas,
39+
strip=False,
40+
upx=True,
41+
upx_exclude=[],
42+
name='simple-git-editor',
43+
)

test1.py

Lines changed: 0 additions & 16 deletions
This file was deleted.

test2.py

Lines changed: 0 additions & 15 deletions
This file was deleted.

test3.py

Lines changed: 0 additions & 41 deletions
This file was deleted.

0 commit comments

Comments
 (0)