MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Combining Slider and SetterBar in Manipulate

  • To: mathgroup at smc.vnet.net
  • Subject: [mg114946] Combining Slider and SetterBar in Manipulate
  • From: JohnH <ununquadium113 at yahoo.com>
  • Date: Thu, 23 Dec 2010 03:56:25 -0500 (EST)

I am looking for a solution to what should be a common and simple
problem. I have a slider to control time, but I also want to use a
SetterBar to pick out some interesting dates. The bare bones of my
current attempt is:

Block[{someData},
Manipulate[
ListLinePlot[someData[[tinx,2;;]]],
{{tinx,1,"Time"},1,25,1},
{{qt,7,"Special"},{7->"Rising",5->"Smile",20->"Saws",12-
>"Falling"},ControlType->SetterBar},
Pane[Text@Dynamic[tinx]],
ControlPlacement->Top,
Initialization:>(
someData=Table[Sin[i j]*Cos[j]//N,{i,25},{j,12}];
tinx=1)
]
]

Ideally, none of the setter buttons would be selected if the time was
not one of the special ones.  Clicking on one of the setter buttons
would set the time to that value.

Any suggestions would be appreciated.


  • Prev by Date: Re: what's wrong with this?!!
  • Next by Date: Fixing padding inside Inset
  • Previous by thread: 2 obvious
  • Next by thread: Re: Combining Slider and SetterBar in Manipulate