Ask Your Question
0

Interact layout

asked 2015-06-03 09:42:57 +0200

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

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-06-03 13:29:41 +0200

calc314 gravatar image

updated 2015-06-07 13:47:53 +0200

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.

edit flag offensive delete link more

Comments

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

kcrisman gravatar imagekcrisman ( 2015-06-03 15:48:06 +0200 )edit

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 ( 2015-06-04 15:45:25 +0200 )edit

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

kcrisman gravatar imagekcrisman ( 2015-06-05 03:35:06 +0200 )edit

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

calc314 gravatar imagecalc314 ( 2015-06-05 14:59:14 +0200 )edit
1

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

calc314 gravatar imagecalc314 ( 2015-06-07 13:43:07 +0200 )edit
0

answered 2015-06-09 05:47:19 +0200

madan26 gravatar image

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

edit flag offensive delete link more

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: 2015-06-03 09:42:57 +0200

Seen: 622 times

Last updated: Jun 09 '15