MultiView¶
Qualified name: delphifmx.MultiView
- class MultiView¶
Bases:
CustomMultiView
The class for MultiView components that allows providing the master-detail interface. With TMultiView, you can implement a master-detail interface, which can be used for any target platform (such as an iOS, Android, or desktop application). The TMultiView component provides the interface between the master and detail panes:
In the master pane, you can display a collection of visual controls, such as edit boxes, labels, lists, and so on. These controls may be linked to the concrete views on the detail pane. The detail pane displays information about the objects selected in the master pane. Whenever you change the selection in the master pane, the detail pane is updated to show details of the new selection. For more information, see Mobile Tutorial: Using a MultiView Component to Display Alternate Views of Information (iOS and Android) and FMX.MultiViewDemo sample application.
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.
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.
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 the control's text should be translated
AxisAlignedRect
A TRectF defined by the width and height of the control.
Handles appearance options of borders for MultiView components.
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
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
ControlType:
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.
CustomPresentationClass
Refers the custom class for presentations of master panes in MultiView controls.
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
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 how the control initiates drag-and-drop operations.
Handles appearance options of the master pane in the Drawer presentation mode.
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.
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 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.
Hint
Specifies the text string that appears when the user moves the mouse over a control.
Enables the control to capture mouse events.
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.
LocalRect
Specifies the local rectangle for painting the control.
Specifies whether the control is locked at design time.
Margins
Aligns the component to the margins points of other components.
Allows you to hide or show the master pane.
MasterContent
Holds the content (child controls) of the MultiView.
Specifies the presentation mode of the master pane.
Model
DataModel:
Name
Specifies the name of the component as referenced in code.
Handles the appearance options of the master pane in the NavigationPane presentation mode.
Observers
Indicates the TObservers object added to the TComponent.
Callable[[Object, bool], None]:
Callable[[Object, DragObject, PointF], None]:
Callable[[Object, DragObject, PointF], None]:
Callable[[Object, DragObject, PointF, DragOperation], None]:
OnGesture
Callable[[Object, GestureEventInfo, bool], None]:
Callable[[Object, Canvas, RectF], None]:
Callable[[Object, Canvas, RectF], None]:
Callable[[Object, MultiViewPresentationClass], 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.
ParentedRect
Specifies the bounding rectangle of the control within its parent.
ParentedVisible
Specifies whether all the control's parents are visible.
Handles appearance options of the master pane in the Popover presentation mode.
Specifies the context (pop-up) menu object.
Position
Returns an access to the position of the control inside its parent
Presentation
Object:
PresentationProxy
PresentationProxy:
PresentationState
PresentationState:
Presenter
Keeps the object providing the presentation of the master pane of the current MultiView component.
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.
Specifies the scale of the control.
Scene
Specifies the current scene in which the control is drawn.
Handles appearance options of a shadow that the master pane casts on the detail pane.
ShowHint
Specifies whether the Hint can be shown.
Specifies the vertical and horizontal size (Size.Height and Size.Width) of the control (in pixels).
Handles appearance options of the master pane in the Panel presentation mode.
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.
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.
Specifies a datail pane container (such as TPanel) showing elements described in the master pane.
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.
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
- ApplyStyleLookup()¶
Gets and applies the style of a TStyledControl.
- AutoTranslate¶
Specifies whether the control’s text should be translated
- BorderOptions¶
Handles appearance options of borders for MultiView components. TMultiViewBorderOptions defines the Color and Visible properties.
- Type:
MultiViewBorderOptions
- 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¶
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
- 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
- DrawerOptions¶
Handles appearance options of the master pane in the Drawer presentation mode. The DrawerOptions property handles the following options:
DurationSliding: specifies the duration of the master pane sliding (in seconds). Mode: specifies the master pane sliding mode. Placement: specifies the master pane location (left or right). TouchAreaSize: specifies the touch area size (in pixels).
- Type:
DrawerAppearance
- 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
- 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
- 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
- Inflate()¶
Call this procedure to get and apply its style lookup.
- 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
- MasterButton¶
Allows you to hide or show the master pane. If your application has no master button, leave the MasterButton property empty.
Limitations The master button cannot be used when:
The button is invisible and if the Mode property is set to Panel presentation mode. That is, the master pane is a “docked panel”. The onClick event handler is not supported.
- Type:
- Mode¶
Specifies the presentation mode of the master pane. The TMultiViewMode type provides the following presentation modes:
Mode
Master Pane Presentation
Drawer
In the Drawer mode, the master pane can be whether hidden or can slide to overlap the detail pane.
Panel
Master and detail panels are always displayed, independently of a device type and orientation. The master panel is docked to the left or right of the MultiView component.
PlatformBehaviour
An application automatically selects the master pane presentation mode depending on the device type and orientation, as described in the tables in the Platform Dependent Behavior Mode subsection below.
Popover
Pop-up menu.
NavigationPane
Navigation pane.
Custom
The user can customize the master pane presentation. The custom presentation class should be set in the CustomPresentationClass property. For details, see Custom Mode description.
For detailed information about the presentation modes, see Master Pane Presentation Modes.
Platform Dependent Behavior Mode In the PlatformBehaviour mode, you let the application automatically select the master pane presentation mode. In this scenario, the application behavior depends on the device type, orientation, and the operation system version (only for desktop applications) as described in the following tables: Mobile Applications
Device Type
Device Orientation
Master Pane Presentation
Phone
Landscape, Portrait
Drawer (push/overlap)
Tablet
Landscape
Docked panel
Tablet
Portrait
Drawer (push/overlap)
Desktop Applications
OS Version
Master Pane Presentation
Windows 10
Navigation pane
Windows 8 or earlier
Docked panel
OS X
Docked panel
- Type:
MultiViewMode
Handles the appearance options of the master pane in the NavigationPane presentation mode. With NavigationPaneOptions, you can manage the CollapsedWidth property of the master pane appearance of the current MultiView component. CollapsedWidth specifies the width (in pixels) of the master pane in the NavigationPane presentation mode when it is collapsed.
- Type:
NavigationPaneAppearance
- NeedStyleLookup()¶
Call this procedure to indicate that this control requires to get and apply its style lookup.
- OnCanFocus¶
Callable[[Object, bool], None]:
- OnDragDrop¶
Callable[[Object, DragObject, PointF], None]:
- OnDragEnter¶
Callable[[Object, DragObject, PointF], None]:
- OnDragOver¶
Callable[[Object, DragObject, PointF, DragOperation], None]:
- OnPaint¶
Callable[[Object, Canvas, RectF], None]:
- OnPainting¶
Callable[[Object, Canvas, RectF], None]:
- OnPresenterChanging¶
Callable[[Object, MultiViewPresentationClass], 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:
- PopoverOptions¶
Handles appearance options of the master pane in the Popover presentation mode. In the Popover presentation mode, the master pane is a pop-up menu, which can be displayed or hidden using the master button. The PopoverOptions property allows you to handle the following options:
AppearanceDuration: specifies the duration of the pop-up window appearance (in seconds). By default, this property is set to 0.25 s. PopupHeight: specifies the height of the pop-up window (in pixels). By default, this property is set to 400px. StyleLookup: specifies the name of the resource object (style) to which this pop-up window is linked. TintColor: specifies the tint applied to this pop-up window.
- Type:
PopoverAppearance
- 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:
- 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:
- ShadowOptions¶
Handles appearance options of a shadow that the master pane casts on the detail pane. With ShadowOptions property, you can handle the following appearance options of the shadow:
Color: specifies the shadow color. Enabled: enables or disables the shadow. Opacity: specifies the opacity level of the shadow.
- Type:
ShadowAppearance
- 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:
- SplitViewOptions¶
Handles appearance options of the master pane in the Panel presentation mode. With SplitViewOptions property, you can handle the Placement option. Placement specifies the docked master pane location (left, right, top, or bottom).
- Type:
SplitViewAppearance
- 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
- TargetControl¶
Specifies a datail pane container (such as TPanel) showing elements described in the master pane. For more information about the master-detail interface, see Mobile Tutorial: Using a MultiView Component to Display Alternate Views of Information (iOS and Android).
Limitations See FireMonkey Native iOS Controls: Combining Native iOS Controls With Non-native Controls for more information about the limitations when using native controls.
Exceptions Setting TargetControl may raise the following exception:
Exception
Exception.Message
Scenarios
EComponentError
TargetControl cannot be a child of TMultiView.
You set a child control of a TMultiView as the TargetControl of that TMultiView. You set a TMultiView as the TargetControl of itself.
- Type:
- 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:
- 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