ListViewBase¶
Qualified name: delphifmx.ListViewBase
- class ListViewBase¶
Bases:
AdapterListView
Methods
Gets and applies the style of a TStyledControl.
Marks the end of an update session of the control and its children.
Embarcadero Technologies does not currently have any additional information.
Returns a TRectF that surrounds the specified item.
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.
Re-creates the list and updates visible item content when using native presentation.
Scrolls the view instantly (without scrolling effect) to the desired item, placing it in the view.
StopPullRefresh is a boolean method.
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
Align
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.
Anchors
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.
CanParentFocus
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
ClipChildren
Specifies if children of the control should be clipped to the control's on-screen region.
ClipParent
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
Cursor
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.
DisableFocusEffect
Specifies whether the control has the focus effect disabled.
Specifies whether scrolling this list view using the mouse wheel works or not.
DragMode
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).
EnableDragHighlight
Specifies whether the control is highlighted when the dragged object is over it.
Enabled
Specifies whether the control responds to mouse, keyboard, and timer events.
FixedSize
Embarcadero Technologies does not currently have any additional information.
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.
Height
Height specifies the vertical size of the control (in dp).
HelpContext
Contains the numeric context ID that identifies the Help topic for the control.
HelpKeyword
Contains the keyword string that identifies the Help topic for the control.
HelpType
Specifies whether the control's context-sensitive Help topic is identified by a context ID or by keyword.
Hint
Specifies the text string that appears when the user moves the mouse over a control.
HitTest
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 number of items in this list view component.
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.
LocalRect
Specifies the local rectangle for painting the control.
Locked
Specifies whether the control is locked at design time.
Margins
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.
OnGesture
Callable[[Object, GestureEventInfo, bool], None]:
Opacity
Specifies the control opacity.
Owner
Returns the Component Owner
Padding
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.
ParentedRect
Specifies the bounding rectangle of the control within its parent.
ParentedVisible
Specifies whether all the control's parents are visible.
PopupMenu
Specifies the context (pop-up) menu object.
Position
Returns an access to the position of the control inside its parent
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.
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.
List item that is currently selected on the list view.
Enables the selection of Crossfade animation .
ShowHint
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.
Size
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:
TabOrder
Indicates the position of the control in its parent's tab order.
TabStop
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.
TouchTargetExpansion
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.
Visible
Returns/Sets the Control Visibility
Width
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
- 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
- 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
- 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
- ControlType¶
Describes if the Control type is Styled or Native.
- Type:
ControlType
- 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
- 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
- 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
- EndUpdate()¶
Marks the end of an update session of the control and its children. FMX.ListView.TListViewBase.EndUpdate inherits from FMX.Controls.TControl.EndUpdate. All content below this line refers to FMX.Controls.TControl.EndUpdate. Marks the end of an update session of the control and its children. The update session must be started first by calling BeginUpdate. EndUpdate decreases the FUpdating semaphore. If all update sessions end and FUpdating is 0, EndUpdate invokes Realign to process layout changes.
See Also
FMX.Controls.TControl.FUpdating FMX.Controls.TControl.BeginUpdate FMX.Controls.TControl.IsUpdating FMX.Controls.TControl.Realign
- GetDefaultMargins()¶
Embarcadero Technologies does not currently have any additional information.
- GetItemRect(AItemIndex: int) RectF ¶
Returns a TRectF that surrounds the specified item. The GetItemRect method returns a rectangle with floating-point coordinates (TRectF) that surrounds the item specified through its index (the AItemIndex parameter).
- 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.
- ItemCount¶
Specifies the number of items in this list view component. ItemCount is a read-only property. Read the ItemCount property in order to obtain the number of list items in this list view component.
- Type:
int
- ItemIndex¶
Specifies the index of the selected item in this list view component.
- Type:
int
- 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.
- 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
- RebuildList()¶
Re-creates the list and updates visible item content when using native presentation.
- ScrollTo(AItemIndex: int) None ¶
Scrolls the view instantly (without scrolling effect) to the desired item, placing it in the view. Use the ScrollTo method in order to immediately scroll, without a slow scrolling graphical effect, to the item specified through its index (the AItemIndex parameter), and place it in the view.
- 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
- Selected¶
List item that is currently selected on the list view. This property is nil if no item is selected. To use Selected as an instance of Appearances.TListViewItem, you must cast it as such:
Delphi:
SelectedItemText := TListViewItem(TListView1.Selected).Text;
C++:
SelectedItemText = ((TListViewItem*)(TListView1->Selected))->Text;
- Type:
ListItem
- SelectionCrossfade¶
Enables the selection of Crossfade animation .
- 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
- StopPullRefresh()¶
StopPullRefresh is a boolean method. It should be called when the “pull to refresh” mode has been triggered to stop the spinning wheel. StopPullRefresh can be set to
True, as result the spinning wheel does not disappear automatically and StopPullRefresh method needs to be called after the refresh operation is done. False (default value), as result the spinning wheel disappears automatically shortly after triggering the effect. Note: This works only in native IOS control and only when the PullRefreshWait property is set to True.
- 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
- 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