MathGroup Archive 2009

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

Search the Archive

Re: Application GUI in Mathematica

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98967] Re: Application GUI in Mathematica
  • From: Albert Retey <awnl at gmx-topmail.de>
  • Date: Wed, 22 Apr 2009 06:33:26 -0400 (EDT)
  • References: <gsmmr5$ctq$1@smc.vnet.net>

Hi,

> I would have the following question:
> 
> Is there a way how to construct a window with panes, buttons, charts, checkboxes, listboxes, etc. in Mathematica?

yes, and it is easy, too...

> All I have found are separate components which are rendered into a notebook but nothing else. There is a way how to 
> display a window (again, with a notebook inside) and a dialog box but that's it.

that is because there is essentially no difference between a notebook
and another window. There are helper functions like CreateDialog, but
actually they just create notebook-windows with some of the many options
of Notebook set to specific values, so the windows look and behave
differently.

> I could not find any example putting all the bits and pieces together.

try this:

CreateDialog[DynamicModule[{f = Sin}, Grid[{
    {PopupMenu[Dynamic[f], {Sin, Cos, Exp, Log, Tan}],
     Panel[Dynamic@Plot[f[x], {x, 0, 1},
        Background -> White, Frame -> True, ImageSize -> 400]]},
    {"", Manipulate[
      Plot[Sin[n x], {x, 0, 2 \[Pi]}, Frame -> True, ImageSize -> 400],
      {n, 0, 1},
      AppearanceElements -> None
      ]},
    {Button["Close", DialogReturn[]], SpanFromLeft}
    }]]]


hth,

albert


  • Prev by Date: Re: Using the slider values in a Manipulate
  • Next by Date: Re: Application GUI in Mathematica
  • Previous by thread: Application GUI in Mathematica
  • Next by thread: Re: Application GUI in Mathematica