mirror of https://github.com/kivy/kivy.git
add list of layouts to widgets.rst (newguide) and some rewording
This commit is contained in:
parent
9c632b1ba9
commit
75b7581c9f
|
@ -15,10 +15,10 @@ Manipulating the Widget tree
|
||||||
|
|
||||||
Widgets are organized in Trees, your application have a root widget, which
|
Widgets are organized in Trees, your application have a root widget, which
|
||||||
usually have children, which can have children on their own. Children of a
|
usually have children, which can have children on their own. Children of a
|
||||||
widget are represented as a :class:`kivy.properties.ListProperty`
|
widget are represented as the :attr:`kivy.uix.widget.Widget.children`
|
||||||
:attr:`kivy.uix.widget.Widget.children`. The way to add a children to a widget
|
:class:`kivy.properties.ListProperty`. The way to add a children to a widget is
|
||||||
is to call :meth:`kivy.uix.widget.Widget.add_widget`, likely, to remove a
|
to call :meth:`kivy.uix.widget.Widget.add_widget`, likely, to remove a widget,
|
||||||
widget, you use :meth:`kivy.uix.widget.Widget.remove_widget`.
|
you use :meth:`kivy.uix.widget.Widget.remove_widget`.
|
||||||
|
|
||||||
Organize with Layouts
|
Organize with Layouts
|
||||||
---------------------
|
---------------------
|
||||||
|
@ -30,6 +30,16 @@ they use (even if differently) of the :attr:`kivy.uix.widget.Widget.size_hint`
|
||||||
and :attr:`kivy.uix.widget.Widget.pos_hint` properties. Those properties allow
|
and :attr:`kivy.uix.widget.Widget.pos_hint` properties. Those properties allow
|
||||||
to define size and pos of the widget relatively to the parent layout.
|
to define size and pos of the widget relatively to the parent layout.
|
||||||
|
|
||||||
|
Look at the documentation of the various Layouts to see to which situation each
|
||||||
|
one applies:
|
||||||
|
|
||||||
|
- :mod:`kivy.uix.floatlayout`
|
||||||
|
- :mod:`kivy.uix.boxlayout`
|
||||||
|
- :mod:`kivy.uix.gridlayout`
|
||||||
|
- :mod:`kivy.uix.stacklayout`
|
||||||
|
- :mod:`kivy.uix.relativelayout`
|
||||||
|
- :mod:`kivy.uix.anchorlayout`
|
||||||
|
|
||||||
Seperate with Screen Manager
|
Seperate with Screen Manager
|
||||||
----------------------------
|
----------------------------
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue