tags:

views:

128

answers:

0

I have tried lots of methods associated with RibbonApplicationMenuBar to prevent a user from selecting the RibbonApplicationMenuBar with a mouse until the projects settings are loaded from an inifile and a splashform closes. But nothing seems to work to make the RibbonApplicationMenuBar InActive until told otherwise.

The help file shows nothing about many of the properties of RibbonApplicationMenuBar and the help Wiki the same so I am unable to solve this.

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;

Unless the RibbonApplicationMenuBar is inactive the user can select the RibbonApplicationMenuBar before it is ready to be selected. Any suggestions are appreciated. I know all the methods shown here are not correct or possibly out of order... it is just my attempt to prevent the RibbonApplicationMenuBar from becoming active and clickable until the splash form closes.

Thanks,

Bill