Delphi Firemonkey Styles
Views are common in commercial word-processor, spreadsheet, and project management applications.įireMonkey provides the TFlowLayout, TGridLayout, and TGridPanelLayout layouts that automatically implement predefined arrangements of child controls in grid-like panels. You can use scroll boxes to create scrolling areas within a form. The child controls stretch along with the layout when the layout is resized. TScaledLayout keeps its original size through the OriginalWidth and OriginalHeight properties.Ī scroll layout offers the possibility to scroll groups of graphical objects. Scaled LayoutĪ scaled layout is a container that offers the possibility to scale a group of graphical objects according to the physical dimensions of the layout. The available layouts can be found in the Tool Palette, under the Layouts category.Ī simple container is not visible at run time and can be used to group other controls to be manipulated as a whole.
As the size of Margins increases, the size of the layout box stays the same, and the content box shrinks if it is constrained.įireMonkey layouts are containers for other graphical objects that can be used to build complex interfaces with visual appeal. Margins set aside space on the exterior of the control’s content box. The difference between the two is the control’s Margins. More accurately, what is automatically positioned is not the control’s content box, but rather its layout box. Padding sets aside space on the interior of the parent’s content box. It defaults to alNone, so that no such automatic calculations are performed: the control stays where it is. Changing these attributes of the parent affects all the children in that sub-tree.Ī control’s Align property determines its participation in automatic positioning and/or sizing along its parent’s four sides or center, both initially and as the parent is resized. In addition to a shared coordinate space, child objects share other attributes like visibility, opacity, rotation, and scale. Moving the TEdit moves both together. TLayout can be used as an otherwise featureless container to arrange other controls. The label can have a negative position, placing it above or before the control. For example, a TLabel can be a child of the TEdit it describes. This enables ad-hoc collections of related controls without requiring a formal container. Also, the ClipChildren property defaults to False. Parentage is not restricted to container-like controls. If the coordinates are zero, the child starts at the same top-left as the parent. The Position of a child is relative to its Parent. When creating controls through code, set the Parent property to the form or the appropriate parent control. This ability to build composite controls turns the smaller set of controls it includes into a much more robust set of controls. 3D objects use a TPosition3Dwith an additional Z property, with positive values pointing into the screen (X goes to the left and Y points down, so this follows the “right-hand rule”) and a Depth Together, the position and size define one kind of bounding box that describes a control: its content box.įireMonkey Controls Have Owners, Parents, and ChildrenįireMonkey allows any control to be the parent of another.The separate Width and Height properties represent its size. The Positionproperty of a 2D control is a TPosition with X and Y properties.In the Form Designer, the origin of the coordinate system is the top-left, extending to the bottom-right. The FMX framework has mirror controls for the vast majority of VCL controls which ship with Delphi, for example, VCL and FMX both have a TEdit control, they both have a TButton control, and so on. In this way, visual controls become cross platform. The FMX framework does not depend on the Win32 API and its controls, but instead, actually opens up a rendering context using OpenGL or DirectX, and renders controls directly to that API. Component’s look and feel can be changed and reused using Styles.įireMonkey leverages the graphics processing unit (GPU) in modern desktop and mobile devices to create visually engaging applications on multiple platforms, targeting the entire range from the personal to the enterprise.įireMonkey is vector-based while the VCL is raster-based. FireMonkey platform itself is flexible, customizable and multi-platform, all components behave the same.Ĭomponents in FireMonkey are containers, it means you can embed any component inside any other component. (Formerly FireMonkey, FMX=FireMonkey X-platform). Cross platform applications are written against a framework named FMX.