[Lazarus] Main menu disappeared

Timothy Groves the.tail.kinker at gmail.com
Wed Jun 20 20:07:04 CEST 2012


On 12-06-20 01:56 PM, Howard Page-Clark wrote:
> On 20/6/12 5:50, Timothy Groves wrote:
>> I am working on a project, and decided for the first time ever to use a
>> main menu. I set it up, it worked, and then it vanished. It is still
>> present in the IDE and source code, but it no longer appears when the
>> app is run.
>
> You could check that the menuItems' Visible properties are all True.
> Else post your form.pas and form.lfm here and others may notice 
> something amiss. What Lazarus version and what OS do you compile for?
unit imain;

{$mode objfpc}{$H+}

interface

uses
   Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, 
ComCtrls,
   Menus, StdCtrls, Buttons,

   iabout;

type

   { TfrmMainWindow }

   TfrmMainWindow = class(TForm)
     btnNewStory: TBitBtn;
     btnRemoveStory: TBitBtn;
     Label1: TLabel;
     lstStories: TListBox;
     MainMenu: TMainMenu;
     mnuHelpAbout: TMenuItem;
     mnuHelp: TMenuItem;
     mnuEdit: TMenuItem;
     mnuEditProfiles: TMenuItem;
     mnuFileExit: TMenuItem;
     mnuFileSettings: TMenuItem;
     mnuFile: TMenuItem;
     procedure mnuFileExitClick(Sender: TObject);
     procedure mnuHelpAboutClick(Sender: TObject);
   private
     { private declarations }
   public
     { public declarations }
   end;

var
   frmMainWindow: TfrmMainWindow;

implementation

{$R *.lfm}

{ TfrmMainWindow }

procedure TfrmMainWindow.mnuHelpAboutClick(Sender: TObject);
begin
   frmAboutBox.Show;
end;

procedure TfrmMainWindow.mnuFileExitClick(Sender: TObject);
begin
   frmMainWindow.Close;
end;

end.


object frmMainWindow: TfrmMainWindow
   Left = 508
   Height = 450
   Top = 274
   Width = 780
   BorderStyle = bsDialog
   Caption = 'FicMake 1.0.0'
   ClientHeight = 423
   ClientWidth = 780
   Menu = MainMenu
   LCLVersion = '0.9.30.2'
   object Label1: TLabel
     Left = 8
     Height = 20
     Top = 16
     Width = 74
     Caption = 'Story List'
     ParentColor = False
   end
   object lstStories: TListBox
     Left = 4
     Height = 376
     Top = 41
     Width = 259
     ItemHeight = 0
     ScrollWidth = 257
     TabOrder = 0
     TopIndex = -1
   end
   object btnNewStory: TBitBtn
     Left = 200
     Height = 28
     Top = 8
     Width = 28
     Glyph.Data = {
       36040000424D3604000000000000360000002800000010000000100000000100
       2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000080004000800080008000800080
       0040FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000800080009F00FF009F00FF0080
       0080FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000080008000BF00FF00BF00FF0080
       0080FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000080008000BF00FF00BF00FF0080
       0080FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000080008000BF00FF00BF00FF0080
       0080FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000080008000BF00FF00BF00FF0080
       0080FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00008000400080
       008000800080008000800080008000800080008000C000BF00FF00BF00FF0080
       00C000800080008000800080008000800080008000800080004000800080009F
       00FF00BF00FF00BF00FF00BF00FF00BF00FF00BF00FF00DF00FF00DF00FF00BF
       00FF00BF00FF00BF00FF00BF00FF00BF00FF009F00FF0080008000800080009F
       00FF00BF00FF00BF00FF00BF00FF00BF00FF00BF00FF00DF00FF00DF00FF00BF
       00FF00BF00FF00BF00FF00BF00FF00BF00FF009F00FF00800080008000400080
       008000800080008000800080008000800080008000C000BF00FF00BF00FF0080
       00C0008000800080008000800080008000800080008000800040FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000080008000BF00FF00BF00FF0080
       0080FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000080008000BF00FF00BF00FF0080
       0080FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000080008000BF00FF00BF00FF0080
       0080FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000080008000BF00FF00BF00FF0080
       0080FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF0000800080009F00FF009F00FF0080
       0080FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000080004000800080008000800080
       0040FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
     }
     TabOrder = 1
   end
   object btnRemoveStory: TBitBtn
     Left = 232
     Height = 28
     Top = 8
     Width = 28
     Glyph.Data = {
       36040000424D3604000000000000360000002800000010000000100000000100
       2000000000000004000064000000640000000000000000000000FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00000080400000
       8080000080800000808000008080000080800000808000008080000080800000
       8080000080800000808000008080000080800000808000008040000080800000
       9FFF0000BFFF0000BFFF0000BFFF0000BFFF0000BFFF0000BFFF0000BFFF0000
       BFFF0000BFFF0000BFFF0000BFFF0000BFFF00009FFF00008080000080800000
       9FFF0000BFFF0000BFFF0000BFFF0000BFFF0000BFFF0000BFFF0000BFFF0000
       BFFF0000BFFF0000BFFF0000BFFF0000BFFF00009FFF00008080000080400000
       8080000080800000808000008080000080800000808000008080000080800000
       8080000080800000808000008080000080800000808000008040FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFF
       FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00
     }
     TabOrder = 2
   end
   object MainMenu: TMainMenu
     left = 120
     top = 8
     object mnuFile: TMenuItem
       Caption = '&File'
       ShortCut = 32838
       object mnuFileSettings: TMenuItem
         Caption = '&Settings'
         ShortCut = 32851
       end
       object mnuFileExit: TMenuItem
         Caption = 'E&xit'
         ShortCut = 32856
         OnClick = mnuFileExitClick
       end
     end
     object mnuEdit: TMenuItem
       Caption = '&Edit'
       ShortCut = 32837
       object mnuEditProfiles: TMenuItem
         Caption = '&Profiles'
         ShortCut = 32848
       end
     end
     object mnuHelp: TMenuItem
       Caption = '&Help'
       ShortCut = 32840
       object mnuHelpAbout: TMenuItem
         Caption = 'About...'
         OnClick = mnuHelpAboutClick
       end
     end
   end
end

Lazarus 0.9.30.2.2 on XUbuntu 12.04.




More information about the Lazarus mailing list