OpenSource For You

Layouts

-

Kivy has a container widget, which controls the position and size of embedded widgets or child widgets called Layouts. It has two properties named size_hint and pos_hint, which determine the size and position of children. The values of size_hint are given in percentage­s and not in pixels; and the percentage is indicated as within the range of 0 – 1, where 0 means 0 per cent and 1 is 100 per cent. It also expects values to be None or defaults.

You can make a widget with half the width and height of the parent, as follows:

The syntax is:

Newspapers in English

Newspapers from India