Recent

Author Topic: Can't add menu items.  (Read 15123 times)

jmm98

  • Newbie
  • Posts: 5
Can't add menu items.
« on: August 04, 2012, 04:30:21 am »
I don't know about anyone else, but I can't add more menu items. I tried right clicking and browsing the form controls, but I just can't make another menu than just "File" or "Edit". Nor can I add sub-menus and such. Please help me with this.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Can't add menu items.
« Reply #1 on: August 04, 2012, 04:49:26 am »
place a TMainmenu component from the standard component palette on your form and double click on it to open the menu editor. As far as I can see there should always be one menu item inside the menu, you need to right click on a menu item to be able to see the popup menu and add menu items or convert them to a submenu (create subMenu option) it is a bit unusual but it is possible.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

jmm98

  • Newbie
  • Posts: 5
Re: Can't add menu items.
« Reply #2 on: August 04, 2012, 05:12:49 am »
Still can't add anything else with the menu editor.

jmm98

  • Newbie
  • Posts: 5
Re: Can't add menu items.
« Reply #3 on: August 04, 2012, 05:37:04 am »
Someone please help.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8819
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: Can't add menu items.
« Reply #4 on: August 04, 2012, 07:25:55 am »
Pelsae mention your Lazarus & FPC version, OS and desktop environment.

Bart

  • Hero Member
  • *****
  • Posts: 5575
    • Bart en Mariska's Webstek
Re: Can't add menu items.
« Reply #5 on: August 04, 2012, 12:22:04 pm »
No such problems here: Lazarus 1.1 r38127 FPC 2.6.0 i386-win32-win32/win64

Bart

Avishai

  • Hero Member
  • *****
  • Posts: 1021
Re: Can't add menu items.
« Reply #6 on: August 04, 2012, 04:26:33 pm »
I had that problem once a while ago.  My solution was:

1. Delete the Menu.
2. Save and exit Lazarus.
3. Restart Lazarus and go back to my Project.
4. Add a New Menu and add the Menu Items.

I don't know if this will help.
Lazarus Trunk / fpc 2.6.2 / Win32

jmm98

  • Newbie
  • Posts: 5
Re: Can't add menu items.
« Reply #7 on: August 04, 2012, 10:09:42 pm »
I had that problem once a while ago.  My solution was:

1. Delete the Menu.
2. Save and exit Lazarus.
3. Restart Lazarus and go back to my Project.
4. Add a New Menu and add the Menu Items.

I don't know if this will help.
I even tried that.

Pelsae mention your Lazarus & FPC version, OS and desktop environment.
Windows 7 x64, fpc 2.6.0, and lazarus 0.9.30.4

Bart

  • Hero Member
  • *****
  • Posts: 5575
    • Bart en Mariska's Webstek
Re: Can't add menu items.
« Reply #8 on: August 05, 2012, 08:50:48 pm »
Strange.
Try with 1.0RC1?

Bart

Knipfty

  • Full Member
  • ***
  • Posts: 232
Re: Can't add menu items.
« Reply #9 on: August 06, 2012, 06:03:27 pm »
jmm98,

What happens when you doublick-click on the menu object that is on the form?  IT should bring up the menu editor.  Does that happen?
64-bit Lazarus 2.2.0 FPC 3.2.2, 64-bit Win 11

jmm98

  • Newbie
  • Posts: 5
Re: Can't add menu items.
« Reply #10 on: August 11, 2012, 01:02:50 am »
I'll try to do what Bart says. Cross my fingers.

squonk

  • Newbie
  • Posts: 1
Re: Can't add menu items.
« Reply #11 on: November 02, 2012, 02:59:36 am »
Absolutely brand new user here, and just chiming in to say I am having the same problem with TMainmenu.  Right-clicking in the Menu Editor appears to be busted.  Still researching.  Am running 1.0RC1. 

Blaazen

  • Hero Member
  • *****
  • Posts: 3241
  • POKE 54296,15
    • Eye-Candy Controls
Re: Can't add menu items.
« Reply #12 on: November 02, 2012, 03:12:26 am »
Hi,
When you paste a new TMainMenu on the form and you open Menu Editor (double click) there is a "New Item1". When you right click this item, there should appear a popup menu "Insert New Item (after)", "Insert New Item (before)", etc.
This should work.
Lazarus 2.3.0 (rev main-2_3-2863...) FPC 3.3.1 x86_64-linux-qt Chakra, Qt 4.8.7/5.13.2, Plasma 5.17.3
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

mmab

  • Jr. Member
  • **
  • Posts: 89
Re: Can't add menu items.
« Reply #13 on: November 02, 2012, 03:14:28 am »
 
var Li : Tmenuitem;
begin
    LI := Tmenuitem.create(Menu);
    LI.caption := 'my caption';
    LI.onclick:= @menuitemclick;
   Menu.items.add(Li);
end;


User137

  • Hero Member
  • *****
  • Posts: 1791
    • Nxpascal home
Re: Can't add menu items.
« Reply #14 on: November 02, 2012, 01:04:55 pm »
When you paste a new TMainMenu on the form and you open Menu Editor (double click) there is a "New Item1". When you right click this item, there should appear a popup menu "Insert New Item (after)", "Insert New Item (before)", etc.
This. And also you can right click a "Create submenu". When the created subitem is selected, you can expand that way (down) again. Next submenu expands right again, next down etc.

 

TinyPortal © 2005-2018