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