Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 25 lines (19 sloc) 0.843 kB
4c5e6d4 first commit
megaannum authored
1
2 " vertical label bottom aligned in border
3 function! forms#example#labelvaligned#Make()
4 let attrs = { 'text': 'Bottom Label'}
5 let l1 = forms#newVLabel(attrs)
6 let bi1 = forms#newBorder({ 'body': l1 })
7 let va1 = forms#newVAlign({ 'body': bi1, 'alignment': 'B' })
8 let mh1 = forms#newMinHeight({ 'body': va1, 'height': 20 })
9 let bo1 = forms#newBorder({ 'body': mh1 })
10
11 let attrs = { 'text': 'Top Label'}
12 let l2 = forms#newVLabel(attrs)
13 let bi2 = forms#newBorder({ 'body': l2 })
14 let va2 = forms#newVAlign({ 'body': bi2, 'alignment': 'T' })
15 let mh2 = forms#newMinHeight({ 'body': va2, 'height': 20 })
16 let bo2 = forms#newBorder({ 'body': mh2 })
17
18 let hpoly = forms#newHPoly({'children': [bo1, bo2] })
19 let bg = forms#newBackground({ 'body': hpoly} )
20
21 let form = forms#newForm({'body': bg })
22 call form.run()
23 endfunction
24
Something went wrong with that request. Please try again.