MathGroup Archive 2008

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

Search the Archive

Re: can I have dynamic controls in Manipulate?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg91600] Re: can I have dynamic controls in Manipulate?
  • From: Yves Klett <yves.klett at googlemail.com>
  • Date: Thu, 28 Aug 2008 07:40:10 -0400 (EDT)
  • References: <g95k14$4uh$1@smc.vnet.net>

Axel,

have a look at "Manipulate Secrets Revealed" from WTC07:

http://library.wolfram.com/infocenter/Conferences/7001/

On slide 7 Experimental`ControlBlock is introduced. This should help to
keep interfaces tidy...

Regards,
Yves

axel schrieb:
> Hello Gurus,
> 
> I wrote a demonstration using Manipulate, which generates graphic
> output. It would be nice to have a possibility to adjust the colors
> using a ColorSlider or a ColorSetter. However, a bunch of ColorSliders
> would detract the user from the main topic. Therefore, I would like to
> have a Button "show color sliders" / "hide color sliders". Does
> anybody know how to to this?
> 
> So far I was able to minimize the controls, but I cannot have a
> dynamic string. The code is below.
> 
> Thank you in advance
> 
> Axel
> 
> ---------------------------------------------
> Manipulate[
> 
>  plotColorTxt = If[showColorControls, "Plot Color", ""];
>  bgColorTxt = If[showColorControls, "Background Color", ""];
>  plotColorEnabled = If[showColorControls, True, False];
>  Plot[Sin[a x], {x, 0, 2 Pi}, PlotStyle -> colPlot,
>   Background -> colBg],
> 
>  {{a, 1, "Frequency"}, {1, 5}, ControlPlacement -> Left},
>  {{showColorControls, True, "Color Selector"}, {False, True},
>   ControlPlacement -> Left},
>  {{colPlot, Red, plotColorTxt}, ColorSlider,
>   Enabled -> showColorControls,
>   ImageSize -> If[showColorControls, {90, 20}, {0, 0}],
>   ControlPlacement -> Left},
>  {{colBg, White, bgColorTxt}, ColorSlider,
>   Enabled -> showColorControls,
>   ImageSize -> If[showColorControls, {90, 20}, {0, 0}],
>   ControlPlacement -> Left}
>  ]
> 


  • Prev by Date: Re: Superimposing Normal on a Histogram of data
  • Next by Date: Normal Probability plot
  • Previous by thread: can I have dynamic controls in Manipulate?
  • Next by thread: Re: How to get result in shape of fraction in Mathematica