ListView¶
Qualified name: delphifmx.ListView
- class ListView¶
Bases:
CustomListView
Represents a FireMonkey list view component that you can use to hold and present various types of items. The TListView displays a collection of items in a list that is optimized for LiveBindings and for fast and smooth scrolling. The items in the list view can have one or more of the following appearance features:
A caption or detail text (for example, using the Item.Text bindable member of TListView) An associated image (for example, using the Item.Bitmap bindable member of TListView) An accessory icon (for example, using the ItemEditAppearance property in the Object Inspector) A graphic or a text button attached (for example, using the Item.ButtonText bindable member of TListView) You can customize the appearance of a list view by modifying the layout of the list items, including the caption, the associated image, text details, or the accessory icon. TListView has the edit mode in which you can select several items.
Example You can add items to a TListView either by binding to a data source, or by code (TListView.Items.Add). Here is a code example that shows how to add items to a TListView:
Delphi:
- var
LItem: TListViewItem; I: Integer;
- begin
for I := 1 to 10 do begin
LItem := ListView1.Items.Add; LItem.Text := IntToStr(I);
end;
end;
// To achieve the best performance use BeginUpdate and EndUpdate.
- var
LItem: TListViewItem; I: Integer;
- begin
ListView1.BeginUpdate; try
for I := 1 to 10 do begin
LItem := ListView1.Items.Add; LItem.Text := IntToStr(I);
end;
- finally
ListView1.EndUpdate;
end;
end;
C++:
- for (int i = 1; i <= 10; i++) {
TListViewItem* item = ListView1->Items->Add(); item->Text = IntToStr(i);
}
// To achieve the best performance use BeginUpdate and EndUpdate.
ListView1->BeginUpdate(); try {
- for (int i = 1; i <= 10; i++) {
TListViewItem* item = ListView1->Items->Add(); item->Text = IntToStr(i);
}
} catch (…) { } ListView1->EndUpdate();
Methods
Gets and applies the style of a TStyledControl.
Call this procedure to get and apply its style lookup.
Call this procedure to indicate that this control requires to get and apply its style lookup.
Attributes
AbsoluteClipRect
Specifies the absolute rectangle of the control after all its parent controls clip it.
AbsoluteEnabled
Specifies whether the control is absolutely enabled.
AbsoluteHeight
Specifies the absolute height of the control.
AbsoluteMatrix
Specifies the absolute transformation matrix of the control.
AbsoluteOpacity
Specifies the absolute opacity of the control.
AbsoluteRect
Specifies the absolute rectangle that bounds the control.
AbsoluteScale
Specifies the absolute scale of the control.
AbsoluteWidth
Specifies the absolute width of the control.
ActionClient
Specifies whether the component object has an associated action.
Adapter
Object that handles all interactions between the list view control and its list view items.
Updates the width and height of this control according to its current style
Determines if and how the width and height of this control should be modified to take the fixed space dictated by the style of this control
Specifies the alignment options (top, left, client, and so on) of this control.
Specifies whether the items are selectable or not.
Specifies whether the fill colors for odd and even elements are rendered as alternating or not.
Specifies how the control is anchored to its parent.
ApplyingEffect
A flag that signals when a control is in the process of applying an effect.
AutoCapture
Specifies whether the control captures mouse events.
Specifies whether tapping on the topmost side of this list view automatically scrolls to the top of the list.
Specifies the threshold value for the auto tap scrolling.
Specifies whether the control's text should be translated
AxisAlignedRect
A TRectF defined by the width and height of the control.
BoundsRect
Specifies the bounding rectangle of the control.
Specifies whether the current control can receive focus.
Specifies whether the parent of this control should be evaluated to receive focus.
Sets the swipe-to-delete feature on list view items.
Canvas
Provides the drawing surface of the control.
Children
Stores an array of children attached to this parent component.
ChildrenCount
Read-only property that specifies the number of children in the children list.
ChildrenRect
Specifies the bigger rectangle area occupied by parent and children controls.
ClassName
Returns the TObject.ClassName
Specifies if children of the control should be clipped to the control's on-screen region.
Specifies whether the current control has clipped its parent.
ClipRect
Specifies the bound rectangle to be clipped.
ComObject
Specifies the interface reference implemented by the component.
ComponentCount
Returns the owned component count
ComponentIndex
Indicates the position of the component in its owner's Components property array.
ComponentState
Describes the current state of the component, indicating when a component needs to avoid certain actions.
ComponentStyle
Governs the behavior of the component.
Components
Returns an iterator over the owned components
Describes if the Control type is Styled or Native.
Controls
Returns an iterator over contained controls
ControlsCount
Returns the count of contained controls
Image to use to represent the mouse pointer when it passes into the region covered by the control.
Data
Stores a Tvalue, which is a data structure that can store different kinds of data types.
DefaultSize
Embarcadero Technologies does not currently have any additional information.
Returns a string with the name of the default style of this control
Specifies the name of the Delete button designed to delete the TListView items.
DesignInfo
Contains information used by the Form designer.
DisableDisappear
Embarcadero Technologies does not currently have any additional information.
Specifies whether the control has the focus effect disabled.
Specifies whether scrolling this list view using the mouse wheel works or not.
Specifies how the control initiates drag-and-drop operations.
Specifies whether this list view component is in the edit mode (True) or in the regular mode (False).
Specifies whether the control is highlighted when the dragged object is over it.
Specifies whether the control responds to mouse, keyboard, and timer events.
FixedSize
Embarcadero Technologies does not currently have any additional information.
Name of the appearance class of footer list view items.
Name of the appearance of footer list view items.
HasAfterPaintEffect
Specifies whether the control has an effect that is applied after the control is painted.
HasClipParent
Control that is a direct child of this control and has clipped this control.
HasDisablePaintEffect
Specifies whether the control's effect is painted.
HasEffect
Specifies whether the control has an applied effect.
Name of the appearance class of header list view items.
Name of the appearance of header list view items.
Height specifies the vertical size of the control (in dp).
Contains the numeric context ID that identifies the Help topic for the control.
Contains the keyword string that identifies the Help topic for the control.
Specifies whether the control's context-sensitive Help topic is identified by a context ID or by keyword.
Specifies the text string that appears when the user moves the mouse over a control.
Enables the control to capture mouse events.
Defines the reference to a TCustomImageList list of images to be used to draw images on the component.
InPaintTo
Specifies whether the control is currently being painted.
Index
Specifies the index of the child object in the children array attached to this object.
InheritedCursor
Image used to represent the mouse pointer when it passes into the region covered by the control.
InvertAbsoluteMatrix
Specifies the inverse matrix of AbsoluteMatrix.
IsDragOver
Specifies whether a dragged object is over the area of the current control.
IsFocused
Determines whether the control has input focus.
IsInflated
Whether the current style of this control has been actually applied to the control.
IsMouseOver
Specifies whether the mouse cursor is over the control.
IsVisible
Specifies whether the control is visible.
Specifies the various options that are used when rendering the list view items.
Name of the appearance class of regular list view items.
Name of the appearance of regular list view items.
Allows you to specify properties of individual item appearance objects.
ItemCount
Specifies the number of items in this list view component.
Name of the appearance class of regular list view items in edit mode.
Name of the appearance of regular list view items in edit mode.
Specifies the index of the selected item in this list view component.
Specifies the space in logical units around the content of each list item.
Items
Provides access to individual items in this list view component.
LocalRect
Specifies the local rectangle for painting the control.
Specifies whether the control is locked at design time.
Aligns the component to the margins points of other components.
Name
Specifies the name of the component as referenced in code.
Set of properties to customize the appearance and behavior of the list view when ControlType is Platform.
Observers
Indicates the TObservers object added to the TComponent.
Callable[[Object, ListItem, ListItemSimpleControl], None]:
Callable[[Object, ListItem, ListItemSimpleControl], None]:
Callable[[Object, bool], None]:
Callable[[Object, bool], None]:
Callable[[Object, int], None]:
Callable[[Object, int, bool], None]:
Callable[[Object, DragObject, PointF], None]:
Callable[[Object, DragObject, PointF], None]:
Callable[[Object, DragObject, PointF, DragOperation], None]:
Callable[[Object, bool], None]:
Callable[[Object, str, str, bool], None]:
OnGesture
Callable[[Object, GestureEventInfo, bool], None]:
Callable[[Object, int, PointF, ListItemDrawable], None]:
Callable[[Object, Canvas, RectF], None]:
Callable[[Object, Canvas, RectF], None]:
Callable[[Object, ListViewItem, bool], None]:
Specifies the control opacity.
Owner
Returns the Component Owner
Aligns the component to the padding points of other components.
Parent
Returns/Sets the Control Visibility
ParentClassStyleLookupName
The name of the default style of the parent class of this control.
ParentControl
Specifies the parent control of this control.
If True, the value of the ShowHint property of this control inherits the value of the ShowHint property of the parent control.
ParentedRect
Specifies the bounding rectangle of the control within its parent.
ParentedVisible
Specifies whether all the control's parents are visible.
Specifies the context (pop-up) menu object.
Aligns the component to the position points of other components (Bounds points).
Pressed
Indicates whether the control is currently pressed.
PressedPosition
A point that indicates where exactly on the control the click occured.
Determines if the spinning wheel disappears automatically or not.
Determines whether the "pull list to refresh" feature is enabled.
Root
Specifies the root parent of this object.
Specifies the amount (in degrees) by which the control is rotated from the x-axis.
Specifies the position of the pivot point of the control.
Specifies the scale of the control.
Scene
Specifies the current scene in which the control is drawn.
Specifies the position of the vertical scroll in the list.
Search box partially hidden in a list view where SearchAlwaysOnTop is False Your list view component keeps the search box on top as you scroll.
Set SearchVisible to True to show a search box on top of your list view Shows a search box on top of your list view that can filter the content of the list.
Selected
List item that is currently selected on the list view.
Enables the selection of Crossfade animation .
Specifies whether the Hint can be shown.
Determines whether the selection is visible when selecting list view items.
Specifies the space in logical units on all sides around the list box, encompassing the items.
Specifies the vertical and horizontal size (Size.Height and Size.Width) of the control (in pixels).
Stored
Specifies whether this object is stored in the .XFM file.
Specifies the name of the resource object to which the current TStyledControl is linked
StyleName
Specifies the style name for this FMX component.
This property allows you to define the current state of style
StylesData
Value:
Indicates the position of the control in its parent's tab order.
Embarcadero Technologies does not currently have any additional information.
Tag
Stores a NativeInt integral value as a part of a component.
TagFloat
Custom property that stores any floating-point value.
TagObject
Custom property that stores any object value.
TagString
Custom property that stores any string value.
Touch
Specifies the touch manager component associated with the control.
Set of optional pixel values you can specify to expand the touch target of a FireMonkey styled control.
Specifies whether this list view control is transparent or not.
UpdateRect
Specifies the rectangle area of the control that needs to be updated.
VCLComObject
Represents information used internally by components that support COM.
Specifies whether the component appears onscreen.
Specifies the horizontal size of the control (in pixels).
- AdjustSizeValue¶
Updates the width and height of this control according to its current style
- AdjustType¶
Determines if and how the width and height of this control should be modified to take the fixed space dictated by the style of this control
- Align¶
Specifies the alignment options (top, left, client, and so on) of this control. Use Align to automatically set the alignment of the current control. Setting Align to a value different than None can affect the position, size (height and width), and anchors of the control. By default, Align is set to None. Descendants of TControl typically set the visibility and value for the Align property. For example, for TToolBar, Align defaults to TAlignLayout.Top. To see the possible values for Align and their visible effects over the control, see FMX.Types.TAlignLayout. Controls that have the Align or Anchors properties set can use a Scale that is different from the default (1,1), so that controls align together even when they have a custom scale.
- Type:
AlignLayout
- AllowSelection¶
Specifies whether the items are selectable or not. The AllowSelection property specifies whether the items are selectable or not.
Tip: If items are not selectable, you will still be able to click on the embedded controls.
- Type:
bool
- AlternatingColors¶
Specifies whether the fill colors for odd and even elements are rendered as alternating or not. The AlternatingColors property specifies whether the background of the individual items in the list should appear rendered in alternating colors.
- Type:
bool
- Anchors¶
Specifies how the control is anchored to its parent. Use Anchors to ensure that a control maintains its current position relative to the edges of its parent, even if the parent is resized. When its parent is resized, the control holds its position relative to the edges to which it is anchored. Anchors is enforced only when the parent control is resized. If a control is anchored to opposite edges at the same time, the control stretches horizontally or vertically to maintain constant the distance between the control edges and parent edges. If a control is anchored to all four edges of its parent, the control stretches in all directions. By default, a control is anchored to the top and left edges of its container (Anchors=[akTop,akLeft]). The automatic alignment may affect the anchors of a control. When Align is set to None, all the anchors are available. If Align is not None, the anchors affected by the automatic alignment are excluded. Changing the state of the anchors affected by the automatic alignment has no effect over the control. Controls that have the Align or Anchors properties set can use a Scale that is different from the default (1,1), so that controls align together even when they have a custom scale.
- Type:
Anchors
- ApplyStyleLookup()¶
Gets and applies the style of a TStyledControl.
- AutoTapScroll¶
Specifies whether tapping on the topmost side of this list view automatically scrolls to the top of the list. Set the AutoTapScroll property to True in order to allow for automatically scrolling to the top of the list when tapping with your finger on the topmost region of this list view component. Set AutoTapScroll to False in order to disable this feature.
- Type:
bool
- AutoTapTreshold¶
Specifies the threshold value for the auto tap scrolling.
- Type:
int
- AutoTranslate¶
Specifies whether the control’s text should be translated
- CanFocus¶
Specifies whether the current control can receive focus. CanFocus is True if it can receive focus, and False otherwise. If it is set to False, the control cannot be selected when using the TAB key. A control can receive focus after it is created.
- Type:
bool
- CanParentFocus¶
Specifies whether the parent of this control should be evaluated to receive focus. CanParentFocus is True when the parent of this control should be evaluated to receive focus if this control cannot receive focus itself, and False otherwise.
- Type:
bool
- CanSwipeDelete¶
Sets the swipe-to-delete feature on list view items. CanSwipeDelete specifies that a swipe gesture on individual list view items enables the end user to choose either to delete or retain the item. When this feature has been enabled in the Object Inspector, and the end user swipes an item in a listview, the user has the opportunity to delete the item: a Delete button temporarily appears on the item. The user can then click the Delete button to delete the item from the listview, or can release the swipe to retain the item in the list view.
Tip: When you swipe an item, this item shows the same behavior and appearance as a list item selected when your list view is in edit mode. For a preview of this appearance, see TPublishedAppearance.ItemEditAppearance. The swipe-to-delete feature is supported on mobile apps (iOS and Android), as well as desktop apps (Windows and OS X) when touch input is available.
- Type:
bool
- ClipChildren¶
Specifies if children of the control should be clipped to the control’s on-screen region. Set ClipChildren to
True if you want child controls to be clipped to the control’s on-screen region. False if you want child controls to be able to extend beyond the region of the parent control.
- Type:
bool
- ClipParent¶
Specifies whether the current control has clipped its parent. When ClipParent is True, TControl cuts off the portion of the parent that lies under the control when the control is painted by the Paint and Painting methods. Parts of the control that do not contain visible objects cut off holes in the parent’s image. ClipParent is ignored in PaintChildren and other painting methods. If one parent has more that one child control having ClipParent equals True, then only one of these child controls is painted with ClipParent equals True. Others child controls are painted as if ClipParent equals False.
- Type:
bool
- ControlType¶
Describes if the Control type is Styled or Native.
- Type:
ControlType
- Cursor¶
Image to use to represent the mouse pointer when it passes into the region covered by the control. Change the value of Cursor to provide feedback to the user when the mouse pointer enters the control. For a list of cursor constants, see System.UITypes Constants. The image representations of the cursor depend on the theme active on the current platform. If Cursor is set to the default cursor, this control might display a different cursor when the mouse pointer is over it. The actual cursor that this control displays is the cursor defined in InheritedCursor, a read-only property that is calculated based not only in the value of Cursor in this control, but also the value of Cursor in any ancestor of this control (parent, grand-parent, and so on until the parent form).
- Type:
int
- DefaultStyleLookupName¶
Returns a string with the name of the default style of this control
- DeleteButtonText¶
Specifies the name of the Delete button designed to delete the TListView items. This button can be displayed if the CanSwipeDelete property is set True.
- Type:
str
- DisableFocusEffect¶
Specifies whether the control has the focus effect disabled. Set DisableFocusEffect to True so the control disables the effect applied when it receives focus. Usually, DisableFocusEffect for FireMonkey controls is False.
- Type:
bool
- DisableMouseWheel¶
Specifies whether scrolling this list view using the mouse wheel works or not. Set the DisableMouseWheel property to False to allow scrolling this list view using the mouse wheel. Set DisableMouseWheel to True to disable this feature.
- Type:
bool
- DragMode¶
Specifies how the control initiates drag-and-drop operations. Use DragMode to control when the user can drag the control. Disable the drag-and-drop capability at run time by setting the DragMode property value to dmManual. Enable automatic dragging by setting DragMode to dmAutomatic.
- Type:
DragMode
- EditMode¶
Specifies whether this list view component is in the edit mode (True) or in the regular mode (False). On some platforms, the list view shows an animation when the value of the EditMode property changes at run time.
- Type:
bool
- EnableDragHighlight¶
Specifies whether the control is highlighted when the dragged object is over it.
- Type:
bool
- Enabled¶
Specifies whether the control responds to mouse, keyboard, and timer events. Use Enabled to change the availability of the control to the user. To disable a control, set Enabled to False. Some disabled controls appear dimmed (for example: buttons, check boxes, labels), while others (container controls) simply lose their functionality without changing their appearance. If Enabled is set to False, the control ignores mouse, keyboard, and timer events. To re-enable a control, set Enabled to True. This property applies to all TControl descendants.
- Type:
bool
Name of the appearance class of footer list view items.
- Type:
str
Name of the appearance of footer list view items. Possible values are:
Item
Description
Custom
Custom appearance.
ListHeader
Default appearance.
- Type:
str
- HeaderAppearanceClassName¶
Name of the appearance class of header list view items.
- Type:
str
- HeaderAppearanceName¶
Name of the appearance of header list view items. Possible values are:
Item
Description
Custom
Custom appearance.
ListHeader
Default appearance.
- Type:
str
- Height¶
Height specifies the vertical size of the control (in dp). Use the Height property to read or change the height of the control.
- Type:
float
- HelpContext¶
Contains the numeric context ID that identifies the Help topic for the control. In case of a .chm Help file, you must symbolically map Context IDs of Help topics to numeric topic ID values in the [MAP] section of your project (.hhp) file. To enable Context ID-based context-sensitive Help for a control, set HelpType to htContext and set HelpContext to a numeric topic ID. A topic ID of 0 (default) means that no Help topic is provided for the control.
- Type:
int
- HelpKeyword¶
Contains the keyword string that identifies the Help topic for the control. To enable the keyword-based context-sensitive Help for a control, set the HelpType property to htKeyword and set HelpKeyword to a keyword string. No keyword (zero-length string, the default) means that no Help topic is provided for the control.
- Type:
str
- HelpType¶
Specifies whether the control’s context-sensitive Help topic is identified by a context ID or by keyword. If HelpType is htContext, the HelpContext property value identifies the control’s Help topic. If HelpType is htKeyword, the HelpKeyword property value identifies the control’s Help topic.
- Type:
HelpType
- Hint¶
Specifies the text string that appears when the user moves the mouse over a control. See Using Hints to Show Contextual Help in a FireMonkey Application for more information about hints.
- Type:
str
- HitTest¶
Enables the control to capture mouse events.
If you set HitTest to True, this control captures all mouse events. The example below shows the use of HitTest for an OnClick event. If you set HitTest to False, the mouse events will pass through this control, so that a control laid out behind this one receives the mouse events instead of this control. Note: The HitTest enables all mouse-related events, which also include the display of Hints and Hint-related events. For most controls, HitTest is True by default. However, this is not true for all the controls. For example, for TLabel and TPathLabel, HitTest is False by default; these two controls do not capture the mouse-related events unless you set HitTest to True.
Example of HitTest 1. On a form, place a TPanel component. 2. Inside the panel, place a TPathLabel component. 3. Implement the OnClick event for both the TPanel and the TPathLabel:
procedure TForm1.Panel1Click(Sender: TObject); begin
ShowMessage(‘OnClick event fired for TPanel’);
end;
procedure TForm1.PathLabel1Click(Sender: TObject); begin
ShowMessage(‘OnClick event fired for TPathLabel’);
end;
Set the TPathLabel HitTest property to False (this is the default setting). Run the application and click the label. The OnClick event is fired for the panel (not the label).
Set the TPathLabel HitTest property to True. Run the application and click the label. The OnClick event is fired for the TPathLabel.
- Type:
bool
- Images¶
Defines the reference to a TCustomImageList list of images to be used to draw images on the component. If the TCustomImageList list is empty, then Images is nil/null. Call ImagesChanged when Images is changed.
- Type:
CustomImageList
- Inflate()¶
Call this procedure to get and apply its style lookup.
- ItemAppearance¶
Specifies the various options that are used when rendering the list view items.
Note: This is a design-time property. At run time access the relevant properties of the list view instead. See TPublishedAppearance for more information. Use the ItemAppearance property in order to control how an item from this list view component is displayed. The ItemAppearance property controls the footer, header, and list item appearance and height, and also the list item appearance and height when in edit mode.
- Type:
PublishedAppearance
- ItemAppearanceClassName¶
Name of the appearance class of regular list view items.
- Type:
str
- ItemAppearanceName¶
Name of the appearance of regular list view items. When your list view switches between display mode and edit mode, the item appearance switches between the appearance defined in the ItemAppearanceName property (display mode) and the appearance defined in the ItemEditAppearanceName property (edit mode). Items may display an animation as their appearance changes. Possible values are:
ItemAppearanceName
ItemEditAppearanceName
List Item Preview
Not Selected
Selected
Custom
Custom
ImageListItem
ImageListItemDeleteImageListItemShowCheck
ImageListItemBottomDetail
ImageListItemBottomDetailShowCheck
ImageListItemBottomDetailRightButton
ImageListItemBottomDetailRightButtonShowCheck
ImageListItemRightButton
ImageListItemRightButtonDeleteImageListItemRightButtonShowCheck
ListItem
ListItemDeleteListItemShowCheck
ListItemRightDetail
ListItemRightDetailDeleteListItemRightDetailShowCheck
- Type:
str
- ItemAppearanceObjects¶
Allows you to specify properties of individual item appearance objects. These objects include footer, header, item, and item in edit mode objects. Use the ItemAppearanceObjects property in order to control various properties of the objects that might be part of this list view component. For instance, you can specify accessory and text settings for the items or you can affect text settings for the footer and header items.
- Type:
PublishedObjects
- ItemEditAppearanceClassName¶
Name of the appearance class of regular list view items in edit mode.
- Type:
str
- ItemEditAppearanceName¶
Name of the appearance of regular list view items in edit mode. When your list view switches between display mode and edit mode, the item appearance switches between the appearance defined in the ItemAppearanceName property (display mode) and the appearance defined in the ItemEditAppearanceName property (edit mode). Items may display an animation as their appearance changes. You can find the possible values in the table below.
ItemEditAppearance
ItemAppearanceName
Editing Mode
List Item Preview
Not Selected
Selected
Custom
Custom
Custom
ImageListItemBottomDetailShowCheck
ImageListItemBottomDetail
Select
ImageListItemBottomDetailRightButtonShowCheck
ImageListItemBottomDetailRightButton
Select
ImageListItemDelete
ImageListItem
Delete
ImageListItemRightButtonDelete
ImageListItemRightButton
Delete
ImageListItemRightButtonShowCheck
ImageListItemRightButton
Select
ImageListItemShowCheck
ImageListItem
Select
ListItemDelete
ListItem
Delete
ListItemRightDetailDelete
ListItemRightDetail
Delete
ListItemRightDetailShowCheck
ListItemRightDetail
Select
ListItemShowCheck
ListItem
Select
Each edit mode item appearance matches a display mode item appearance (ItemAppearanceName). The type of editing mode described in the table above determines how list items behave.
Item
Behavior
Delete
Tap a list item to show a Delete button. Tap Delete to delete the item, tap anywhere else to hide the Delete button.
Select
Tap a list item to select it. Tap again to unselect it. You can select more than one item (multiselect).
Custom
Your custom implementation of the edit mode item appearance determines the behavior of list items.
- Type:
str
- ItemIndex¶
Specifies the index of the selected item in this list view component.
- Type:
int
- Locked¶
Specifies whether the control is locked at design time. A locked control prohibits to move the control at design time, all the other properties can be modified at design time. To lock the control, set Locked to True. By default, Locked is False, and the control can be modified at design time.
- Type:
bool
- Margins¶
Aligns the component to the margins points of other components. The Margins of a control are the distances (in pixels) from each edge (top, left, bottom, right) to another control within the same Parent or to the edge of its Parent. The Margins add space to the outer side of the control. It only applies for controls that do not use TAlignLayout None and the components are located to each other. If a margin is not 0, no other control will come closer to the control than the specified distance. If the distance from a Parent edge to the corresponding control edge is smaller than the specified Margins for that edge, the control is repositioned and resized, if necessary, to maintain the specified distance. If the Margins control has zero values, RAD Studio uses the default values (Left=4, Top=4, Right=4, Bottom=4). You can also set your own Margins values. It only applies to the IDE control’s guidelines, when you are dragging control. But if you use Align=Client (for example), it will use the specified values in Margins. The following image shows how Padding and Margins properties affect alignment, position, and size of controls.
- Type:
- NativeOptions¶
Set of properties to customize the appearance and behavior of the list view when ControlType is Platform. This group of properties provides the subproperties described in the following table. All subproperties are disabled by default.
Subproperty
Description
Grouped
Make cells use a grouped style. The grouped style is the style that the list of iOS settings uses.
False
True
Indexed
Shows an index on the right-hand side of the list with the first letter of each header. You may tap a letter to navigate to the header that the letter represents. If you want to display something other than the first letter of each header, use the IndexTitle of each header item to define a custom text to show for that header. Long index titles may hide important information behind them, use no more than few characters.
False
True
Styled
Make the native presentation use the style settings defined in your list view control for the following aspects of your list view:
Font Text color and selected text color Text alignment, both vertical and horizontal Word wrapping and trimming You cannot customize any other aspects of the native presentation of a list view. If you need to customize your list view further, change ControlType to Styled to use the regular FireMonkey presentation instead.
False
True
ControlType: Styled
- Type:
ListViewNativeOptions
- NeedStyleLookup()¶
Call this procedure to indicate that this control requires to get and apply its style lookup.
- OnButtonChange¶
Callable[[Object, ListItem, ListItemSimpleControl], None]:
- OnButtonClick¶
Callable[[Object, ListItem, ListItemSimpleControl], None]:
- OnCanFocus¶
Callable[[Object, bool], None]:
- OnDeleteChangeVisible¶
Callable[[Object, bool], None]:
- OnDeleteItem¶
Callable[[Object, int], None]:
- OnDeletingItem¶
Callable[[Object, int, bool], None]:
- OnDragDrop¶
Callable[[Object, DragObject, PointF], None]:
- OnDragEnter¶
Callable[[Object, DragObject, PointF], None]:
- OnDragOver¶
Callable[[Object, DragObject, PointF, DragOperation], None]:
- OnEditModeChanging¶
Callable[[Object, bool], None]:
- OnFilter¶
Callable[[Object, str, str, bool], None]:
- OnItemClickEx¶
Callable[[Object, int, PointF, ListItemDrawable], None]:
- OnPaint¶
Callable[[Object, Canvas, RectF], None]:
- OnPainting¶
Callable[[Object, Canvas, RectF], None]:
- OnUpdatingObjects¶
Callable[[Object, ListViewItem, bool], None]:
- Opacity¶
Specifies the control opacity. Set Opacity to customize the transparency of the current control. Opacity takes values between 0 and 1. If Opacity is 1, the control is completely opaque; if it is 0, the control is completely transparent. The values over 1 are treated as 1, and the ones under 0 are treated as 0. Opacity applies to the control’s children.
- Type:
float
- Padding¶
Aligns the component to the padding points of other components. The Padding of a control specifies how close, in pixels, the control’s children can come to each of its edges (top, left, bottom, right). Padding adds space to the inner side of the control. The control’s children are repositioned and resized, if necessary, to maintain the Padding. If the Padding control has zero values, RAD Studio uses the default values (Left=4, Top=4, Right=4, Bottom=4). You can also set your own Padding values. The following image shows how Padding and Margins properties affect alignment, position, and size of controls.
Note: Padding constraints do not work for TScrollBox, TListBox, TTreeView, and TGrid based controls.
- Type:
- ParentShowHint¶
If True, the value of the ShowHint property of this control inherits the value of the ShowHint property of the parent control. See Using Hints to Show Contextual Help in a FireMonkey Application - Enabling Hints for a Control for more information.
- Type:
bool
- PopupMenu¶
Specifies the context (pop-up) menu object. Use PopupMenu to set the context menu of the current control. The pop-up window is displayed when ShowContextMenu is called.
- Type:
- Position¶
Aligns the component to the position points of other components (Bounds points). Specifies the upper-left corner of the current control, relative to its parent. The Position can be affected by the Padding of its parent and the Margins of the control.
- Type:
- PullRefreshWait¶
Determines if the spinning wheel disappears automatically or not. When set to True, the spinning wheel does not disappear automatically and you have to call the StopPullRefresh method after doing a refresh operation. If PullRefreshWait is set to False (default), then the spinning wheel disappears automatically shortly after triggering the effect. This option only works in native iOS controls and does not have effect otherwise.
Note: You must set the PullToRefresh property to True to use PullRefreshWait.
- Type:
bool
- PullToRefresh¶
Determines whether the “pull list to refresh” feature is enabled. When this property is set to true, the Pull-to-Refresh feature is enabled and the end user can pull down a list view to refresh the contents. To enable the Pull-to-Refresh feature, select the TListView component in the Form Designer, and do the following:
On the Properties page of the Object Inspector, set the PullToRefresh property to true. Open the Events page, and double-click the right-hand column for OnPullRefresh. When the Code Editor opens, you can implement the OnPullRefresh event handler. In this event handler, you can specify how to refresh the list view. For example, you might update existing list items, add new items, or delete specified items. Note: In the case of native iOS controls, you can use the PullRefreshWait property to set whether the animated spinning indicator disappears automatically, or if it disappears when you call StopPullRefresh.
- Type:
bool
- RotationAngle¶
Specifies the amount (in degrees) by which the control is rotated from the x-axis. Positive angles correspond to clockwise rotation. For counterclockwise rotation, use negative values. To set the rotation center, use RotationCenter.
- Type:
float
- RotationCenter¶
Specifies the position of the pivot point of the control. The coordinates of the rotation center take values in the range from 0 through 1. The point with the coordinates (0,0) corresponds to the upper-left corner of the control, the point with the coordinates (1,1) corresponds to the lower-right corner of the control. The default center of rotation is (0.5, 0.5). Values outside of [0,0] and [1,1] can be clipped in some descendant classes. To set the rotation angle, use RotationAngle.
- Type:
- Scale¶
Specifies the scale of the control. Set the Scale coordinates to specify the scale on each axis. The initial scale rate is 1 on each axis.
Note: Controls that have the Align or Anchors properties set can use a scale that is different from the default (1,1), so that controls align together even when they have a custom scale.
- Type:
- ScrollViewPos¶
Specifies the position of the vertical scroll in the list. Setting ScrollViewPos to 0 scrolls the list view to its top.
- Type:
float
- SearchAlwaysOnTop¶
Search box partially hidden in a list view where SearchAlwaysOnTop is False Your list view component keeps the search box on top as you scroll. If SearchAlwaysOnTop is False, the search box behaves as a list item: scrolling down the list hides the search box, and you must scroll up to show the search box again. SearchAlwaysOnTop has no effect if SearchVisible is False. SearchAlwaysOnTop is supported only on the iOS platform.
- Type:
bool
- SearchVisible¶
Set SearchVisible to True to show a search box on top of your list view Shows a search box on top of your list view that can filter the content of the list. To access the search box control from code, simply loop trough the controls of your list view until you find an instance of TSearchBox. For an example, see the code snippet at FMX.ListView.TListViewBase.OnSearchChange.
- Type:
bool
- SelectionCrossfade¶
Enables the selection of Crossfade animation .
- Type:
bool
- ShowHint¶
Specifies whether the Hint can be shown. If ShowHint is set to True, a Hint string is displayed when the user moves the mouse over the control.
- Type:
bool
- ShowSelection¶
Determines whether the selection is visible when selecting list view items. The ShowSelection property can be disabled when the list view has check boxes.
- Type:
bool
- SideSpace¶
Specifies the space in logical units on all sides around the list box, encompassing the items.
- Type:
int
- Size¶
Specifies the vertical and horizontal size (Size.Height and Size.Width) of the control (in pixels). Use the Size property to read or change the size of the control.
- Type:
- StyleLookup¶
Specifies the name of the resource object to which the current TStyledControl is linked
- StyleState¶
This property allows you to define the current state of style
- TabOrder¶
Indicates the position of the control in its parent’s tab order. TabOrder is the order in which child controls are visited when the user presses the TAB key. The control with the TabOrder value of 0 is the control that has the focus when the form first appears. Initially, the tab order is always the order in which the controls were added to the form. The first control added to the form has a TabOrder value of 0, the second is 1, the third is 2, and so on. Change this by changing the TabOrder property. Each control has a unique tab-order value within its parent. Assigning TabOrder a value greater than the number of controls contained in the parent control moves the control to the end of the tab order. The control does not take on the assigned value of TabOrder, but instead is given the number that ensures that the control is the last in the tab order.
- Type:
int
- TabStop¶
Embarcadero Technologies does not currently have any additional information.
- Type:
bool
- TouchTargetExpansion¶
Set of optional pixel values you can specify to expand the touch target of a FireMonkey styled control. FMX.Controls.TControl.TouchTargetExpansion is a published property of all FireMonkey styled controls that support Touch. Defined as an FMX.Types.TBounds, TouchTargetExpansion takes four optional parameters representing the expansion of the four sides of the control in pixels (Bottom, Left, Right, Top). Each parameter specifies the size of an additional screen area that is to be treated as part of the touch target of the control. The following figure illustrates how TouchTargetExpansion expands the touch target for a FireMonkey control:
- Type:
- Transparent¶
Specifies whether this list view control is transparent or not. When the control is transparent (Transparent is set to True), its background will not be drawn.
- Type:
bool
- Visible¶
Specifies whether the component appears onscreen. Use the Visible property to control the visibility of the control at run time. If Visible is True, the control appears. If Visible is False, the control is not visible.
- Type:
bool
- Width¶
Specifies the horizontal size of the control (in pixels). Use the Width property to read or change the width of the control.
- Type:
float