MathGroup Archive 2014

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

Search the Archive

Nesting Manipulate to Create a Variable Number of Controls

  • To: mathgroup at smc.vnet.net
  • Subject: [mg132504] Nesting Manipulate to Create a Variable Number of Controls
  • From: Gregory Lypny <gregory.lypny at videotron.ca>
  • Date: Thu, 3 Apr 2014 02:17:01 -0400 (EDT)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • Delivered-to: l-mathgroup@wolfram.com
  • Delivered-to: mathgroup-outx@smc.vnet.net
  • Delivered-to: mathgroup-newsendx@smc.vnet.net

Hello everyone,

I used the example in the Documentation Center to create a Manipulate with a variable number of controls. Here is the example:

Manipulate[
 With[{value = Table[c[i], {i, 1, n}], 
   controls = Sequence @@ Table[{c[i], 0, 1}, {i, 1, n}]}, 
  Manipulate[value, controls]], {n, 1, 10, 1}]

How would I change the code above so that it produces pairs on controls side by side? So if n=3, the control area would look like this.

nameMenu1    valueSlider1
nameMenu2    valueSlider2
nameMenu3    valueSlider3

Any tip would be much appreciated,

Gregory



  • Prev by Date: Re: bug in InputForm (Mathematica 9)?
  • Next by Date: Efficient function to accumulate a list of {value,coord} into array
  • Previous by thread: Re: Solve output depends on previous attempt with bad syntax
  • Next by thread: Re: Nesting Manipulate to Create a Variable Number of Controls