Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (24 sloc) 1.15 kB
" two editors in borders in fixed layout
function! forms#example#fixedlayout#Make()
let attrs = {'size': 15 , 'init_text': 'one'}
let txtEditor1 = forms#newFixedLengthField(attrs)
let b1 = forms#newBorder({ 'body': txtEditor1, 'char': '*' })
let attrs = {'size': 10 , 'init_text': 'two'}
let txtEditor2 = forms#newFixedLengthField(attrs)
let b2 = forms#newBorder({ 'body': txtEditor2, 'char': '+' })
let fixedlayout = forms#newFixedLayout({
\ 'width': 30,
\ 'height': 10,
\ 'children': [b1, b2],
\ 'x_positions': [2, 10],
\ 'y_positions': [2, 7]
\ })
let bg = forms#newBackground({ 'body': fixedlayout} )
let form = forms#newForm({'body': bg })
call form.run()
endfunction
function! forms#example#fixedlayout#MakeTest()
call forms#AppendInput({'type': 'Sleep', 'time': 5})
call forms#AppendInput({'type': 'Exit'})
call forms#example#fixedlayout#Make()
endfunction
Jump to Line
Something went wrong with that request. Please try again.