• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Rob Spoor
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Carey Brown
  • Mikalai Zaikin
Bartenders:

Menu

 
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Heres my code:


As it is now. I am able to create a menu bar with a heading "file". When the user clicks
on "file" the menu pops up and they can actually select one of four choices; I only have
one of them listed here,"review".
How do I add a submenu to review? I want to add two options("Test" and "Tutorial") that
pop up when the user's mouse lands on the word "Review..". The API said that I should
use" ..... submenu is an instance of Menu." .
I need some code to help me out. I played around with add() with no success.
Thanks in advance.
 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Hi Brian
To get the affect what you wanted, you just need to add a 'Menu' object to the menu bar instead of 'MenuItem'
So the code looks like this...

Hope this helps
cheers
Prasad
 
Brian Snyder
Ranch Hand
Posts: 142
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

this now produces:
-Test
-Review
-Option 1
-Option 2
-Option 3
(The indentation didn;t work, but I got what I wanted!!!)
It seems so obvious now. I guess I was looking at it too long. Thanks for the help. This is how I feel now.
[This message has been edited by Brian Snyder (edited March 06, 2001).]
 
Arch enemy? I mean, I don't like you, but I don't think you qualify as "arch enemy". Here, try this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic