12.12.2012 Views

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

Teach Yourself Borland C++ in 14 Days - portal

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

The <strong>C++</strong>Builder IDE Explored: Projects and Forms<br />

In many cases, the property editor for the property conta<strong>in</strong>s a list of items from which you<br />

can choose. Properties that have an enumeration or boolean value as their base data type fall<br />

<strong>in</strong>to this category. When you click on the Value column with this type of property editor,<br />

you will see a drop-down button on the right side of the Value column. Click<strong>in</strong>g this button<br />

will display the list of possible values.<br />

TIP<br />

If you double-click the Value column for this type of property, the<br />

property editor will cycle through the possible choices. To quickly<br />

change a bool property, for <strong>in</strong>stance, simply double-click its value.<br />

Because the only choices are true and false double-click<strong>in</strong>g the value<br />

has the effect of toggl<strong>in</strong>g the property’s value.<br />

If you look closely at the Object Inspector, you will see that some properties have a plus sign<br />

preced<strong>in</strong>g the property name. Properties that are sets and properties that are objects both have<br />

the plus sign <strong>in</strong> front of their names. The plus sign <strong>in</strong>dicates that the property node can be<br />

expanded to show the set or, <strong>in</strong> the case of properties that are objects, the properties of that<br />

object. To expand a node, double-click on the Property column for that property (on the<br />

property name) or choose Expand from the Object Inspector speed menu. To collapse the<br />

node, double-click on it aga<strong>in</strong> or choose Collapse from the Object Inspector speed menu.<br />

To see an example of a set, choose a form and then double-click on the BorderIcons property.<br />

The node expands and you see four boolean members of the set. You can turn on or off any<br />

of the four members as needed.<br />

In the case of properties that are objects (<strong>in</strong>stances of a VCL class), you have two choices <strong>in</strong><br />

edit<strong>in</strong>g the property. First, you can click on the Value column for the property and then click<br />

the button to the right side of the value. This button is <strong>in</strong>dicated by an ellipsis (…) on its face.<br />

Click<strong>in</strong>g this button will <strong>in</strong>voke the property editor for that particular control. For example,<br />

click on the Font property and then click the ellipsis button. The Choose Font dialog box is<br />

displayed so that you can select the font. The second way you can edit this type of property<br />

is by expand<strong>in</strong>g the property node. The property’s properties (yes, it’s true) will be displayed,<br />

and you can edit them just like any other property. Aga<strong>in</strong>, locate the Font property and<br />

double-click on it. The TFont properties will be displayed. You can now modify the font’s<br />

Height, Color, or Name properties.<br />

For some properties you can use only the ellipsis button as a means of edit<strong>in</strong>g the property.<br />

Earlier you used the Image component to select an icon for the Multiple program’s About box.<br />

As you found out then, the Image component’s Picture property can be changed only by<br />

<strong>in</strong>vok<strong>in</strong>g that property’s property editor. In that case, the property editor is the <strong>C++</strong>Builder<br />

Image Editor.<br />

203<br />

6

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!