🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #520

TMenuBox in TVision C++

#520
From: Pierre VonKaenel
Date: Tue, 28 Jul 1992 12:53
48 lines
2130 bytes
I'm using Borland's Turbo Vision (C++ version) to write a menu program
for our department.  I have a TMenuBar defined with appropriate
submenus.  What I need is a sub-submenu (or a pop up menu) and it
seems TMenuBox should do the trick.  Unfortunately, there are no
examples for using this class.  I tried to create it ala TMenuBar (the
constructors use the same types of parameters), but get errors when I
do

	*new TMenuBox( TRect[..stuff..], *new TSubMenu(....) ) ...
or	*new TMenuBox( TRect[ ...     ], *new TMenuItem(...) ) ...

It expects a TMenu type for the second parameter.  This is how
TMenuBar is defined, but using TSubMenu works for it.

Even if the above worked, it's not clear how a TMenuBox is started,
since TMenuBar is executed via the initMenuBar function of the
application.

All I want is a popup menu that looks similar to the following (I've
included the menu bar and a submenu of a simplified example)

	| Apps	|  Utils    | ...
	+-------+-----------|--
	|Languages  | <- chosen-
	|Math apps  |           |
	+-----------+           | popup menu results.
                                v
			+------------+
			| Pascal     |
			| Basic	     |
			+------------+


Is TMenuBox the appropriate class to use?

-- 
Pierre von Kaenel	| Skidmore College	     | pvonk@scott.skidmore.edu
Math & CS Dept.		| Saratoga Springs, NY 12866 | (518)584-5000 Ext 2391
When asked his position on euthanasia, our local state rep. responded:
"I support youth all over the world."


-- 
Pierre von Kaenel	| Skidmore College	     | pvonk@scott.skidmore.edu
Math & CS Dept.		| Saratoga Springs, NY 12866 | (518)584-5000 Ext 2391
When asked his position on euthanasia, our local state rep. responded:
"I support youth all over the world."
Technical Details
Message-ID: <1992Jul28.125304.23209@scott.skidmore.edu>
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!rpi!scott.skidmore.edu!pvonk

Show Full Headers
Complete Article Headers
Newsgroups: comp.os.msdos.programmer
Path: arc1-ca.pugleaf.net!sparky!uunet!usc!rpi!scott.skidmore.edu!pvonk
From: pvonk@scott.skidmore.edu (Pierre VonKaenel)
Subject: TMenuBox in TVision C++
Message-ID: <1992Jul28.125304.23209@scott.skidmore.edu>
Organization: Skidmore College, Saratoga Springs NY, 12866
Date: Tue, 28 Jul 1992 12:53:04 GMT
Lines: 48