[Overview][Constants][Types][Classes][Index] Reference for unit 'ComCtrls' (#lcl)

TCustomListView

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TCustomListView - the base class for TListView

Declaration

Source position: comctrls.pp line 1322

type TCustomListView = class(TWinControl)

protected

  procedure ItemDeleted();

  

ItemDeleted - the specified listitem is removed from the list

  procedure ItemInserted();

  

ItemInserted - the specified item is inserted into the list

  class procedure WSRegisterClass; override;

  

Registers this component class with the current WidgetSet.

  class function GetControlClassDefaultSize; override;

  procedure InitializeWnd; override;

  

InitializeWnd - calls inherited method, then sets various local properties

  procedure FinalizeWnd; override;

  

FinalizeWnd stores the list origin then calls inherited method

  procedure DestroyWnd; override;

  

Destroys the interface object (widget).

  procedure BeginAutoDrag; override;

  

For internal use: user has started dragging the control.

  function CreateListItem; virtual;

  function CreateListItems; virtual;

  function CanEdit(); virtual;

  procedure Change(); virtual;

  

Change - Internal procedure to simulate the OnChange event

  procedure ColClick(); virtual;

  

ColClick - procedure to simulate the OnColumnClick event.

  procedure Delete();

  

Delete an Item from the List

  procedure DoDeletion(); virtual;

  

DoDeletion - performs the actual deletion

  procedure DoInsert(); virtual;

  

Performs the insertion

  procedure DoItemChecked();

  procedure DoSelectItem(); virtual;

  

DoSelectItem - perform item selection

  procedure DoSetBounds(); override;

  procedure DoEndEdit(); virtual;

  procedure InsertItem();

  

Insert an Item into the List

  procedure ImageChanged();

  

ImageChanged - procedure to signal that an image has chnaged

  procedure Loaded; override;

  

Called when the control has been loaded from a resource, transfers the loaded property values to the widget.

  procedure Notification(); override;

  procedure Sort;

  

  function IsCustomDrawn(); virtual;

  

IsCustomDrawn - returns True if a target has been custom drawn

  function CustomDraw(); virtual;

  

CustomDraw - performs custom drawing in the given rectangle, and returns True if successful

  function CustomDrawItem(); virtual;

  

CustomDrawItem - custom draws the specified item, and returns True if successful

  function CustomDrawSubItem(); virtual;

  

CustomDrawSubItem - custom draws the specified subitem, returning True if successful

  function IntfCustomDraw();

  

IntfCustomDraw - uses the interface to perform custom drawing and returns a result of drawing

  function GetUpdateCount;

  procedure DrawItem();

  procedure DoGetOwnerData(); virtual;

  function DoOwnerDataHint(); virtual;

  function DoOwnerDataStateChange(); virtual;

  procedure DblClick; override;

  procedure KeyDown(); override;

  property AllocBy: Integer; [rw]

  

AllocBy - allocate the list by a value

  property AutoSort: Boolean; [rw]

  property AutoWidthLastColumn: Boolean; [rw]

  property ColumnClick: Boolean; [rw]

  

ColumnClick - determines if the OnColumnClick event will be executed.

  property Columns: TListColumns; [rw]

  

Columns - define and change the columns of a ListView

  property DefaultItemHeight: Integer; [rw]

  

DefaultItemHeight - sets or reads the default height for an item on the list

  property HideSelection: Boolean; [rw]

  

HideSelection - if True, the selected item is to be hidden

  property HoverTime: Integer; [rw]

  

HoverTime - the time for which the mouse must hover over the item before its help message is displayed

  property LargeImages: TCustomImageList; [rw]

  

LargeImages - an ImageList to be used in association with the list of Items

  property OwnerDraw: Boolean; [rw]

  

OwnerDraw - if True, the Owner's Draw method is to be used

  property ScrollBars: TScrollStyle; [rw]

  

ScrollBars - the kind of scrollbars to be used: none, auto, horizontal or vertical

  property ShowColumnHeaders: Boolean; [rw]

  

ShowColumnHeaders - whether headers for columns are to be displayed

  property ShowWorkAreas: Boolean; [rw]

  

ShowWorkAreas - if True, the work areas are to be displayed

  property SmallImages: TCustomImageList; [rw]

  

SmallImages - an ImageList of small images (icons) to be used in association with the list of Items

  property SortType: TSortType; [rw]

  

SortType - whether to sort by text, by data, both or not at all

  property SortColumn: Integer; [rw]

  

SortColumn - the column that is being sorted

  property SortDirection: TSortDirection; [rw]

  property StateImages: TCustomImageList; [rw]

  

StateImages - an imagelist of icons to demonstrate the state of a process or event

  property ToolTips: Boolean; [rw]

  

ToolTips - whether Popup tool tips are to be shown

  property ViewStyle: TViewStyle; [rw]

  

ViewStyle - whether to view as a simple list, a list with large or small icons, or as a report

  property OnChange: TLVChangeEvent; [rw]

  

OnChange - event handler for a change in the list

  property OnColumnClick: TLVColumnClickEvent; [rw]

  

OnColumnClick - event handler for clicking on a coulmn

  property OnCompare: TLVCompareEvent; [rw]

  

OnCompare - event handler for comparing list items

  property OnCreateItemClass: TLVCreateItemClassEvent; [rw]

  property OnData: TLVDataEvent; [rw]

  property OnDataFind: TLVDataFindEvent; [rw]

  property OnDataHint: TLVDataHintEvent; [rw]

  property OnDataStateChange: TLVDataStateChangeEvent; [rw]

  property OnDeletion: TLVDeletedEvent; [rw]

  

OnDeletion - event handler for deleting a list item

  property OnEdited: TLVEditedEvent; [rw]

  property OnEditing: TLVEditingEvent; [rw]

  property OnInsert: TLVInsertEvent; [rw]

  

OnInsert - event handler for inserting list item

  property OnItemChecked: TLVCheckedItemEvent; [rw]

  property OnSelectItem: TLVSelectItemEvent; [rw]

  

OnSelectItem - event handler for list item selection

  property OnCustomDraw: TLVCustomDrawEvent; [rw]

  

OnCustomDraw - event handler for custom drawing

  property OnCustomDrawItem: TLVCustomDrawItemEvent; [rw]

  

OnCustomDrawItem - event handler for custom drawing an item

  property OnCustomDrawSubItem: TLVCustomDrawSubItemEvent; [rw]

  

OnCustomDrawSubItem - event handler for custom drawing a subitem

  property OnDrawItem: TLVDrawItemEvent; [rw]

  property OnAdvancedCustomDraw: TLVAdvancedCustomDrawEvent; [rw]

  

OnAdvancedCustomDraw - event handler for advanced custom drawing

  property OnAdvancedCustomDrawItem: TLVAdvancedCustomDrawItemEvent; [rw]

  

OnAdvancedCustomDrawItem - event handler for advanced custom drawing item

  property OnAdvancedCustomDrawSubItem: TLVAdvancedCustomDrawSubItemEvent; [rw]

  

OnAdvancedCustomDrawSubItem - event handler for advanced custom drawing subitem

public

  constructor Create(); override;

  

Create - constructor for TCustomListView: calls inherited Create then initialises columns, the list of items, the canvas and properties and some formats and styles

  destructor Destroy; override;

  

Destroy - destructor for TCustomListView: frees Canvas, calls inherited Destroy and frees columns, links and list items

  procedure AddItem();

  function AlphaSort;

  procedure BeginUpdate;

  

BeginUpdate - start updating the list view

  procedure Clear;

  

Clear - the stringlist

  procedure EndUpdate;

  

EndUpdate - finish updating the list view

  procedure Repaint; override;

  function FindCaption();

  

FindCaption- search for and return the list item that contains the nominated caption

  function FindData();

  function GetHitTestInfoAt();

  function GetItemAt();

  

GetItemAt - find and return the list item at the specified coordinates

  function GetNearestItem();

  function GetNextItem();

  procedure ClearSelection;

  procedure SelectAll;

  function IsEditing;

  property BoundingRect: TRect; [r]

  

BoundingRect - the coordinates of the rectangle containing the ListView

  property BorderStyle: TBorderStyle;

  

Allows to show a border (line) around the control,

  property Canvas: TCanvas; [r]

  

Canvas - defines the area on which all graphic material is drawn (Read-only)

  property Checkboxes: Boolean; [rw]

  

CheckBoxes - determines if the ListView shows checkboxes beside the items on the list

  property Column: TListColumn; [r]

  

Column - reads the column information of the listview.

  property ColumnCount: Integer; [r]

  property DropTarget: TListItem; [rw]

  

DropTarget - location where an item from the list is to be dropped

  property FlatScrollBars: Boolean; [rw]

  

FlatScrollBars - whether the scroll bars are to be displayed flat (default False)

  property FullDrag: Boolean; [rw]

  

FullDrag - if True, the full object is dragged

  property GridLines: Boolean; [rw]

  

Whether GridLines are to be shown

  property HotTrack: Boolean; [rw]

  

HotTrack - the property whereby the item under the mouse pointer becomes emphasised

  property HotTrackStyles: TListHotTrackStyles; [rw]

  

The HotTrackStyles available for this control

  property IconOptions: TIconOptions; [rw]

  property ItemFocused: TListItem; [rw]

  

ItemFocused - the item currently receiving focus

  property ItemIndex: Integer; [rw]

  property Items: TListItems; [rw]

  

Items - the list of entries in the list. Held as a linked list with a cached index of the last accessed item

  property MultiSelect: Boolean; [rw]

  

MultiSelect - enables the selection of more than one entry from Items - by pressing SHIFT or CTRL keys while selecting

  property OwnerData: Boolean; [rw]

  

OwnerData - if True, the Owner's data are to be displayed

  property ReadOnly: Boolean; [rw]

  

ReadOnly - determines if the list can only be read, and not written or deleted.

  property RowSelect: Boolean; [rw]

  

RowSelect - whether the user can select rows of items (across columns). Default false

  property SelCount: Integer; [r]

  

SelCount - the number of items selected

  property Selected: TListItem; [rw]

  

Selected - the current list item that has been selected

  property TabStop: Boolean;

  

Allows the user to navigate to this control, by pressing the Tab key.

  property TopItem: TListItem; [r]

  

TopItem - the first item on the list

  property ViewOrigin: TPoint; [rw]

  

ViewOrigin - the top left coordinate for the current view

  property VisibleRowCount: Integer; [r]

  

VisibleRowCount - the number of rows visible in the current view (some items might have scrolled outside the window)

end;

Inheritance

TCustomListView

  

TCustomListView - the base class for TListView

|

TWinControl

  

The base class for controls which can contain other (child) controls.

|

TControl

  

The base class for visible controls.

|

TLCLComponent

  

The base class for LCL components associated with widgets.

|

TComponent

?

TObject

Description

TCustomListView is the base class for TListView. If you want to define your own ListView class, you should derive it from this class.