dataLayout | |
Type | property |
Dictionary | widget.polylist |
Library | PolyList |
Syntax |
|
Associations | com.livecode.widget.polylist |
Summary | Defines how each item in the list is drawn. |
Description | The dataLayout property allows us to customize the list items. Being an ordered array, where each key corresponds to a subitem of the list item. Inside each key will be the properties for that element. For PolyList to draw the data, the data must have the structure defined in this property. Each subitem has the following properties. name: The name of the item, this has to coincide in the data array that comes in the dataContent property. Otherwise nothing will be displayed in this element. content-type: Defines the type of content that will be drawn in the subitem. Its possible values ??are:
- content-fit: This sub property is only available for image-data and image-file content types. it can be one of:
- margin: The margin that the content of this subitem will have. Their values must be an integer. This property overrides the margin property that is set for the widget. padding: The padding that the content of this subitem will have. Their values must be an integer. text-size: The font size of the text. This property is valid only for text and text-multiline types. Their values must be an integer. Color: Color with which the content of the sub item is drawn. Its values must be an RGBA color. align: The text alignment. This property is only valid for text and multiline text types. Its possible values are text-style: The style of the text. This property is only valid for text and multiline text types. Its possible values are fill: Whether to draw the fill in this sub item. Their values must be a boolean. fill-type: The shape that the background of the fill will have. Its can be fill-color: The color that the background of the fill will have. Its value has to be an RGBA color. fill-cornerRadius: The radius that the fill corners will have when the The following properties can be declared in percent or in exact pixels. So that the value of these is taken as pixels. Its value must end with width: The width that the subitem will have. height: The height that the subitem will have. left: The left that will have the subitem. top: The top that the subitem will have. right: The right that the subitem will have. bottom: the bottom that the subelement will have. The right and bottom properties behave differently than how these same properties behave in a LiveCode control. Since in this case the value of these properties represents the distance that it will be from that side of its parent item. So if we set right or bottom to 0, the subitem will have the same right t bottom as the containing item. |