Discussions related to Visual Prolog
B.Hooijenga
VIP Member
Posts: 60
Joined: 11 Jul 2002 23:01

RibbonMDIdemo and TaskWindowMenu

Post by B.Hooijenga »

Hello Thomas,

In the VipExamples there is a ribbonMDIDemo.
It demonstrates the ribbon well.

I have a question.
In the TaskWindow package of the demo the TaskMenu.menu has gone.
But in the application a "pseudo-TaskWindow.menu" is visible.
It is not neccesary and I want to get rid of it.
If that is possible: what do I have to do?

Kind regards,

Ben
B.Hooijenga
VIP Member
Posts: 60
Joined: 11 Jul 2002 23:01

Re: RibbonMDIdemo and TaskWindowMenu

Post by B.Hooijenga »

Hello Thomas,

I might have found an answer to my question.
MDI can not be used if taskwindow has no menu.
In the RibbonMDIdemo this is solved by making a (task)menu with the help of:

Code: Select all

class predicates     mkMenu : (layout Layout) -> menuItem* Menu.
Then we can use the menu in the program.
for instance:

Code: Select all

menuEnable(Cmd:menuTag, false)
In this way I can live with the (task)menu.

Greetings
Ben
User avatar
Thomas Linder Puls
VIP Member
Posts: 1469
Joined: 28 Feb 2000 0:01

Re: RibbonMDIdemo and TaskWindowMenu

Post by Thomas Linder Puls »

Thank you for answering your own question; it makes it much easier for me ;-).

However, the mentioned restriction is only enforced by the vpi-library. Windows itself doesn't require menus on MDI applications. In next major release (i.e. vip 12) this restriction will be removed.

(PS there are no release plans for vip 12).
Regards Thomas Linder Puls
PDC
B.Hooijenga
VIP Member
Posts: 60
Joined: 11 Jul 2002 23:01

Re: RibbonMDIdemo and TaskWindowMenu

Post by B.Hooijenga »

Hello Thomas,


You are welcome. :-)

For this moment your answer leaves me with the question.
How to make a new MDI project that uses the ribbonControl?

What I tried is this:
make a normal GUI (MDI) application.

Then
deleted the taskMenu.menu.
deleted the toolbar modules
replaced taskwindow.pro by the taskwindow from the MDIRibbonDemo :-(
commenting in the taskwindow.pack: %#include @"pfc\vpi\vpiToolbar\vpiToolbar.ph"

I got a lot of complaints from the compiler during the process.
But by rebuilding_all several times it eventually seems to work.

It is a very ugly method but in awaiting version VIP12 I have to do something.
If you know of a more elegant way (apart of VIP12) I would be pleased to hear.

Kind greetings

Ben
User avatar
Thomas Linder Puls
VIP Member
Posts: 1469
Joined: 28 Feb 2000 0:01

Re: RibbonMDIdemo and TaskWindowMenu

Post by Thomas Linder Puls »

We have never made a template for this. And without this I think the simplest way to do it is by copying the demo program.

Notice that there is a "Copy and Open ..." option in the context menu on projects in the "welcome" dialog. (I hope it works; I have actually never tried it myself :-)).
Regards Thomas Linder Puls
PDC