-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexample.kv
More file actions
45 lines (39 loc) · 1017 Bytes
/
example.kv
File metadata and controls
45 lines (39 loc) · 1017 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#:include textinputlinenumber.kv
<ExampleRoot@BoxLayout>:
lines_show: lines_show
cursor_col_show: cursor_col_show
cursor_row_show: cursor_row_show
lni:lni
ti: ti
orientation: 'vertical'
TextInputLineNumber:
id: lni
BoxLayout:
size_hint_y: .05
orientation: 'horizontal'
Label:
text: 'Lines:'
Label:
id: lines_show
text: str(lni.amount_lines)
Label:
text: 'Cursor Column:'
Label:
id: cursor_col_show
text: str(lni.cursor[0])
Label:
text: 'Cursor Row:'
Label:
id: cursor_row_show
text: str(lni.cursor[1])
Label:
text: 'Scroll Y:'
Label:
id: cursor_row_show
text: str(round(lni.scroll_y, 2))
Button:
text: "Append Lorem Ipsum"
on_press: root.append_lorem_ipsum()
size_hint_x: 3
TextInput:
id: ti