CustomListBox¶
Qualified name: delphifmx.CustomListBox
- class CustomListBox¶
Bases:
ScrollBox
A TCustomListBox is the base class for list box components. Inherits from TCustomListBox to create a control that represents a specialized list box.
List Box Events TCustomListBox has events that are generic to the list box control, and other events that are specific to the items:
Events that are generic to the list box control: Events such as OnClick, OnDblClick, OnEnter, and OnMouseDown are inherited events, and they refer to the event that occurs in the list box control. Events that are specific to the items of the list box: Events such as OnItemClick, OnChange, OnChangeCheck, OnCompare, and OnDragChange are specific to the list box item, and they refer to events that occur in the items of the list box. Therefore it is important to see, for example, the difference between OnClick that occurs when the list box is clicked, and OnItemClick that occurs when a list box item is clicked. See the full list of TCustomListBox events in FMX.ListBox.TCustomListBox_Events.
Methods
Gets and applies the style of a TStyledControl.
Assigns the Source object to the current object.
Deletes all the items from the list.
Deselects all the selected items from the list box.
Generates an OnDragChange event.
Embarcadero Technologies does not currently have any additional information.
Call this procedure to get and apply its style lookup.
Returns the item at the index specified by Idx.
Returns the item at the specified point.
Embarcadero Technologies does not currently have any additional information.
Embarcadero Technologies does not currently have any additional information.
Call this procedure to indicate that this control requires to get and apply its style lookup.
Embarcadero Technologies does not currently have any additional information.
Scrolls the content so that the Item is visible.
Selects all the items in the list.
Selects all the items between two given items.
Sorts components of the layout based on the comparison function Compare.
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.
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.
Anchors
Specifies how the control is anchored to its parent.
AniCalculations
Allows you to set various parameters that control the inertial scrolling effect animation.
ApplyingEffect
A flag that signals when a control is in the process of applying an effect.
AutoCapture
Specifies whether the control captures mouse events.
AutoHide
Embarcadero Technologies does not currently have any additional information.
Specifies whether the control's text should be translated
AxisAlignedRect
A TRectF defined by the width and height of the control.
Embarcadero Technologies does not currently have any additional information.
BoundsRect
Specifies the bounding rectangle of the control.
CanParentFocus
Specifies whether the parent of this control should be evaluated to receive focus.
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
Content
Keeps an object that represents a scrollable content.
ContentBounds
Keeps a rectangle bounding all controls in the content of this scroll box.
Controls
Returns an iterator over contained controls
ControlsCount
Returns the count of contained controls
Determines the number of items in the list box.
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.
Embarcadero Technologies does not currently have any additional information.
DefaultSize
Embarcadero Technologies does not currently have any additional information.
Returns a string with the name of the default style of this control
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.
DisableMouseWheel
Embarcadero Technologies does not currently have any additional information.
DragMode
Specifies how the control initiates drag-and-drop operations.
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.
Embarcadero Technologies does not currently have any additional information.
FixedSize
Embarcadero Technologies does not currently have any additional information.
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.
Embarcadero Technologies does not currently have any additional information.
Specifies the index of the currently selected item.
Specifies the items in the list box.
ListBoxItem:
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.
Specifies whether multiple items can be selected in the list.
Name
Specifies the name of the component as referenced in code.
Observers
Indicates the TObservers object added to the TComponent.
OnCalcContentBounds
Callable[[Object, RectF], None]:
OnDragDrop
Callable[[Object, DragObject, PointF], None]:
OnDragEnter
Callable[[Object, DragObject, PointF], None]:
OnDragOver
Callable[[Object, DragObject, PointF, DragOperation], None]:
OnGesture
Callable[[Object, GestureEventInfo, bool], None]:
OnPaint
Callable[[Object, Canvas, RectF], None]:
OnPainting
Callable[[Object, Canvas, RectF], None]:
OnViewportPositionChange
Callable[[Object, PointF, PointF, 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.
ParentShowHint
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.
PopupMenu
Specifies the context (pop-up) menu object.
Position
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.
Root
Specifies the root parent of this object.
RotationAngle
Specifies the amount (in degrees) by which the control is rotated from the x-axis.
RotationCenter
Specifies the position of the pivot point of the control.
Scale
Specifies the scale of the control.
Scene
Specifies the current scene in which the control is drawn.
Returns the item that is currently selected.
ShowHint
Specifies whether the Hint can be shown.
ShowScrollBars
Embarcadero Technologies does not currently have any additional information.
ShowSizeGrip
Embarcadero Technologies does not currently have any additional information.
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.
UpdateRect
Specifies the rectangle area of the control that needs to be updated.
VCLComObject
Represents information used internally by components that support COM.
ViewportPosition
Coordinates of the origin of the scrolling viewport specified as the offset from the origin of the content layout of this scroll box.
Visible
Specifies whether the component appears onscreen.
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
- ApplyStyleLookup()¶
Gets and applies the style of a TStyledControl.
- Assign(Source: Persistent) None ¶
Assigns the Source object to the current object. Assign copies the elements from Source to the current object, if Source is a TStrings object.
- AutoTranslate¶
Specifies whether the control’s text should be translated
- BorderHeight¶
Embarcadero Technologies does not currently have any additional information.
- Type:
float
- Clear()¶
Deletes all the items from the list. Clear removes the items from the list box and also frees the memory allocated for them. The items in the list box are stored as TListBoxItem objects.
- ClearSelection()¶
Deselects all the selected items from the list box. If no items are selected before calling ClearSelection, nothing happens.
- Count¶
Determines the number of items in the list box.
- Type:
int
- DefaultItemStyles¶
Embarcadero Technologies does not currently have any additional information.
- Type:
ListBoxItemStyleDefaults
- DefaultStyleLookupName¶
Returns a string with the name of the default style of this control
- DragChange(SourceItem: ListBoxItem, DestItem: ListBoxItem) bool ¶
Generates an OnDragChange event. DragChange is called automatically after a drag-and-drop operation.
- FilterPredicate¶
Embarcadero Technologies does not currently have any additional information.
- Type:
Predicate<System.string>
- FirstSelectedItemFrom(Item: ListBoxItem) ListBoxItem ¶
Embarcadero Technologies does not currently have any additional information.
- GroupingKind¶
Embarcadero Technologies does not currently have any additional information.
- Type:
ListGroupingKind
- 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.
- ItemByIndex(Idx: int) ListBoxItem ¶
Returns the item at the index specified by Idx.
- ItemByPoint(X: float, Y: float) ListBoxItem ¶
Returns the item at the specified point. Call ItemByPoint to get the item that contains in its bounds the point specified by X and Y.
- ItemDown¶
Embarcadero Technologies does not currently have any additional information.
- Type:
- ItemIndex¶
Specifies the index of the currently selected item. Gets or sets the index of the item that is selected in the list box. The first item in the list has index 0, the second item has index 1, and so on. If no item is selected, the value of ItemIndex is -1. To get the actual item that is selected, use the Selected property.
- Type:
int
- Items¶
Specifies the items in the list box. Use Items to get or set the list of items in the list box as strings. Use the ListItems property to access an item by specifying its index. This property returns the item as a TListBoxItem object.
Adding Items To add items as TListBoxItem at design-time, see ListBox Items Editor. To add items as TStrings at design-time, see String List editor.
- Type:
- ItemsExchange(Item1: ListBoxItem, Item2: ListBoxItem) None ¶
Embarcadero Technologies does not currently have any additional information.
- LastSelectedItemFrom(Item: ListBoxItem) ListBoxItem ¶
Embarcadero Technologies does not currently have any additional information.
- ListItems¶
ListBoxItem:
- MultiSelect¶
Specifies whether multiple items can be selected in the list. If MultiSelect is set to True, you can select more than one item from the list, otherwise you are limited to one item.
- Type:
bool
- NeedStyleLookup()¶
Call this procedure to indicate that this control requires to get and apply its style lookup.
- NotifyInflated()¶
Embarcadero Technologies does not currently have any additional information.
- ScrollToItem(Item: ListBoxItem) None ¶
Scrolls the content so that the Item is visible.
- SelectAll()¶
Selects all the items in the list. SelectAll works only if MultiSelect is set to True.
- SelectRange(Item1: ListBoxItem, Item2: ListBoxItem) None ¶
Selects all the items between two given items. SelectRange selects the items between Item1 and Item2 (including Item1 and Item2) and deselects any other previously selected items. SelectRange works only if MultiSelect is set to True.
- Selected¶
Returns the item that is currently selected. If no item is selected, it returns nil. To obtain the index of the item that is currently selected, use the ItemIndex property.
- Type:
- Sort(Compare: FmxObjectSortCompare) None ¶
Sorts components of the layout based on the comparison function Compare. FMX.ListBox.TCustomListBox.Sort inherits from FMX.Layouts.TCustomScrollBox.Sort. All content below this line refers to FMX.Layouts.TCustomScrollBox.Sort. Sorts components of the layout based on the comparison function Compare. TFmxObjectSortCompare is declared as:
TFmxObjectSortCompare = function(item1, item2: TFmxObject): Integer;
- 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