Ask Your Question
1

Sage interact slider and textbox

asked 2011-11-19 06:31:15 +0100

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 08:45:46 +0100

Jason Grout gravatar image

updated 2011-11-19 08:45:58 +0100

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 14:14:41 +0100 )edit

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

sagefan gravatar imagesagefan ( 2011-11-19 14:46:40 +0100 )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-22 01:33:02 +0100 )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-19 06:31:15 +0100

Seen: 1,085 times

Last updated: Nov 19 '11