@@ -43,7 +43,7 @@ def ok(cls):
4343 cls .resultLabel .text = "You are a %s called %s." % (cls .raceField .text , cls .nameField .text )
4444
4545 @classmethod
46- def insertText (cls ):
46+ def appendText (cls ):
4747
4848 cls .lineCtr += 1
4949 line : str = f"Line { cls .lineCtr } { TextBox .LINE_SEPARATOR } "
@@ -53,25 +53,37 @@ def insertText(cls):
5353 cls .textBox .setText (oldLines )
5454
5555 @classmethod
56- def deleteText (cls ):
56+ def insertText (cls ):
57+ cls .lineCtr += 1
58+ line : str = f'Line { cls .lineCtr } '
59+ cls .textBox .insertText (theNewLine = line )
60+
61+ @classmethod
62+ def clearText (cls ):
5763
5864 cls .textBox .clearText ()
5965 cls .lineCtr = 0
6066
67+ @classmethod
68+ def deleteText (cls ):
69+ cls .textBox .deleteText (2 )
70+
6171 @classmethod
6272 def makeTextBoxTesterContainer (cls ) -> Row :
6373
64- cls .textBox = TextBox (theNumberOfColumns = 32 , theNumberOfRows = 6 )
74+ cls .textBox = TextBox (theNumberOfColumns = 20 , theNumberOfRows = 10 )
6575
6676 checkBoxRow : Row = Row ([CheckBox (), Label ('Last Line Visible' )])
6777
68- insTextButton : Button = Button ('Insert' , action = cls .insertText )
69- delTextButton : Button = Button ('Clear ' , action = cls .deleteText )
78+ appendTextButton : Button = Button ('Append' , action = cls .appendText )
79+ insertTextButton : Button = Button ('Insert' , action = cls .insertText )
80+ deleteTextButton : Button = Button ('Delete' , action = cls .deleteText )
81+ clearTextButton : Button = Button ('Clear ' , action = cls .clearText )
7082
7183 contentAttrs = {
7284 "align" : "l"
7385 }
74- buttHolder : Column = Column ([insTextButton , delTextButton ], ** contentAttrs )
86+ buttHolder : Column = Column ([appendTextButton , insertTextButton , deleteTextButton , clearTextButton ], ** contentAttrs )
7587 textBoxControlHolder : Column = Column ([checkBoxRow , buttHolder ], ** contentAttrs )
7688
7789 container : Row = Row ([cls .textBox , textBoxControlHolder ])
0 commit comments