Align an element or a row of elements to the center of the row that contains it :param elem_or_row: the element or row of elements :type elem_or_row: Element | List[Element] | Tuple[Element] :param expand_x: If True/False the value will be passed to the Column El
(elem_or_row, expand_x=None, expand_y=None, background_color=None)
| 13213 | |
| 13214 | |
| 13215 | def vcenter(elem_or_row, expand_x=None, expand_y=None, background_color=None): |
| 13216 | """ |
| 13217 | Align an element or a row of elements to the center of the row that contains it |
| 13218 | |
| 13219 | :param elem_or_row: the element or row of elements |
| 13220 | :type elem_or_row: Element | List[Element] | Tuple[Element] |
| 13221 | :param expand_x: If True/False the value will be passed to the Column Elements used to make this feature |
| 13222 | :type expand_x: (bool) |
| 13223 | :param expand_y: If True/False the value will be passed to the Column Elements used to make this feature |
| 13224 | :type expand_y: (bool) |
| 13225 | :param background_color: Background color for container that is used by vcenter to do the alignment |
| 13226 | :type background_color: str | None |
| 13227 | :return: A column element containing the provided element aligned to the center or list of elements (a row) |
| 13228 | :rtype: Column | List[Column] |
| 13229 | """ |
| 13230 | |
| 13231 | if isinstance(elem_or_row, list) or isinstance(elem_or_row, tuple): |
| 13232 | return [Column([[e]], pad=(0, 0), vertical_alignment='center', expand_x=expand_x, expand_y=expand_y, background_color=background_color) for e in elem_or_row] |
| 13233 | |
| 13234 | return Column([[elem_or_row]], pad=(0, 0), vertical_alignment='center', expand_x=expand_x, expand_y=expand_y, background_color=background_color) |
| 13235 | |
| 13236 | |
| 13237 | def vbottom(elem_or_row, expand_x=None, expand_y=None, background_color=None): |