Make cosmetic changes to the DataWindow object

Now you can make cosmetic changes to the DataWindow. You change the font size and height of the columns and column headers and change the text of column headers. You also adjust the column width to make text display completely.

You make these changes in the Design view. You can keep the Preview view open at the same time to see how the changes you make affect the appearance of the DataWindow at runtime.

  1. Select Edit > Select > Select All from the menu bar

    or

    Press Ctrl+A.

    All of the controls in the DataWindow object are selected in the Design view.

  2. Select the Font page in the Properties view, and then select or type 12 from/in the Size list box.

    or

    Select or type 12 from/in the StyleBar.

    Figure 46. Font size property in StyleBar

    Font size property in StyleBar

    Using the StyleBar

    You can also use the StyleBar to change fonts, text alignment etc. If you do not see the StyleBar, select Tools > Toolbars from the menu bar, click StyleBar in the Select Toolbar list box, and then select one of the Move positions such as bottom or floating.

    This changes the character size to 12 for all texts in the d_customer DataWindow object.

  3. Click the Header band in the Design view.

    Type 120 in the Height text box on the General page in the Properties view.

    Select Sky in the Color list box on the Background page in the Properties view.

    This changes the height and the background color of the header row.

  4. Click the Detail band in the Design view.

    Type 120 in the Height text box on the General page in the Properties view.

    This changes the height of the detail row.

  5. Select the Id header above the Header band in the Design view.

    Type Customer ID in the Text box on the General page in the Properties view.

    or

    Type Customer ID in the first box in the StyleBar.

    Figure 47. Text property in StyleBar

    Text property in StyleBar


    This changes the text of the Id header to Customer ID.

    Use the same method to change the text of the Fname and Lname headers to First Name and Last Name.

  6. Hover over the right of the Customer ID header above the Header band in the Design view with your mouse pointer. When a plus sign with arrows indicating to drag right/left appears, drag the column to right or left to increase the column width, so that the text in the column display completely.

    Use the same method to adjust the width for other columns.

    When you have finished, the Design view should look something like this:

    Figure 48. Design view

    Design view


  7. Close the DataWindow painter by clicking the close button in PainterBar1. The close button is labeled with an x.

    Click Yes when you are prompted to save your changes.