[Lazarus] Keeping a main menu item visible after it's been clicked

Mark Morgan Lloyd markMLl.lazarus at telemetry.co.uk
Thu Jan 24 10:22:21 CET 2013


If a main menu item contains something like "More detail ↴" which 
enables additional lines, is it possible to prevent the item closing 
when that's clicked? I've tried doing this (Linux/gtk2):

procedure TMainForm.OnAfterOverridesVisibleClick(checked: LONGINT);

begin
   if checked <> 0 then
     MenuConfiguration.Click
end { TMainForm.OnAfterOverridesVisibleClick } ;

procedure TMainForm.MenuConfigurationProfileOverridesClick(Sender: TObject);

begin
   with MenuConfigurationProfileOverrides do begin
     Checked := not Checked;
..
     Application.QueueAsyncCall(@OnAfterOverridesVisibleClick, Ord(Checked))
   end;
end { TMainForm.MenuConfigurationProfileOverridesClick } ;

but it has no obvious effect... I presume that I need more of a delay in 
there.

-- 
Mark Morgan Lloyd
markMLl .AT. telemetry.co .DOT. uk

[Opinions above are the author's, not those of his employers or colleagues]




More information about the Lazarus mailing list