Modifying the appearance of the second DataWindow object

This exercise shows how you can modify the appearance of a free-form DataWindow object. You:

NoteColumns on freeform DataWindows Data fields on freeform DataWindow objects are still called columns, even though they are shown in a nontabular display.

Rearrange columns and labels

Rearrange the columns and labels in the new DataWindow object to customize its appearance. You can maximize the Design view for greater ease in manipulating the columns and their labels.

StepsTo rearrange the columns and labels:

  1. Click the Address: label in the Design view, press the Ctrl key, and click the address column.

    The Address label and column are selected.

  2. Keep the Ctrl key pressed and click the following column labels and columns:

    Label

    Column

    City:

    city

    State:

    state

    Zip Code:

    zip

    If necessary, scroll down until you can see all the columns in the DataWindow.

  3. Release the Ctrl key, position the cursor on one of the selected objects, and drag it to the top right corner of the DataWindow object.

    The objects move together.

  4. Use the Ctrl+click technique to move the following label and column controls to the location indicated:

    Label

    Move with column

    Move under

    Company Name:

    company_name

    Last Name:

    Phone Number:

    phone

    Company Name:

  5. Drag the Detail band up below the last column label.

    This removes any extra space in the detail area. Some of the fields might overlap others. You fix this in the next exercise.

Align columns and labels

Now align the columns and labels on the new DataWindow.

StepsTo align the columns and labels:

  1. Select the Zip Code: label in the Design view and move it as close as possible to the company_name column.

    A narrow space should separate the left edge of the label box from the right edge of the column box.

  2. While the Zip Code: label is still selected, use the Ctrl+click technique to select the Address:, City:, and State: labels.

  3. Select Format>Align from the menu bar.

    A cascading menu of align options displays.

  4. Select the first option (Align left edges).

    DataWindow Designer aligns the left edges of the selected objects with the left edge of the first item you selected (the Zip Code: label).

    NoteSelecting an alignment tool from the PainterBar You can access a drop-down list of alignment tools by clicking the Align button on PainterBar2.

  5. Move the zip column so that it is next to the Zip Code: label, and align the address, city, and state columns with the zip column just as you aligned the column labels.

    The image shows  the design view with the columns and labels realigned.

Display the arrow for a drop-down DataWindow edit style

In the previous screenshot, the column for the customer state of residence has a DropDownDataWindow edit style that uses the d_dddw_states drop-down DataWindow object you copied into your library in “Copying a DataWindow object into a library”.

You can make the state selection list visible at all times in your application, or you can display an arrow at all times to indicate that a selection list is available. Now you change the property for the state column to show the arrow at all times.

StepsTo display the arrow for a DropDownDataWindow edit style:

  1. Click the state column in the Design view and make sure the Properties view displays.

    The Properties view displays properties of the column.

  2. Click the Edit tab in the Properties view.

    You may need to click the arrow keys near the top of the Properties view to display the Edit tab before you can click it. Notice that the Style Type selection is DropDownDW.

  3. Select the Always Show Arrow check box.

    Make sure the state column in the Design view is wide enough to display two characters plus the arrow symbol. An arrow appears next to the state column in the Design and Preview views. While the column is selected in Design view, you can make the column wider by holding the cursor over the right edge of the column until the cursor symbol changes to a double-headed arrow, then dragging the edge toward the rightmost frame of the view.

    The Preview view should look like this:

    The image shows the preview view with columns and lables realigned as described above.
  4. Click the Save button in PainterBar1 and click the Close button in PainterBar1.