Width of input_text boxes

i like this post (click again to cancel)
1
i dont like this post (click again to cancel)

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' ?)

asked Jun 21 '12

this post is marked as community wiki

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

updated Jun 21 '12

calc314 gravatar image calc314
1820 3 19 51
i like this answer (click again to cancel)
1
i dont like this answer (click again to cancel)

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

link

answered Jun 22 '12

this post is marked as community wiki

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

updated Jun 22 '12

Jason Grout gravatar image Jason Grout
3185 7 27 71

Than you Jason, it's clear.

reveil (Jun 22 '12)

Your answer

Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!
[hide preview]

Question tools

Tags:

Stats:

Asked: Jun 21 '12

Seen: 42 times

Last updated: Jun 22 '12

powered by ASKBOT version 0.7.22
Copyright Sage, 2010. Some rights reserved under creative commons license.