|
|
@@ -24,5 +24,12 @@ while True:
|
|
24
|
24
|
elif key == "CTRLD":
|
|
25
|
25
|
text = "Press CTRL+D to clear text\n\n"
|
|
26
|
26
|
else:
|
|
|
27
|
+ ## WRAPPING
|
|
|
28
|
+ ## calculate wrapping when entering a character
|
|
|
29
|
+ lines = text.split("\n")
|
|
|
30
|
+ current_line = lines[len(lines)-1]
|
|
|
31
|
+ if len(current_line) > 35:
|
|
|
32
|
+ text=text+"\n" # <- start a new line here
|
|
|
33
|
+ ##############################################
|
|
27
|
34
|
text = text+key
|
|
28
|
35
|
text_area.text = text
|