Interact layout
How to make the auto_update button to the center of 2 column interact layout. Please advice
asked 9 years ago
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
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 kcrisman
at 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.
Does this work in all three interact implementations, Jeff? (SMC, Sagecell, sagenb)
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.
Sure you do - you have a local copy of Sage you can type notebook()
into, right?
Oh right. Mine stopped working after I upgraded to the latest Mac OS. Will see if I can do an update.
I've installed the latest version of Sage and will update my answer above.
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 9 years ago
Seen: 1,030 times
Last updated: Jun 09 '15