-
Notifications
You must be signed in to change notification settings - Fork 4
/
layout_labels_horizontally.vim
34 lines (27 loc) · 1.09 KB
/
layout_labels_horizontally.vim
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
"---------------------------------------------------------------------------
" forms#tutorial#layout_labels_horizontally#Make()
" Create a row of 3 Labels in a form.
"
" parameters: None
"---------------------------------------------------------------------------
function! forms#tutorial#layout_labels_horizontally#Make()
let attrs = {'text': 'Label One'}
let labelOne = forms#newLabel(attrs)
let attrs = {'text': 'Label Two'}
let labelTwo = forms#newLabel(attrs)
let attrs = {'text': 'Label Three'}
let labelThree = forms#newLabel(attrs)
let hspace = forms#newHSpace({'size': 2})
let hpoly = forms#newHPoly({'children': [
\ labelOne,
\ hspace,
\ labelTwo,
\ hspace,
\ labelThree
\ ]})
let form = forms#newForm({'body': hpoly })
function! form.purpose() dict
return "This is Help associated with the\nHorizontal Layout Label Tutorial Form."
endfunction
call form.run()
endfunction