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.

Work<strong>in</strong>g with the Form Designer and the Menu Designer<br />

The grid sett<strong>in</strong>gs can be modified via the Preferences page of the Environment Options dialog<br />

box. (I’ll discuss the Environment Options <strong>in</strong> detail on Day 10, “More on Projects.”) Here<br />

you can change the grid size or turn off the Snap to Grid feature. You can also turn the grid<br />

display on or off. When the grid display is off, the grid is still active (assum<strong>in</strong>g that Snap to<br />

Grid is on), but the dots mark<strong>in</strong>g grid po<strong>in</strong>ts are not drawn on the form.<br />

Select<strong>in</strong>g Components<br />

After you place a component on a form, you often have to select the component <strong>in</strong> order to<br />

modify it <strong>in</strong> some way. You may have to select a component <strong>in</strong> order to perform one of the<br />

follow<strong>in</strong>g actions:<br />

■ Move the component<br />

■ Change the component’s properties<br />

■ Align the component<br />

■ Size the component<br />

■ Cut or copy the component<br />

■ Order the component (br<strong>in</strong>g to front or move to back)<br />

■ Delete the component<br />

Select<strong>in</strong>g Individual Components<br />

To select a s<strong>in</strong>gle component, just click on it. When you select the component, eight black<br />

siz<strong>in</strong>g handles appear around the component to <strong>in</strong>dicate that it is selected. (I’ll discuss the<br />

siz<strong>in</strong>g handles <strong>in</strong> a moment.) Figure 7.1 shows a form with a button component selected.<br />

As soon as you select a component, the Object Inspector changes to show the properties and<br />

events for the control selected. To deselect a control, click on the form’s background or<br />

Shift+click on the control. (Shift+click is described <strong>in</strong> the next section.)<br />

TIP<br />

Each component has a default event handler associated with it. When<br />

you double-click a component on a form, the Code Editor displays the<br />

default event handler for that component, ready for you to type code.<br />

In most cases, the default event handler is the OnClick handler. Exactly<br />

what happens when the component is double-clicked depends on how<br />

the component is designed. For example, <strong>in</strong> the case of the Image<br />

component, double-click<strong>in</strong>g will display the Picture Editor dialog box.<br />

221<br />

7

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

Saved successfully!

Ooh no, something went wrong!