by kirupa |
30 July 2006In the previous page, you
learned how to set up
your project. In this page, we will start to create
something that will get us closer towards the goal of creating an
application.
- The Design View allows you to add
content in much the same way you would in a program
such as Word or Notepad. Our Label object can be found
in the Toolbox. To display the Toolbox, you can either
go to View | Toolbox or hover over the Toolbox tab on
the left side of your Editor window:

[ display the
Toolbox by either using the View menu or the Toolbox tab ]
- From your Toolbox, double-click
on the Label component. Click the X on the top-right of
the Toolbox menu to hide it. You should now see a Label
component displayed on your page:

[ double-click on
the Label component from the Toolbox ]
- Make sure your Label component is
selected with your mouse cursor. With the component
selected, let's change the font style of the component
using the Formatting Toolbar:

[ you will use the
Formatting Toolbar to change the font style ]
Change the Font to Arial, set the Font Size to
48, and change the Foreground Color to a
Blue-ish shade. Your Label component should now
look similar to the following image:

[ how your Label
text should look like now ]
- So, we now customized the visible
properties of our Label. We now need to get ready to
change its text to say "hello, world". We will do that
on the server-side, but we need to check on a few things
first. With your Label selected, go to View |
Properties. The Properties panel should display:

[ the Properties
panel ]
- Scroll up in your Properties
panel until you hit the (ID) value. The Label's
(ID) value is Label1:

[ the (ID) value of
our Label component is Label1 ]
Select the Label1 property and change it
to lbl_HelloWorld:

[ change our
Label's (ID) value to lbl_HelloWorld ]
Adding the label is only one-half of the
solution. In the next page,
I will explain how to add some code that will interact with
this label.
Onwards to the
next page!
|