MathGroup Archive 2010

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

Search the Archive

Re: popup/action menu and sub menu

  • To: mathgroup at smc.vnet.net
  • Subject: [mg108560] Re: popup/action menu and sub menu
  • From: "David Park" <djmpark at comcast.net>
  • Date: Tue, 23 Mar 2010 04:24:02 -0500 (EST)

An interesting question. A drop-down within a drop-down does not appear to
work. The best I could come up with was a succession of PopupMenus where
succeeding ones depended on preceding ones:

Module[{menu = 1, x = xa, y = ya},
 sub[1] := 
  PopupMenu[Dynamic[x], {xa -> "a", xb -> "b", xc -> "c"}, 1, 
   "Choose x"];
 sub[2] := 
  PopupMenu[Dynamic[y], {ya -> "a", yb -> "b", yc -> "c"}, 1, 
   "Choose y"];
 {PopupMenu[Dynamic[menu], {1 -> "Choose x", 2 -> "Choose y"}, 1, 
   "Choose x or y"],
  Dynamic@sub[menu], {Dynamic[x], Dynamic[y]}}
 ] 


David Park
djmpark at comcast.net
http://home.comcast.net/~djmpark/  



From: magma [mailto:maderri2 at gmail.com] 


I would appreciate other members' opinion on this:

It appears that it is not possible, or at least it is not obvious to
me, to create sub menus exclusively from popup menus in Mathematica.
What do you think?

Perhaps it is posible to use a combination of action menu (for the
main menu) and popup menu (for the sub menu)
For ex. I 'd like a popup/action menu with
item1
item2
item3

on it, and when you click on item 3 you get a sub menu
subitem1
subitem2
subitem3

a typical example could be a Font selection.
Could somebody provide a working example?
Please do not use GUIkit or Super Widget packages, just plain Mathematica.
Thank you




  • Prev by Date: Re: popup/action menu and sub menu
  • Next by Date: Re: solving equations
  • Previous by thread: Re: popup/action menu and sub menu
  • Next by thread: CalcLink tutorial screencasts on YouTube