Customizing the List's Appearance > Three-dimensional versus Flat Display |
True DBList supports a standard, "flat" control appearance, as well as the more attractive three-dimensional appearance used by many controls. By default, the list's Appearance property is set so that the 3-D look is used. However, this property only controls whether 3-D effects are used to draw the list's border, caption bars, column headings, and column footings. It does not affect the list's data cells or row and column dividers.
When Appearance is set to 1 - 3D, the list looks like this:
When Appearance is set to 0 - Flat, the list looks like this:
When Appearance is set to 2 - MixFlat, the scroll bars are 3D while the rest of the control is flat, the list looks like this:
To achieve a 3-D appearance for the entire list, including its interior, set the following properties at either design time or run time:
On the General property page, set the RowDividerStyle property to 4 - Inset. Or, in code:
Example Title |
Copy Code
|
---|---|
TDBList1.RowDividerStyle = dbgInset |
On the Splits property page, set the DividerStyle property to 4 - Inset for all members of the Columns collection of each split. Do not confuse this with the DividerStyle property of the Split object itself. Or, in code:
Example Title |
Copy Code
|
---|---|
Dim C As TrueDBList80.Column For Each C In TDBList1.Columns C.DividerStyle = dblInset Next |
On the General property page, set the BackColor property to gray. Or, in code:
Example Title |
Copy Code
|
---|---|
TDBList1.BackColor = &HC0C0C0 |
The resulting list will look something like this.
Note that changing the RowDividerStyle property from 0 - No dividers to 4 - Inset consumes extra vertical space in each data row, resulting in fewer visible rows.
You can experiment to achieve different 3-D effects using other color combinations and divider styles, as explained in the next section.