First time here? Check out the FAQ!

Ask Your Question
1

Sage interact slider and textbox

asked 13 years ago

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.

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 13 years ago

Jason Grout gravatar image

updated 13 years ago

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.

Preview: (hide)
link

Comments

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

sagefan gravatar imagesagefan ( 13 years ago )

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

sagefan gravatar imagesagefan ( 13 years ago )

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 ( 13 years ago )

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: 13 years ago

Seen: 1,125 times

Last updated: Nov 19 '11