Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #16734
| From | Bob Hanlon <hanlonr357@gmail.com> |
|---|---|
| Newsgroups | comp.soft-sys.math.mathematica |
| Subject | Re: Nesting Manipulate to Create a Variable Number of Controls |
| Date | 2014-04-04 07:59 +0000 |
| Message-ID | <lhlood$kkd$1@smc.vnet.net> (permalink) |
| References | <20140403061701.694E06A15@smc.vnet.net> |
| Organization | Time-Warner Telecom |
If I understand what you want:
Manipulate[
Manipulate[
"test",
Evaluate[Sequence @@ Table[
Row[{
Control[Evaluate[{
{ToExpression[
"nameMenu" <>
StringJoin[ToString /@
IntegerDigits[k, 10, 2]]],
Subsuperscript["name", k, 1]},
Table[
Subsuperscript["name", k, j],
{j, 5}],
ControlType -> PopupMenu}]],
Spacer[25 - 3 Floor[Log10[k]]],
Control[Evaluate[{
{ToExpression[
"valueSlider" <>
StringJoin[ToString /@
IntegerDigits[k, 10, 2]]],
1},
1, 10, 1, Appearance -> "Labeled"}]]}],
{k, n}]]],
{{n, 3, "Number of control pairs"}, Range[10]}]
Bob Hanlon
On Thu, Apr 3, 2014 at 2:17 AM, Gregory Lypny <gregory.lypny@videotron.ca>wrote:
> 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
>
>
Back to comp.soft-sys.math.mathematica | Previous | Next | Find similar
Re: Nesting Manipulate to Create a Variable Number of Controls Bob Hanlon <hanlonr357@gmail.com> - 2014-04-04 07:59 +0000
csiph-web