MathGroup Archive 2008

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

Search the Archive

Re: Manipulate: Positioning of controls within panel

  • To: mathgroup at
  • Subject: [mg89661] Re: Manipulate: Positioning of controls within panel
  • From: Januk <ggroup at>
  • Date: Tue, 17 Jun 2008 00:36:40 -0400 (EDT)
  • References: <g2th9g$7m9$> <g30356$mbs$>

Hi David,

One point of clarification, your post implies that DynamicModule and
Manipulate provide overlapping functionality.  They do not.  In very
basic terms:
 -- Manipulate is a relatively quick and easy way to create Dynamic
objects and to create an interactive interface.
 -- DynamicModule is a way of localizing symbols and data to an object
in a notebook.

So, Manipulate and DynamicModule do not provide overlapping
functionality.  In fact, often you might want to use a Manipulate
inside a DynamicModule.  See the Mathematica Demonstrations websites
for many examples of exactly this.

In your example, the DynamicModule command could be eliminated and
you'd still have something that works like a Manipulate.  The
DynamicModule wrapper simply allows the a1 and a2 symbols to be
localized and stored in the DynamicModule object rather than in the
session.  What this means is that, with the DynamicModule, you could
quit your kernel and still interact with the output.  This is very
useful if you want to create an application for other users, but want
to limit their exposure to Mathematica code.  You can create a
DynamicModule and then give them a notebook with only the one output
cell that contains the DynamicModule.

Hope that helps,

On Jun 14, 5:31 am, "David Park" <djmp... at> wrote:
> Rather than use a Manipulate, which is convenient for many cases but not
> very customizable, why not directly use a DynamicModule. It's really not
> that difficult and when you customize it's really much easier.
> Here is an example. We create a Column that has a title row, an input row,
> and a results row. You could actually have a more fancy Grid structure that
> might include all kinds of input controls, plots and outputs.
> DynamicModule[
> {a1=False,a2=False},
> Column[{
> Style["Some Common Logic Operations",16,"Panel",Background->None],
> Row[{"a1: ",Checkbox[Dynamic[a1]],Spacer[20],"a2: ",Checkbox[Dynamic[a2]]}],
> Dynamic@Row[{"a1"\[And]"a2: ",a1\[And]a2,Spacer[10],"a1"\[Or]"a2:
> ",a1\[Or]a2,Spacer[10],"Nor[a1, a2]: ",Nor[a1,a2]}]//TraditionalForm}](* Column *)
> ]
> --
> David Park
> djmp... at comcast.net
> "H Hogreve" <hogr... at> wrote in message
> news:g2th9g$7m9$1 at
> > Probably it is not a difficult task, but unfortunately
> > I cannot figure out how to place two (or more) controls
> > into the same line in the panel of manipulate. For example,
> > in
> >  Manipulate[{a1, a2}, {a1, {True, False}}, {a2, {True, False}}]
> > it certainly makes sense to have the two Checkboxes
> > aligned in one horizontal line. But, while outside
> > manipule the command
> >  Row[Table[Checkbox[], {i, 1, 2}]]
> > yields two Checkboxes in a line, I did not succeed making
> > something similar work in manipulate.
> > Any help will be appreciated.
> > Many thanks in advance,  H. Hogreve- Hide quoted text -
> - Show quoted text -

  • Prev by Date: Re: Re: Nested Grids
  • Next by Date: Re: minor progress with 6.0 Documentation
  • Previous by thread: Re: Manipulate: Positioning of controls within panel
  • Next by thread: Re: Re: Manipulate: Positioning of controls within panel