home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / lang / cplus / 11655 < prev    next >
Encoding:
Text File  |  1992-07-28  |  1.7 KB  |  49 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!usc!rpi!scott.skidmore.edu!pvonk
  3. From: pvonk@scott.skidmore.edu (Pierre VonKaenel)
  4. Subject: TMenuBox ? in TVision
  5. Message-ID: <1992Jul28.124544.23107@scott.skidmore.edu>
  6. Organization: Skidmore College, Saratoga Springs NY, 12866
  7. Date: Tue, 28 Jul 1992 12:45:44 GMT
  8. Lines: 39
  9.  
  10. I'm using Borland's Turbo Vision to write a menu program for our
  11. department.  I have a TMenuBar defined with appropriate submenus.
  12. What I need is a sub-submenu (or a pop up menu) and it seems TMenuBox
  13. should do the trick.  Unfortunately, there are no examples for using
  14. this class.  I tried to create is ala TMenuBar (the constructors use
  15. the same types of parameters), but get errors when I do
  16.  
  17.     *new TMenuBox( TRect[..stuff..], *new TSubMenu(....) ) ...
  18. or    *new TMenuBox( TRect[ ...     ], *new TMenuItem(...) ) ...
  19.  
  20. It expects a TMenu type for the second parameter.  This is how
  21. TMenuBar is defined, it using TSubMenu works for it.
  22.  
  23. Even if the above worked, it's not clear how a TMenuBox is started,
  24. since TMenuBar is executed via the initMenuBar function of the
  25. application.
  26.  
  27. All I want is a popup menu that looks similar to the following (I've
  28. included the menu bar and a submenu for a simplified version)
  29.  
  30.     | Apps    |  Utils    | ...
  31.     +-------+-----------|--
  32.     |Languages  | <- chosen-
  33.     |Math apps  |           |
  34.     +-----------+           | popup menu results.
  35.                                 v
  36.             +------------+
  37.             | Pascal     |
  38.             | Basic         |
  39.             +------------+
  40.  
  41.  
  42. Is TMenuBox the appropriate class to use?
  43.  
  44. -- 
  45. Pierre von Kaenel    | Skidmore College         | pvonk@scott.skidmore.edu
  46. Math & CS Dept.        | Saratoga Springs, NY 12866 | (518)584-5000 Ext 2391
  47. When asked his position on euthanasia, our local state rep. responded:
  48. "I support youth all over the world."
  49.