diff --git a/docs/xml/lcl/comctrls.xml b/docs/xml/lcl/comctrls.xml index 4bbaaa8eb4..edc04a7509 100644 --- a/docs/xml/lcl/comctrls.xml +++ b/docs/xml/lcl/comctrls.xml @@ -5854,61 +5854,55 @@ - - Alignment - whether text is to be left or right justified or centered + Sets alignment of caption: text is left or right justified or centered. - Whether AutoSize is to be operational + When other columns have fixed width, auto-calculate width of this column, to fill entire width. - A text string or Caption (which may be translated) to be used at the top of the column + Caption text of column. - - ImageIndex - the index value of the image associated with he ListColumn + Index of icon, inside ImageList object for columns of Listview. - - MaxWidth - the maximum width for this column + Maximal width for this column. - - MinWidth - the minimum permissable with for the column + Minimal width for this column. - - Tag - a general purpose integer variable to be used in association with this column + Int value, to store some info for this column. - - Visible - whether this column can be seen + Allow to show this column. - The Width of this column + Current width of column. May be calculcated auto, if AutoSize used. @@ -6350,15 +6344,15 @@ - + For current ListView item, show HandPoint mouse cursor. - + For current ListView item, show pale underline. - + For current ListView item, show bold underline. @@ -7112,53 +7106,41 @@ - - AllocBy - allocate the list by a value + When new items add to list, increase internal buffer capacity by this amount. Needed to not add to internal buffer by one. - - Columns - define and change the columns of a ListView - -

- Columns is a TCollectionItem and contains all information on the columns of a listview.

-
+ Collection of items, which have properties of ListView columns (size, alignment, image index, etc). +
- - ColumnClick - determines if the OnColumnClick event will be executed. - -

The ColumnClick property of the ListView enables or disables the OnColumnClick Event. A call to OnColumnClick will only be done when a method has been assigned to the OnColumnClick event and ColumnClick is set to true (default).

-
+ Enable to react to clicks on ListView header columns. And to call OnColumnClick event. +
- - DefaultItemHeight - sets or reads the default height for an item on the list + Default height of lines in ListView. - - HideSelection - if True, the selected item is to be hidden + If control looses focus, don't paint selection background for selected item(s). - - HoverTime - the time for which the mouse must hover over the item before its help message is displayed + Time (in msec) for which the mouse cursor must hover over an item, before item's tooltip is shown. - - Items - the list of entries in the list. Held as a linked list with a cached index of the last accessed item + Collection of items in ListView.

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

@@ -7168,41 +7150,30 @@
- - LargeImages - an ImageList to be used in association with the list of Items - - -

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

-

A typical application might have two ImageLists: one ofLargeImages and one of SmallImages containing two versions of the same collection of images, in large and small format; the index numbers of the first list would correspond with those in the second list.

-

SmallImages could be displayed beside the text strings in the list view and the programmer would supply code to ensure that when an item with its associated SmallImage was selected, the corresponding LargeImage would be displayed in another window.

-

A TImageList control needs to be selected and pasted on to the Form Designer and the ImageList Editor can be opened from the pop-up menu obtained by right-clicking on TImageList icon in the Form Designer. Then in the StringList editor for Items the correct ImageIndex must be allocated to each entry in the list.

+ ImageList object, which contains "big" icons for one if ListView layouts. +

A typical application might have two ImageLists: one ofLargeImages and one of SmallImages containing two versions of the same collection of images, in large and small format; the index numbers of the first list would correspond with those in the second list.

SmallImages could be displayed beside the text strings in the list view and the programmer would supply code to ensure that when an item with its associated SmallImage was selected, the corresponding LargeImage would be displayed in another window.

A TImageList control needs to be selected and pasted on to the Form Designer and the ImageList Editor can be opened from the pop-up menu obtained by right-clicking on TImageList icon in the Form Designer. Then in the StringList editor for Items the correct ImageIndex must be allocated to each entry in the list.

- - MultiSelect - enables the selection of more than one entry from Items - by pressing SHIFT or CTRL keys while selecting + Allow to select several Listview items at a time, using Ctrl+click (select one item more). - - OwnerData - if True, the Owner's data are to be displayed + + Use owner-data mode for ListView. It means, that ListView don't contain items, you must supply them using OnData* events. - - OwnerDraw - if True, the Owner's Draw method is to be used + Use owner-draw mode. It means that program must paint ListView items, using OnCustomDraw*, OnAdvancedCustomDraw* events. - - ReadOnly - determines if the list can only be read and not written or deleted. + Don't allow user to change item captions, by click with a delay. @@ -7218,94 +7189,74 @@ - - ScrollBars - the kind of scrollbars to be used: none, auto, horizontal or vertical + Kind of scrollbars in control: vertical, horizontal, none or both. Auto* mean that scrollbars hide automatically. - - ShowColumnHeaders - whether headers for columns are to be displayed + Show header area in ListView, which shows captions of columns. - - ShowWorkAreas - if True, the work areas are to be displayed + + Property WorkAreas sets work areas in ListView. This property allows to highlight each work area with its own color and show with own caption. - - SmallImages - an ImageList of small images (icons) to be used in association with the list of Items - - -

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

-

A typical application might have two ImageLists: one ofLargeImages and one of SmallImages containing two versions of the same collection of images, in large and small format; the index numbers of the first list would correspond with those in the second list.

-

SmallImages could be displayed beside the text strings in the list view and the programmer would supply code to ensure that when an item with its associated SmallImage was selected, the corresponding LargeImage would be displayed in another window.

-

A TImageList control needs to be selected and pasted on to the Form Designer and the ImageList Editor can be opened from the pop-up menu obtained by right-clicking on TImageList icon in the Form Designer. Then in the StringList editor for Items the correct ImageIndex must be allocated to each entry in the list.

+ ImageList object, which contains "small" icons for one if ListView layouts. +

A typical application might have two ImageLists: one ofLargeImages and one of SmallImages containing two versions of the same collection of images, in large and small format; the index numbers of the first list would correspond with those in the second list.

SmallImages could be displayed beside the text strings in the list view and the programmer would supply code to ensure that when an item with its associated SmallImage was selected, the corresponding LargeImage would be displayed in another window.

A TImageList control needs to be selected and pasted on to the Form Designer and the ImageList Editor can be opened from the pop-up menu obtained by right-clicking on TImageList icon in the Form Designer. Then in the StringList editor for Items the correct ImageIndex must be allocated to each entry in the list.

- - SortType - whether to sort by text, by data, both or not at all + Sets sorting order for current sorting column: by text, by Data of items, both or none. - - SortColumn - the column that is being sorted + Index of column, by which ListView was last sorted. -1 for none. - - StateImages - an imagelist of icons to demonstrate the state of a process or event + ImageList object, which contains "state" icons, for item states: selected, normal, etc. - - ViewStyle - whether to view as a simple list, a list with large or small icons, or as a report + Sets one of ListView layouts: List (simple column), Report (few columns with full width), Icon (big icons), Small Icon (small icons, 16x16). - - OnChange - event handler for a change in the list + Called when content of list collection changes. - - OnColumnClick - event handler for clicking on a coulmn + Called when user clicks on column's header area. - - OnCompare - event handler for comparing list items + Called during sorting of list, by one of columns, to compare items. - - OnDeletion - event handler for deleting a list item + Called when items are deleted by code. - - OnInsert - event handler for inserting list item + Called when items are inserted by code. - - OnSelectItem - event handler for list item selection + Called when items are selected or selection changes. @@ -7345,23 +7296,19 @@
- - BoundingRect - the coordinates of the rectangle containing the ListView + Coordinates of the rectangle containing the ListView. - - Canvas - defines the area on which all graphic material is drawn (Read-only) + TCanvas object, defines the area on which all graphic is drawn. - - CheckBoxes - determines if the ListView shows checkboxes beside the items on the list + Show the check-boxes column, at the side of usual lines. Allows to check/uncheck items. - - Column - reads the column information of the listview. + Property of ListView columns.

This property can be used to read the information of a column.

The column whose information is to be retrieved is determined by an index (AIndex). As with nearly all indexes, this index is 0 based. In column[0] the caption of the listitem is show, in subsequent column the subitems of the listitem are shown.

@@ -7374,31 +7321,27 @@
- - DropTarget - location where an item from the list is to be dropped + - - FlatScrollBars - whether the scroll bars are to be displayed flat (default False) + Show ListView scrollbars in "flat" style (default off, not for all widgetsets). - - FullDrag - if True, the full object is dragged + - Whether GridLines are to be shown + Show 1-pixel lines, as a grid, between rows and columns. - - HotTrack - the property whereby the item under the mouse pointer becomes emphasised + Allow to highlight/underline current ListView item, which is under mouse cursor.

HotTrack is the name given to the feature whereby, as the mouse pointer moves over some graphic item (e.g. a tab, an entry in a list, a button or other control in a form), that item becomes emphasized in some way.

@@ -7419,29 +7362,25 @@
- The HotTrackStyles available for this control + More options for HotTrack property. - - ItemFocused - the item currently receiving focus + ListView item, which is shown as focused. - - RowSelect - whether the user can select rows of items (across columns). Default false + In Report view, this allows to highlight entire selected row, until right edge of ListView. - - SelCount - the number of items selected + Number of currently selected items. - - Selected - the current list item that has been selected + Listview item, which is 1st selected. @@ -7451,18 +7390,15 @@ - - TopItem - the first item on the list + Listview item, which is shown at the top edge of ListView. - - ViewOrigin - the top left coordinate for the current view + Coordinate of the left/top visible point in ListView, updates when Listview scrolls. - - VisibleRowCount - the number of rows visible in the current view (some items might have scrolled outside the window) + Number of rows, which is currenly shown with current Listview position/size/layout. @@ -7510,13 +7446,13 @@ - + - + @@ -7540,19 +7476,19 @@ - + - + - + @@ -7564,43 +7500,43 @@ - + - + - + - + - + - + - + @@ -7618,7 +7554,7 @@ - + @@ -7630,7 +7566,7 @@ - + @@ -7642,13 +7578,13 @@ - + - + @@ -7690,13 +7626,13 @@ - + - + @@ -18221,8 +18157,7 @@ If Images.HasOverlays then it is fetched from Images via Images.Overlay(Node.Ove - - ToolTips - whether Popup tool tips are to be shown + Automatically show hints (tooltips) for ListView items, when mouse is over items. @@ -18307,22 +18242,21 @@ If Images.HasOverlays then it is fetched from Images via Images.Overlay(Node.Ove FindCaption - returns the ListItem with the specified caption at the given starting place. - + - - HideSelection - render the selected items invisible + - + - + - - - + + + @@ -18650,32 +18584,26 @@ If Images.HasOverlays then it is fetched from Images via Images.Overlay(Node.Ove IntfCustomDraw - uses the interface to perform custom drawing and returns a result of drawing - - OnCustomDraw - event handler for custom drawing + Called for owner-draw mode. - - OnCustomDrawItem - event handler for custom drawing an item + Called for owner-draw mode. - - OnCustomDrawSubItem - event handler for custom drawing a subitem + Called for owner-draw mode. - - OnAdvancedCustomDraw - event handler for advanced custom drawing + Called for owner-draw mode. - - OnAdvancedCustomDrawItem - event handler for advanced custom drawing item + Called for owner-draw mode. - - OnAdvancedCustomDrawSubItem - event handler for advanced custom drawing subitem + Called for owner-draw mode. - - - + + + @@ -18767,7 +18695,7 @@ If Images.HasOverlays then it is fetched from Images via Images.Overlay(Node.Ove LMDrawItem - LCL message handler for drawing the item on the current canvas - + @@ -18809,6 +18737,17 @@ If Images.HasOverlays then it is fetched from Images via Images.Overlay(Node.Ove Color used to paint text of selected item. Allow to use property SelectionFontColor. If not used, that color is detected automatically. + When user clicks ListView header's column, sort ListView by this column. After next click, sort in other order. + For Report view. Resize last column, to fill entire ListView width. + Sets sorting direction for current sorting column. + + Options for layouts, which show icons. Sets arrangement of icons, text-wrapping state. + Listview item, which is last selected, in MultiSelect mode. + Called for owner-data mode. + Called for owner-data mode. + Called for owner-data mode. + Called for owner-data mode. + diff --git a/lcl/comctrls.pp b/lcl/comctrls.pp index 9f36764877..4971f406c2 100644 --- a/lcl/comctrls.pp +++ b/lcl/comctrls.pp @@ -1517,8 +1517,8 @@ type procedure KeyDown(var Key: Word; Shift: TShiftState); override; protected property AllocBy: Integer read FAllocBy write SetAllocBy default 0; - property AutoSort: Boolean read FAutoSort write FAutoSort default True; // when we click header column sort automatically - property AutoWidthLastColumn: Boolean read FAutoWidthLastColumn write SetAutoWidthLastColumn default False; // resize last column to fit width of TListView + property AutoSort: Boolean read FAutoSort write FAutoSort default True; + property AutoWidthLastColumn: Boolean read FAutoWidthLastColumn write SetAutoWidthLastColumn default False; property ColumnClick: Boolean index Ord(lvpColumnClick) read GetProperty write SetProperty default True; property Columns: TListColumns read FColumns write SetColumns; property DefaultItemHeight: integer read FDefaultItemHeight write SetDefaultItemHeight; @@ -1661,7 +1661,7 @@ type property LargeImages; property MultiSelect; property OwnerData; - property OwnerDraw; // should pass OnDrawItem only when ListStyle=vsReport and OwnerDraw=True + property OwnerDraw; property ParentColor default False; property ParentFont; property ParentShowHint;