CustomListBox¶
Qualified name: delphifmx.CustomListBox
- class CustomListBox¶
Bases:
ScrollBoxA 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
TStyledControl.ApplyStyleLookup() Gets and applies the style of a TStyledControl.
TCustomListBox.Assign(Source: Persistent) -> None Assigns the Source object to the current object.
Deletes all the items from the list.
Deselects all the selected items from the list box.
TCustomListBox.DragChange(SourceItem: ListBoxItem, DestItem: ListBoxItem) -> bool Generates an OnDragChange event.
TCustomListBox.FirstSelectedItemFrom(Item: ListBoxItem) -> ListBoxItem Embarcadero Technologies does not currently have any additional information.
TStyledControl.Inflate() Call this procedure to get and apply its style lookup.
TCustomListBox.ItemByIndex(Idx: int) -> ListBoxItem Returns the item at the index specified by Idx.
TCustomListBox.ItemByPoint(X: float, Y: float) -> ListBoxItem Returns the item at the specified point.
TCustomListBox.ItemsExchange(Item1: ListBoxItem, Item2: ListBoxItem) -> None Embarcadero Technologies does not currently have any additional information.
TCustomListBox.LastSelectedItemFrom(Item: ListBoxItem) -> ListBoxItem Embarcadero Technologies does not currently have any additional information.
TStyledControl.NeedStyleLookup() 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.
TCustomListBox.ScrollToItem(Item: ListBoxItem) -> None Scrolls the content so that the Item is visible.
Selects all the items in the list.
TCustomListBox.SelectRange(Item1: ListBoxItem, Item2: ListBoxItem) -> None Selects all the items between two given items.
TCustomListBox.Sort(Compare: FmxObjectSortCompare) -> None Sorts components of the layout based on the comparison function Compare.
Attributes
AbsoluteClipRectSpecifies the absolute rectangle of the control after all its parent controls clip it.
AbsoluteEnabledSpecifies whether the control is absolutely enabled.
AbsoluteHeightSpecifies the absolute height of the control.
AbsoluteMatrixSpecifies the absolute transformation matrix of the control.
AbsoluteOpacitySpecifies the absolute opacity of the control.
AbsoluteRectSpecifies the absolute rectangle that bounds the control.
AbsoluteScaleSpecifies the absolute scale of the control.
AbsoluteWidthSpecifies the absolute width of the control.
ActionClientSpecifies 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
AlignSpecifies the alignment options (top, left, client, and so on) of this control.
AnchorsSpecifies how the control is anchored to its parent.
AniCalculationsAllows you to set various parameters that control the inertial scrolling effect animation.
ApplyingEffectA flag that signals when a control is in the process of applying an effect.
AutoCaptureSpecifies whether the control captures mouse events.
AutoHideEmbarcadero Technologies does not currently have any additional information.
Specifies whether the control's text should be translated
AxisAlignedRectA TRectF defined by the width and height of the control.
Embarcadero Technologies does not currently have any additional information.
BoundsRectSpecifies the bounding rectangle of the control.
CanParentFocusSpecifies whether the parent of this control should be evaluated to receive focus.
CanvasProvides the drawing surface of the control.
ChildrenStores an array of children attached to this parent component.
ChildrenCountRead-only property that specifies the number of children in the children list.
ChildrenRectSpecifies the bigger rectangle area occupied by parent and children controls.
ClassNameReturns the TObject.ClassName
ClipChildrenSpecifies if children of the control should be clipped to the control's on-screen region.
ClipParentSpecifies whether the current control has clipped its parent.
ClipRectSpecifies the bound rectangle to be clipped.
ComObjectSpecifies the interface reference implemented by the component.
ComponentCountReturns the owned component count
ComponentIndexIndicates the position of the component in its owner's Components property array.
ComponentStateDescribes the current state of the component, indicating when a component needs to avoid certain actions.
ComponentStyleGoverns the behavior of the component.
ComponentsReturns an iterator over the owned components
ContentKeeps an object that represents a scrollable content.
ContentBoundsKeeps a rectangle bounding all controls in the content of this scroll box.
ControlsReturns an iterator over contained controls
ControlsCountReturns the count of contained controls
Determines the number of items in the list box.
CursorImage to use to represent the mouse pointer when it passes into the region covered by the control.
DataStores a Tvalue, which is a data structure that can store different kinds of data types.
Embarcadero Technologies does not currently have any additional information.
DefaultSizeEmbarcadero Technologies does not currently have any additional information.
Returns a string with the name of the default style of this control
DesignInfoContains information used by the Form designer.
DisableDisappearEmbarcadero Technologies does not currently have any additional information.
DisableFocusEffectSpecifies whether the control has the focus effect disabled.
DisableMouseWheelEmbarcadero Technologies does not currently have any additional information.
DragModeSpecifies how the control initiates drag-and-drop operations.
EnableDragHighlightSpecifies whether the control is highlighted when the dragged object is over it.
EnabledSpecifies whether the control responds to mouse, keyboard, and timer events.
Embarcadero Technologies does not currently have any additional information.
FixedSizeEmbarcadero Technologies does not currently have any additional information.
Embarcadero Technologies does not currently have any additional information.
HasAfterPaintEffectSpecifies whether the control has an effect that is applied after the control is painted.
HasClipParentControl that is a direct child of this control and has clipped this control.
HasDisablePaintEffectSpecifies whether the control's effect is painted.
HasEffectSpecifies whether the control has an applied effect.
HeightHeight specifies the vertical size of the control (in dp).
HelpContextContains the numeric context ID that identifies the Help topic for the control.
HelpKeywordContains the keyword string that identifies the Help topic for the control.
HelpTypeSpecifies whether the control's context-sensitive Help topic is identified by a context ID or by keyword.
HintSpecifies the text string that appears when the user moves the mouse over a control.
HitTestEnables the control to capture mouse events.
Defines the reference to a TCustomImageList list of images to be used to draw images on the component.
InPaintToSpecifies whether the control is currently being painted.
IndexSpecifies the index of the child object in the children array attached to this object.
InheritedCursorImage used to represent the mouse pointer when it passes into the region covered by the control.
InvertAbsoluteMatrixSpecifies the inverse matrix of AbsoluteMatrix.
IsDragOverSpecifies whether a dragged object is over the area of the current control.
IsFocusedDetermines whether the control has input focus.
IsInflatedWhether the current style of this control has been actually applied to the control.
IsMouseOverSpecifies whether the mouse cursor is over the control.
IsVisibleSpecifies 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:
LocalRectSpecifies the local rectangle for painting the control.
LockedSpecifies whether the control is locked at design time.
MarginsAligns the component to the margins points of other components.
Specifies whether multiple items can be selected in the list.
NameSpecifies the name of the component as referenced in code.
ObserversIndicates the TObservers object added to the TComponent.
OnCalcContentBoundsCallable[[Object, RectF], None]:
OnDragDropCallable[[Object, DragObject, PointF], None]:
OnDragEnterCallable[[Object, DragObject, PointF], None]:
OnDragOverCallable[[Object, DragObject, PointF, DragOperation], None]:
OnGestureCallable[[Object, GestureEventInfo, bool], None]:
OnPaintCallable[[Object, Canvas, RectF], None]:
OnPaintingCallable[[Object, Canvas, RectF], None]:
OnViewportPositionChangeCallable[[Object, PointF, PointF, bool], None]:
OpacitySpecifies the control opacity.
OwnerReturns the Component Owner
PaddingAligns the component to the padding points of other components.
ParentReturns/Sets the Control Visibility
ParentClassStyleLookupNameThe name of the default style of the parent class of this control.
ParentControlSpecifies the parent control of this control.
ParentShowHintIf True, the value of the ShowHint property of this control inherits the value of the ShowHint property of the parent control.
ParentedRectSpecifies the bounding rectangle of the control within its parent.
ParentedVisibleSpecifies whether all the control's parents are visible.
PopupMenuSpecifies the context (pop-up) menu object.
PositionAligns the component to the position points of other components (Bounds points).
PressedIndicates whether the control is currently pressed.
PressedPositionA point that indicates where exactly on the control the click occured.
RootSpecifies the root parent of this object.
RotationAngleSpecifies the amount (in degrees) by which the control is rotated from the x-axis.
RotationCenterSpecifies the position of the pivot point of the control.
ScaleSpecifies the scale of the control.
SceneSpecifies the current scene in which the control is drawn.
Returns the item that is currently selected.
ShowHintSpecifies whether the Hint can be shown.
ShowScrollBarsEmbarcadero Technologies does not currently have any additional information.
ShowSizeGripEmbarcadero Technologies does not currently have any additional information.
SizeSpecifies the vertical and horizontal size (Size.Height and Size.Width) of the control (in pixels).
StoredSpecifies whether this object is stored in the .XFM file.
Specifies the name of the resource object to which the current TStyledControl is linked
StyleNameSpecifies the style name for this FMX component.
This property allows you to define the current state of style
StylesDataValue:
TabOrderIndicates the position of the control in its parent's tab order.
TabStopEmbarcadero Technologies does not currently have any additional information.
TagStores a NativeInt integral value as a part of a component.
TagFloatCustom property that stores any floating-point value.
TagObjectCustom property that stores any object value.
TagStringCustom property that stores any string value.
TouchSpecifies the touch manager component associated with the control.
TouchTargetExpansionSet of optional pixel values you can specify to expand the touch target of a FireMonkey styled control.
UpdateRectSpecifies the rectangle area of the control that needs to be updated.
VCLComObjectRepresents information used internally by components that support COM.
ViewportPositionCoordinates of the origin of the scrolling viewport specified as the offset from the origin of the content layout of this scroll box.
VisibleSpecifies whether the component appears onscreen.
WidthSpecifies 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