Ask Your Question
1

Sage interact slider and textbox

asked 2011-11-18 23:31:15 -0600

sagefan gravatar image

In sage interact, I want to have a slider and a little textfield which displays the current value of the slider and conversely if I change the value of the textfield, the slider changes to that value.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2011-11-19 01:45:46 -0600

Jason Grout gravatar image

updated 2011-11-19 01:45:58 -0600

Check out the singlecell. It has a new implementation of interacts which has this:

Go to sagemath.org:5467 and do:

@interact
def _(n=(0,100)):
    print n

Just click on the number to change it.

edit flag offensive delete link more

Comments

Hm. Thanks, but this doesn't work for my local sage installation (version 4.7.1)

sagefan gravatar imagesagefan ( 2011-11-19 07:14:41 -0600 )edit

How to get the syntax highlighting in input cells as in your example on sagemath.org:5467 ?

sagefan gravatar imagesagefan ( 2011-11-19 07:46:40 -0600 )edit

The singlecell has a new implementation of interacts that is not in Sage yet. It also uses a syntax-highlighted editor that is not in Sage. The singlecell is for embedding Sage calculations in web pages. My point is that it is coming to Sage, but hasn't been added to the released version of Sage yet.

Jason Grout gravatar imageJason Grout ( 2011-11-21 18:33:02 -0600 )edit

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: 2011-11-18 23:31:15 -0600

Seen: 441 times

Last updated: Nov 19 '11