Ask Your Question
0

Interact layout

asked 2015-06-03 02:42:57 -0500

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 06:29:41 -0500

calc314 gravatar image

updated 2015-06-07 06:47:53 -0500

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 08:48:06 -0500 )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 08:45:25 -0500 )edit

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

kcrisman gravatar imagekcrisman ( 2015-06-04 20:35:06 -0500 )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 07:59:14 -0500 )edit
1

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

calc314 gravatar imagecalc314 ( 2015-06-07 06:43:07 -0500 )edit
0

answered 2015-06-08 22:47:19 -0500

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 02:42:57 -0500

Seen: 128 times

Last updated: Jun 08 '15