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...
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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...