Jump to content

I want to let the UniMainMenu control mouse close to the automatic pop-up sub menu, how to set up?


Marco Hsu

Recommended Posts

Hi,

 

For now can you try this solution ?!:

 

1.

type
  TUniExMainMenu = class(TuniMainMenu)
end;

2.

procedure TMainForm.UniFormReady(Sender: TObject);
var
  MainMenuJSName: string;
begin
  MainMenuJSName := TUniExMainMenu(UniMainMenu1).GetMenuControl.JSName;
  UniSession.AddJS(MainMenuJSName + '.items.items.forEach(function(m){m.addListener("mouseover", function(){this.showMenu()})})');
end;

Best regards.

Link to comment
Share on other sites

  • 6 years later...

I use the above JS code to auto drop down the sub-menu when the mouse cursor is over the TUniMainMenu.

How do I auto close the sub-menu when the mouse cursor is not over the TUniMainMenu?

--
Frederick
(UniGUI Complete - Professional Edition 1.90.0.1573)
 

Link to comment
Share on other sites

2 hours ago, Frederick said:

I use the above JS code to auto drop down the sub-menu when the mouse cursor is over the TUniMainMenu.

How do I auto close the sub-menu when the mouse cursor is not over the TUniMainMenu?

Do you have a two-level menu?

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...