#8761: sage notebook: make a new interact control (like selector) that really
works like a button
---------------------------+------------------------------------------------
   Reporter:  was          |       Owner:  jason, was
       Type:  enhancement  |      Status:  new       
   Priority:  minor        |   Milestone:  sage-5.0  
  Component:  notebook     |    Keywords:            
     Author:               |    Upstream:  N/A       
   Reviewer:               |      Merged:            
Work_issues:               |  
---------------------------+------------------------------------------------
 First, see this screenshot:
    http://sage.math.washington.edu/home/wstein/tmp/button.png

 Now imagine that when you push either of the buttons, the interact is
 triggered and the button comes back up (it does not get *stuck* down as a
 selector).

 When the interact triggers calling of the function, if this is triggered
 by a button being clicked then the corresponding variable is set to the
 value of that button (usually the text label).  Otherwise, the variable is
 set to None.  Then interact applications can tell if a button being pushed
 triggered the function being called based on whether or not the variable
 is None.

 {{{
 @interact
 def f(X = button(['Ok', 'Cancel', "Continue"])):
     print X
 }}}

 Notice that button is much like selector with buttons=True...

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/8761>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to