Re: Manipulate: Positioning of controls within panel
- To: mathgroup at smc.vnet.net
- Subject: [mg89598] Re: Manipulate: Positioning of controls within panel
- From: "David Park" <djmpark at comcast.net>
- Date: Sat, 14 Jun 2008 05:29:58 -0400 (EDT)
- References: <g2th9g$7m9$1@smc.vnet.net>
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
djmpark at comcast.net
http://home.comcast.net/~djmpark/
"H Hogreve" <hogreve at ifisr.org> wrote in message
news:g2th9g$7m9$1 at smc.vnet.net...
> 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
>