documentation index ◦ reference manual ◦ function index

# ui.side

Function: | ui.side | (places, style='default', **properties):

This positions child widgets so that they surround a parent widget. It takes a single argument, places, which controls where each child widget is placed. Places is expected to be iterable, and each element should be in the list:

'c', 't', 'b', 'l', 'r', 'tl', 'tr', 'bl', 'br'

'c' means center, 't' top, 'tl' top left, 'br' bottom right, and so on. A side should be given the same number of children as the number of entries in the places list.

The top and bottom children are rendered with a 0 requested height, while the left and right children are rendered with a 0 requested width. It is therefore suggested that you enforce a minimum width on the children that are placed in these slots.

The center widget is rendered before the others. Other than that, the order widgets are rendered in is undefined.

## Example

        python:
            ui.side(['c', 'b', 'r'], spacing=5)
            vp = ui.viewport(xmaximum=200, ymaximum=200)
            ui.image("mainmenu.jpg")
            ui.bar(adjustment=vp.xadjustment, style='scrollbar')
            ui.bar(adjustment=vp.yadjustment, style='vscrollbar')
            ui.close()

            ui.textbutton("Done", ui.returns(True))

            ui.interact()

documentation index ◦ reference manual ◦ function index