Free Pascal > Beginners

Getting main menu to display

(1/2) > >>

ehj666:
This must be a real noob issue. I used Delphi extensively years ago, but haven't hardly touched it in a very long time. I am trying to update and port to Linux a 10-15 year old set of Delphi 7 applications. Non-visual units convert with no problem at all, although had to change TCP libraries. I am doing a re-layout of the main form and having trouble with the main menu. I am following the instructions here: http://wiki.freepascal.org/TMainMenu

Creating and editing the non-visual menu is no problem, however it does not display either at design time or run time. The wiki says:

--- Quote ---Select TMainMenu from the component bar and place a component on your form by clicking on the TMainMenu component, then click on the form but do not let go of the mouse button, and while holding the mouse button down, draw a box and let go of the button. The component will appear on your form.
--- End quote ---

When I draw a box, all that happens when I lift the mouse is that the box disappears. The menu icon appears the same, regardless of whether I just drop it on the form, or try to draw a box. What stupid thing am I missing?

Thanks,
Eric

jacmoe:
I just drop it on the form without any shenanigans  ;D

Then I just right-click it in the Object Inspector and enter the menu editor.
It does show up at run time.

ehj666:
I don't see how I can make it any simpler. I create a main form. Drop a main menu on it. Edit the menu for top level menus "File" and "Edit", and sub menu under File of "Open" and "Exit". Only Exit is implemented.

I am running on and targeting Ubuntu 16.04.

No menu appears when running.

ehj666:
Ok, this is odd. I loaded up Lazarus on Windows, did the same thing, and the menu shows properly. It is not showing on Linux however.

jacmoe:
Odd..
Is the form's 'Menu' property set to your MainMenu ?

It does show up on Linux (I am on a Linux box).

Navigation

[0] Message Index

[#] Next page

Go to full version