Getting To Know The Properties Window

Working in Visual Studio.Net IDE might seem abit tough for novices, who have just started programming, and areencountering such an awesome collection of tools and facilities. Itseems too much to handle at first, the screen loaded and sometimesoverloaded with all sorts of docking or pinned windows. But when we getto know what all these windows are for, and when and why they should beused, programming with them becomes fun and learning. So while thereare windows like Solution Explorer, Class View and Server Explorer toname a few, the focus of this article is the Property Window. You'llget to know what we do with it and what it can do for us. We'll havescreen shots to make things more illustrative.

Property Window loads with the start of VS.NETIDE. If you have just started using the IDE, and have not yet playedwith the placement of windows yourself, you should find it at bottomright of your screen as shown below.

In case of not finding the window theredoesn't mean that Microsoft forgot to add the Property Window to yourIDE. You can always get it by clicking a property window button whichis on top right of your IDE. This is one of the ways you can bring theProperty Window to front. This button should look like this.

Now that you have property window in front of you, let's discuss what's in it and why it is used.

We use Property Window to change or view theproperties of objects that we are working on at the time we aredesigning them. Suppose you are designing a Window Form which has, say,a text box and a label. You can have the size, layout, caption, fontand other such properties of the form, textbox, and label throughProperty Window, without having to go through a hell of a lot oftrouble writing complex codes to achieve this task. This is whereprogrammers who come from C or C++, and don't know VB feel the realease it brings to them.

Different options and properties displayed inthis window depend on the kind of object you are working on. You mayfind different buttons when working on different types of objects, sothe change should be obvious to you.

Right now, if you haven't opened any project,your Property Window should look like the one we have shown in thebeginning. It consists of:

Here, currently selected objects are listed.These objects have to be in your current editor or designer. If youselect more than one object, you'll be able to see the properties thatare common to all of them.

It lists all the properties of the selected object, by category. Itgives a tree view, where you have (+) and (-) to the left of thecategory name, and you can expand or collapse the category that youthink you don't need.

Arranges all properties of the object or even selected alphabetically.

It displays Property Pages, which are a subsetor a superset of the properties in the Property Window. You'll see itdisables here.

Shows type of property and a brief description of the property.

Apart from these, there are other functionalities which are specific to the type of object.

It displays the events for an object. This Properties window toolbarcontrol is only available when a form or control designer is active.

It lists all virtual functions for the selected class and allows you to add or delete overriding functions.

It lists all Windows messages and allows you to add or delete specifiedhandler functions for the messages provided for the selected class.

This is all I have to say about the PropertyWindow in Visual Studio.Net IDE. Though a few of these buttons mightnot be so clear to you, but this should give you an idea about what itdoes for us, and how can we utilize it.

Twitter Digg Delicious Stumbleupon Technorati Facebook Email

No comments yet... Be the first to leave a reply!