Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2001-06

New Bug Entered

6 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Unknown author

Title: Adding accelerators for main menu

Entered by: Pavel Machek

Hi!

Main menu missed accelarators for most entries, so I added them. Uff. Diff looks really easy, like this:

(Gzipped, uuenpiped

begin 644 UUPIPEOUT
M\'XL(`//\\%SL``Y69:V_;-A2&/R^_0I_8#G)<7Y('=:D:]I]5VVV MTR9+ABYI]^_\'F\\S#PT.)(.\'R.>-[7O(DY/S]/]EE>':?4MW_YR7^?) M[UV9)/-DMKB1_V?)8C:;GZ5IVI,06BQNEA<W2P/=WB;GJ]7%9#E/4O.\\O3U+ MSI(DR=O]?5[PQP,ODYNWR></O.S>MWP_W=0\\:_G+)UY\\^_4-(J</V9[?O\'T! M0B_>G)V[S\"8[M\'FEWOK\"$&F88`9!\')U\"14BBT_5N
M]Q*DR8+!FYZR9QXG3I)(G`PYXA0#2S=$&B:805!\'2)R,C8B3\"\"%NW<3+6S>$ MP\'7C210<%IDH+!W%F.*\\;@FYZR9\"\\+JA)!?%\")
M?N>4]**(T5X42/RFJ)K(T:Q0)%S%\')
M^P0R0P5\'K%\",T\"87LJO9:K)*4OU`R]B?7=[&>2-)9(T,.<XH!HHV1!HF[MA/ MA:\".D&09&U$L$?7+*\\GSU61Q+33K)Q!]M\\O;+^6N(D67>7\'4W(-`<Q\\Z:CXR M4)",O0)QY9L`11P3+D%*P86(XATC#!#$(
MKO&)\'WB=M56--&VZ-HG2)$`D240<19)PIF/7.GIP.],`K4:TX4JKPW]QE0H0 MERI\";JV2<8K51#I`,(T$ZA6-J.\"/6=/2*QZN6)
MMVK5A;]Z=>[\\TU/XXFHROQ)36#_!%\'[B6;W]^SXO=Z,:+0I$VN!1)>\"@!,.D M0PPSD%:IH6FF==H4\\`O9X/J[.(>>H$\'QI!#50JC1&5LD29PW#(^5:1Y;8\'FZ M(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I<%S3%-277,2B.RF)\\6*E%8^@>PU`.0 MJZ(]KZMRSTM[D8]3X%\\BRF=YSU_5)WCH)'^=NB:J\'\\\"^<P+RE0 4G&^>TQ[EG9.AK/L?\'I\'
`
end

)

Reply by email

Unknown author

Title: AOwner difers from Self

Entered by: Jo�o Schuler

When I change Self to AOwner, the program
crashes:

 constructor TForm1.Create(AOwner: TComponent);
 begin
 inherited Create(AOwner);
// ObjName:Form1  ClassName:TForm1
// Made by DFM To Pas V0.4
// MainMenu1:TMainMenu;
// File1:TMenuItem;
// Quit1:TMenuItem;
 Left := 288;
 Top := 264;
 Width := 381;
 Height := 392;
 Caption := \'Form1\';
//MainMenu1:=TMainMenu.Create(AOwner);
MainMenu1:=TMainMenu.Create(Self);
 with MainMenu1 do
     begin
//     File1:=TMenuItem.Create(AOwner);
     File1:=TMenuItem.Create(Self);
     with File1 do
          begin
          Caption := \'File\';
//          Quit1:=TMenuItem.Create(AOwner);
          Quit1:=TMenuItem.Create(Self);
          with Quit1 do
               begin
               Caption := \'Quit\';
               File1.Add(Quit1);
               end;
          MainMenu1.Items.Add(File1);
          end;
     Menu:=MainMenu1;
     end;

Reply by email

Unknown author

Title: Menu Desappear

Entered by: Jo�o Schuler

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;

Reply by email