Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

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

Search the Archive

Re: dynamic popupmenu help needed

  • To: mathgroup at smc.vnet.net
  • Subject: [mg98466] Re: dynamic popupmenu help needed
  • From: ragfield <ragfield at gmail.com>
  • Date: Fri, 10 Apr 2009 04:55:26 -0400 (EDT)
  • References: <grkgcm$61u$1@smc.vnet.net>

On Apr 9, 4:50 am, meitnik <meit... at gmail.com> wrote:
> hi
>
> I can't figure out how to get the second popup to insert into a the
> cell where the insertion cursor is:
>
> f[e_] := Switch[e, "hey", 1, "you", 2, "now", 3];
> stuff = {{"a", "1", "r"}, {"b", "ee", "23"}, {0}};
> CreatePalette[
>  PopupMenu[Dynamic[x], {"hey", "you", "now"}]
>   Dynamic@PopupMenu[Dynamic[y], stuff[[f[x]]]]]
> NotebookApply[InputNotebook[], Dynamic[y]]

NotebookApply[InputNotebook[], y]

-Rob


  • Prev by Date: Re: complicated list selector
  • Next by Date: Re: how to build pattern for a square matrix of reals?
  • Previous by thread: dynamic popupmenu help needed
  • Next by thread: Re: dynamic popupmenu help needed