Remove the pass line code and replace with the code listing listing
Chapter 5 ■ MIXING aND MINGLING WIth the CLr 85
it to True. If you do not set the Multiline property to True, you will be able to resize only the control’s width, and text cannot move down to a new line.
@accepts(Self(), System.Object, System.EventArgs)
@returns(None)
def _NotQuitePad_Load(self, sender, e):
pass
The IDE also wired an event for you that executes (or, in programmer lingo, fires) the _NotQuitePad_Load method when the form is loaded (Listing 5-3).
86 |
---|
When the form loads, we can programmatically set the height and width of the txtUserText control to be equal to the height and width of the window. Remove the pass line of code and replace it with the code in Listing 5-4.
Listing 5-4. Forcing the txtUserText Control to Be a Given Height and Width
A good first attempt at fixing this problem might come in the form of modifying the method that fires when the application is loaded to, say, “Hey, put this TextBox as far to the top and left as you can get it!” This should put things in the right location. Let’s do that right now. Modify your code to add the location definition shown in Listing 5-5 right after the size definition and rerun the application (Figure 5-7).