Defining grid columns
Prev | Chapter 6. Forms | Next

## Defining grid columns

In Figure 6.6, “The defined form” you can see the result of our creation. Nice, but the columns in the grid show data we don't really need to see, such as the column "author". The "title" column is also too narrow and therefore, in certain circumstances, will not show the full title of the piece of literature.

Figure 6.6. The defined form

In this chapter you will learn how to modify the grid.

To define the visible columns, stay in the form's viewmode and press the right mouse button somewhere on the grid. Select "Define columns" from the pop-up menu. The "Column Select" dialog window is displayed. Select the "author" field in the right box and press the "left arrow" button between the two boxes. This will move the "author" field to the "Invisible Columns" box. Now press the "OK" button to confirm this action. As you can now see the "author" column has vanished.

Figure 6.7. The column selection dialog

### Important

Defining the gridcolumns is the only design job permitted in viewmode. You can only see the data and the columns in this mode. This operation is not possible in the form's "designmode". To save your changes, change back to "designmode" and save the form manually as we did previously ("Save" button or right mouse button -> store form).

Adjusting the width of the column is simpler. Move the mouse cursor to the end of the "title" column in the grid's header row. When you are at the right position the mouse cursor will change. Press the left mouse button and hold it. Now move the mouse. The column will get narrower or wider depending on the direction that you move the mouse.

To store your changes, swich to "designmode" and save the form manually (right mouse button -> store form).

Figure 6.8. The form with changed gridcolumns

Another feature in "viewmode" mode is the ability to alter the order of the columns. Click in the header of the column you want to move while pressing the <CTRL>-Button, press the left mouse button and hold it down whilst dragging the column to its new position, then release the button.

Prev | Up | Next
The property editor | Home | Defining comboboxes