First time here? Check out the FAQ!

Ask Your Question
1

Width of input_text boxes

asked 12 years ago

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

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 12 years ago

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

Preview: (hide)
link

Comments

Than you Jason, it's clear.

reveil gravatar imagereveil ( 12 years ago )

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: 12 years ago

Seen: 406 times

Last updated: Jun 22 '12