Ask Your Question
1

Width of input_text boxes

asked 2012-06-21 15:56:31 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

Does layout syntax allow to modify following example

@interact(layout=[['a','b'],['c','d']])
def _(a=1,b=2,c=3,d=4):
    print a+b+c+d

in order to control the width of the four input text boxes ?

(I know that

@ interact
def _(a=input_text(a=1, width=15), b=...)

makes this possible, the question is : 'can we do that inside layout' ?)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2012-06-22 16:34:29 +0100

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

All that goes in the layout parameter is the name; everything else goes in the function definition:

@interact(layout=[['a','b'],['c','d']])
def _(a=input_box('1', width=3), b=2,c=3,d=4):
    print a+b+c+d

See this example

edit flag offensive delete link more

Comments

Than you Jason, it's clear.

reveil gravatar imagereveil ( 2012-06-22 23:18:08 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2012-06-21 15:56:31 +0100

Seen: 377 times

Last updated: Jun 22 '12