Topic: Stubborn Menu

Hello everyone, I'm having a small problem with a menu; it's not displaying the way I want it to.
I want to create a menu with three categories, but it only displays two. I can't find the problem.
Does anyone have any idea where this is coming from?

Post's attachments

Attachment icon Essai menu.zip 333.42 kb, 203 downloads since 2025-03-16 

Destiny

Re: Stubborn Menu

Hi Destiny

procedure Form1_OnShow (Sender: string; Action: string);
  var
   MyItem1: TMenuItem;
   MyItem2: TMenuItem;
   MyItem3: TMenuItem;
   MenuForm1: TMainMenu;
begin
   MenuForm1 := TMainMenu.Create(Form1);

   MyItem1 := TMenuItem.Create (Form1);
   MyItem1.Caption := 'Licence';
   //MyItem1.OnClick := @MenuClick1;
   MenuForm1.Items.Add(MyItem1);

   MyItem2 := TMenuItem.Create (Form1);
   MyItem2.Caption := 'Auteur';
   //MyItem2.OnClick := @MenuClick2;
   MenuForm1.Items.Add(MyItem2);

   MyItem3 := TMenuItem.Create (Form1);
   MyItem3.Caption := 'Aide';
   //MyItem3.OnClick := @MenuClick3;
   MenuForm1.Items.Add(MyItem3);
end;

Re: Stubborn Menu

Thanks, Sparrow. I couldn't find anything after searching. I should have stopped and started again later.
Now everything works as I wanted.
Have a good weekend, Sparrow.

Destiny