Skip to main content

TcxCustomGridTableController.MakeItemVisible(TcxCustomGridTableItem) Method

Makes a specific item visible.

Declaration

procedure MakeItemVisible(AItem: TcxCustomGridTableItem); virtual; abstract;

Parameters

Name Type
AItem TcxCustomGridTableItem

Remarks

In (Banded) Table Views, when the OptionsView.ColumnAutoWidth property is set to False, the total column width can be greater than the width of a View window. In this case, a horizontal scrollbar will appear thus enabling scrolling. To make a specific column visible, call the MakeItemVisible method and pass a required column object as a parameter. Columns can be obtained from the View’s Items collection.

In Card Views, MakeItemVisible just makes the currently focused record (card) visible.

The MakeFocusedItemVisible makes the focused item visible.

There are also another methods to scroll the View contents.

  • The Scroll method allows you to simulate user actions with scrollbars.

  • The TopRecordIndex property specifies the index of the topmost visible record and this enables scrolling.

  • The LeftPos property (available in (Banded) Table Views) allows you scroll horizontally by a specific amount of pixels.

These methods do not move focus when scrolling. To move focus to a specific item and record, use the FocusNextItem FocusNextRecord methods, and the TcxCustomGridTableItem.Focused and TcxCustomGridRecord.Focused properties.

In the following example, the tvCustomers View is scrolled to make the tvCustomersCity column visible:

tvCustomers.Controller.MakeItemVisible(tvCustomersCity);
See Also