Sign in Join

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

Mailing lists / lazarus / 2013-01

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

2 messages · 1 person ·

Reply by email Subscribe to this list Your subscription

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

Mark Morgan Lloyd

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]

Reply by email

Mark Morgan Lloyd
to Mark Morgan Lloyd
Mark Morgan Lloyd wrote
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)...

Or put another way: under program control how can a main-menu item be made visible, as though it had been clicked?

Any thoughts would be appreciated, I haven't had much success with the documentation and archive.

Mark Morgan Lloyd markMLl .AT. telemetry.co .DOT. uk [Opinions above are the author's, not those of his employers or colleagues]

Reply by email