Datasheet

Part I: Getting Started
14
After you set AutoSize to False , you can resize the label object in the Source window by clicking the
white sizing boxes that appear on the ends and corners of the label object. In Figure 1 - 12 , I have increased
the width of the label by clicking the middle sizing box on the right edge of the label object and dragging
the edge to the right until I got the desired size. I then released the left mouse button to end up with the
label object shown in Figure 1 - 12 .
Figure 1 - 11
Figure 1 - 12
After you have set the size of the label object, you can change the text property of the label object to
whatever you want to appear in the label. In your example, you want the text My first program.
At the present time, the text property of the label object is
label1 . . . not what you want. Scroll the
contents of the Property window down to the
Text property for the label object and change it to
My first program and press the Enter key. Changing the Text property for the label object is shown
in Figure 1 - 13 . Notice how the first line below the Property window s title bar shows the name of the
object currently in focus in the Source window (
label1 in Figure 1 - 13 ).
ISBN: 978-0-470-26129-3 I Title: Beginning C# 3.0 : An Introduction to Object Oriented Programming I SKU: 9785CH0009874