Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: Manipulate with Wrapping SetterBars

  • To: mathgroup at smc.vnet.net
  • Subject: [mg80439] Re: Manipulate with Wrapping SetterBars
  • From: m.r at inbox.ru
  • Date: Wed, 22 Aug 2007 04:50:49 -0400 (EDT)
  • References: <fabgb6$i7i$1@smc.vnet.net>

On Aug 20, 2:37 am, "David Park" <djmp... at comcast.net> wrote:
> I always find that there is a disconnect in the documentation in specifying
> the operation of various ControlTypes in Manipulate. Various Control
> elements have options but it is never quite clear how these options are to
> be supplied to the Manipulate statement.
>
> So here is a simple case that has me stymied. I want to display a long
> SetterBar and I want it to wrap to the size of the displayed expression. But
> I can't make the SetterBar wrap even though, according to the documentation,
> there is a SetterBar option that is suppose to make it wrap - and does for
> one example.
>
> nvalues = Flatten[Table[{2, 3, 5, 7, 10} 10^i, {i, 0, 4}]];
> Manipulate[
>  Row[{Text["The value of the parameter n used in this case is: "],
>    n}],
>  {{n, First[nvalues], "n: "}, nvalues, ControlType -> SetterBar,
>   Appearance -> "Row"}]
>
> I don't think the Appearance->"Row" option is even being picked up.
>
> And even if it does get picked up, how can I control the wrapping width of
> the SetterBar?
>
> Thanks for any help.
>
> --
> David Park
> djmp... at comcast.nethttp://home.comcast.net/~djmpark/

You can try using Pane, possibly with different settings for
ImageSizeAction:

nvalues = Flatten[Table[{2, 3, 5, 7, 10} 10^i, {i, 0, 4}]];
Manipulate[
  Pane[Text@ StringForm[
      "The value of the parameter n used in this case is: ``", n],
    {xsz, 60}],
  Style@ Pane[Row@
      {"n: ",
        SetterBar[Dynamic[n], nvalues, Appearance -> "Row"]},
    {xsz, ysz}],
 {{xsz, 250}, 100, 700, 1}, {{ysz, 100}, 20, 200, 1}, {{n, 2}, None}]

Maxim Rytin
m.r at inbox.ru



  • Prev by Date: Re: On partitioning lists by intervals
  • Next by Date: listplot and legend (again)
  • Previous by thread: Re: Manipulate with Wrapping SetterBars
  • Next by thread: Re: Manipulate with Wrapping SetterBars