Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 30 lines (24 sloc) 1.044 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
ee21b40 Better support for both 'light' and 'dard' backgrounds.
megaannum authored
25 function! forms#example#labelvaligned#MakeTest()
26 call forms#AppendInput({'type': 'Sleep', 'time': 5})
27 call forms#AppendInput({'type': 'Exit'})
28 call forms#example#labelvaligned#Make()
29 endfunction
Something went wrong with that request. Please try again.