Menu Desappear
Original Reporter info from Mantis: >8<
-
Reporter name: Bug Import
Original Reporter info from Mantis: >8<
- Reporter name: Bug Import
Description:
When 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 information:
Imported information
--------------------
Name: João Schuler
Mail: jpss (at) schulers.com
Mantis conversion info:
- Mantis ID: 43