First time here? Check out the FAQ!

Ask Your Question
0

Interact layout

asked 9 years ago

this post is marked as community wiki

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

How to make the auto_update button to the center of 2 column interact layout. Please advice

Preview: (hide)

2 Answers

Sort by » oldest newest most voted
1

answered 9 years ago

calc314 gravatar image

updated 9 years ago

You can just modify the layout to list auto_update in the second column. I believe this is what you are looking for. Based on the post by kcrismanat http://ask.sagemath.org/question/9999..., you have:

 @interact(layout={'top': [["ansA",'auto_update', "ansB"]]})
 def _(ansA=4,ansB=5,auto_update=False):
        print ansA+ansB

This works for both sagecell and sagenb (version 6.7) in the same way. In SMC, the result is a checkbox in the second column. Checking or unchecking the box results in evaluation.

Preview: (hide)
link

Comments

Does this work in all three interact implementations, Jeff? (SMC, Sagecell, sagenb)

kcrisman gravatar imagekcrisman ( 9 years ago )

It works in Sagecell. In SMC, these commands do put the "auto_update" in the center, but it is a check box and does not appear to change the functionality. I do not seem to have sagenb access anymore, unfortunately.

calc314 gravatar imagecalc314 ( 9 years ago )

Sure you do - you have a local copy of Sage you can type notebook() into, right?

kcrisman gravatar imagekcrisman ( 9 years ago )

Oh right. Mine stopped working after I upgraded to the latest Mac OS. Will see if I can do an update.

calc314 gravatar imagecalc314 ( 9 years ago )
1

I've installed the latest version of Sage and will update my answer above.

calc314 gravatar imagecalc314 ( 9 years ago )
0

answered 9 years ago

madan26 gravatar image

Thanks it is a great help. Is it possible to update button in center of both column.

Preview: (hide)
link

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

Seen: 1,030 times

Last updated: Jun 09 '15