How to make RibbonApplicationMenuBar inactive / active?

I tried many methods related to RibbonApplicationMenuBar so that the user could not select RibbonApplicationMenuBar with the mouse until the project settings were loaded due to inactivity and closing the splashform form. But nothing works to make RibbonApplicationMenuBar InActive until it is said otherwise.

The help file shows nothing about the many properties of RibbonApplicationMenuBar and the help wiki, so I cannot solve this problem.

procedure TMainForm.FormCreate( Sender: TObject );
begin
  // make theRibbonApplicationMenuBar1 inactive
  RibbonApplicationMenuBar1.Enabled := False;
  RibbonApplicationMenuBar1.Inactive := True;
  RibbonApplicationMenuBar1.Hide;
  RibbonApplicationMenuBar1.AutoFocus := False;
  // read application settings
  ReadIni( AIniFileFilename );
  // show a splash form
  FormSplash := TFormSplash.Create( MainForm );
  // FormSplash.Parent := MainForm;
  FormSplash.Position := poOwnerFormCenter;
  FormSplash.Show;
  FormSplash.Update;
end;


procedure TMainForm.FormShow( Sender: TObject );
begin
  // close the splash form
  FormSplash.RequestClose;
  // Activate the RibbonApplicationMenuBar
  RibbonApplicationMenuBar1.Enabled := True;
  RibbonApplicationMenuBar1.Inactive := False;
  if RibbonApplicationMenuBar1.CanFocus then
    RibbonApplicationMenuBar1.SetFocus;
  RibbonApplicationMenuBar1.AutoFocus := True;
  RibbonApplicationMenuBar1.SelectApplicationButton;
  RibbonApplicationMenuBar1.Show;
end;

RibbonApplicationMenuBar , RibbonApplicationMenuBar, . . , , , , , ... , RibbonApplicationMenuBar , .

,

+5
1

TRibbon.Enabled False, ( XE3). - False . True, , OnHide . .

0

All Articles