ComponentOne List 8.0 for ActiveX
Switching Between Layout Types

If you define a design-time column layout, the list will not automatically change the layout at run time, as it assumes that you want total control of the display. The list considers you to have defined a design-time column layout if you chose the Retrieve Fields option from the list's context menu or modified any properties in either the Columns or Splits property pages.

You can clear the design-time layout by choosing the Clear Fields option of the list's context menu, or by invoking the list's ClearFields method in code:

Example Title
Copy Code
TDBList1.ClearFields ' Clear column layout

After this statement is executed, the list will again respond automatically to layout changes at run time.

Conversely, you can cancel the list's automatic layout behavior by invoking the list's HoldFields method in code:

Example Title
Copy Code
TDBList1.HoldFields ' Cancel automatic layout

After this statement is executed, the list will stop automatically changing the layout at run time, and uses the current column layout for all subsequent Recordset (Data control) display. This is especially useful if you need to refresh the data control the list is bound to while maintaining the current list layout.

By using the ClearFields and HoldFields methods, you can alternate the list's display between automatic layout and customized layout.

 

 


Copyright (c) GrapeCity, inc. All rights reserved.

Product Support Forum  |  Documentation Feedback