View Issue Details

IDProjectCategoryView StatusLast Update
0000043Lazaruspublic2002-05-15 03:24
ReporterBug ImportAssigned ToMattias Gaertner 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product VersionProduct Build 
Target VersionFixed in Version 
Summary0000043: Menu Desappear
DescriptionWhen I run this, everything goes fine:

// ObjName:Form1 ClassName:TForm1
// Made by DFM To Pas V0.4
// GroupBox1:TGroupBox;
// BitBtn1:TBitBtn;
// MainMenu1:TMainMenu;
// File1:TMenuItem;
// Quit1:TMenuItem;

 Left := 288;
 Top := 264;
 Width := 381;
 Height := 392;
 Caption := 'Form1';
// Menu := MainMenu1;

   MainMenu1:=TMainMenu.Create(Self);
 with MainMenu1 do
     begin
     File1:=TMenuItem.Create(Self);
     with File1 do
          begin
          Caption := 'File';
          Quit1:=TMenuItem.Create(Self);
          with Quit1 do
               begin
               Caption := 'Quit';
               File1.Add(Quit1);
               end;
          MainMenu1.Items.Add(File1);
          end;
     Menu:=MainMenu1;
     end;

 GroupBox1:=TGroupBox.Create(Self);
 with GroupBox1 do
     begin
     parent:=self;
     Left := 8;
     Top := 232;
     Width := 185;
     Height := 105;
     Caption := 'GroupBox1';
     TabOrder := 6;
     BitBtn1:=TBitBtn.Create(Self);
     with BitBtn1 do
          begin
          parent:=GroupBox1;
          Left := 8;
          Top := 16;
          Width := 75;
          Height := 25;
          TabOrder := 0;
          Kind := bkAll;
          Show;
          end;
     Show;
     end;
--------------------------------------------
But, when I change the creation order of
the Menu and GroupBox, the menu disappear!
The source that I used to test is:

 GroupBox1:=TGroupBox.Create(Self);
 with GroupBox1 do
     begin
     parent:=self;
     Left := 8;
     Top := 232;
     Width := 185;
     Height := 105;
     Caption := 'GroupBox1';
     TabOrder := 6;
     BitBtn1:=TBitBtn.Create(Self);
     with BitBtn1 do
          begin
          parent:=GroupBox1;
          Left := 8;
          Top := 16;
          Width := 75;
          Height := 25;
          TabOrder := 0;
          Kind := bkAll;
          Show;
          end;
     Show;
     end;

MainMenu1:=TMainMenu.Create(Self);
 with MainMenu1 do
     begin
     File1:=TMenuItem.Create(Self);
     with File1 do
          begin
          Caption := 'File';
          Quit1:=TMenuItem.Create(Self);
          with Quit1 do
               begin
               Caption := 'Quit';
               File1.Add(Quit1);
               end;
          MainMenu1.Items.Add(File1);
          end;
     Menu:=MainMenu1;
     end;
Additional InformationImported information
--------------------
Name: João Schuler
Mail: jpss (at) schulers.com
TagsNo tags attached.
Fixed in Revision
LazTarget
WidgetsetGTK, Win32/Win64
Attached Files

Activities

Bug Import

2002-05-15 03:24

reporter   ~0000037

works now

Issue History

Date Modified Username Field Change
2001-06-14 00:00 Bug Import New Issue
2001-06-14 00:00 Bug Import Widgetset => GTK, Win32
2002-05-15 03:24 Bug Import Status new => assigned
2002-05-15 03:24 Bug Import Assigned To => Mattias Gaertner
2002-05-15 03:24 Bug Import Note Added: 0000037
2002-05-15 03:24 Bug Import Status new => closed
2002-05-15 03:24 Bug Import Resolution open => fixed
2006-12-06 22:48 Florian Relationship added related to 0007882
2006-12-06 22:49 Florian Relationship deleted related to 0007882