Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Example 8: Using an AnchorLayout to stick the form to the top of the …

…window.
commit 6a9a815f29e3913bb4cf38125e21416ad3c7770d 1 parent e10a82e
@buchuki authored
Showing with 26 additions and 24 deletions.
  1. +2 −2 orkiv/__main__.py
  2. +24 −22 orkiv/orkiv.kv
View
4 orkiv/__main__.py
@@ -1,8 +1,8 @@
from kivy.app import App
-from kivy.uix.boxlayout import BoxLayout
+from kivy.uix.anchorlayout import AnchorLayout
-class AccountDetailsForm(BoxLayout):
+class AccountDetailsForm(AnchorLayout):
pass
View
46 orkiv/orkiv.kv
@@ -1,26 +1,28 @@
AccountDetailsForm:
<AccountDetailsForm>:
- orientation: "vertical"
- height: "200dp"
- size_hint_y: None
- GridLayout:
- cols: 2
- row_default_height: "40dp"
- row_force_default: True
- spacing: "10dp"
- padding: "10dp"
- Label:
- text: "Server"
- TextInput:
- Label:
- text: "Username"
- TextInput:
- Label:
- text: "Password"
- TextInput:
- password: True
- Button:
+ anchor_y: "top"
+ BoxLayout:
+ orientation: "vertical"
+ height: "200dp"
size_hint_y: None
- height: "40dp"
- text: "Login"
+ GridLayout:
+ cols: 2
+ row_default_height: "40dp"
+ row_force_default: True
+ spacing: "10dp"
+ padding: "10dp"
+ Label:
+ text: "Server"
+ TextInput:
+ Label:
+ text: "Username"
+ TextInput:
+ Label:
+ text: "Password"
+ TextInput:
+ password: True
+ Button:
+ size_hint_y: None
+ height: "40dp"
+ text: "Login"
Please sign in to comment.
Something went wrong with that request. Please try again.