Jump to content

TUniPopupMenu


shawdown

Recommended Posts

Hello, is it possible to set z-index for TUniPopupMenu?
 
The problem is that I have a TUniPanel with z-index set to 19001.
"I can not decrease the z-index of TUniPanel because I need it to stay on the open forms.
post-715-0-07919400-1525108365_thumb.png
 
 
If I lower the z-index to 19000 the TUniPopupMenu works perfectly.
post-715-0-36272100-1525108616_thumb.png
 
 
 
in my TUniPanel I have the following code where z-index is defined.
function afterrender(sender, eOpts)
{
sender.getEl().setStyle("position", "fixed"); 
sender.getEl().setStyle("left", "3px"); 
sender.getEl().setStyle("top", "3px"); 
sender.getEl().setStyle("z-index", 19001);
}

 

Link to comment
Share on other sites

Hello Delphi Developer.
 
I tried the solution informed but to no avail.
Does this solution work well in uniGUI version 1.0.2.1449?
 
Can you give me more details on how to work around the problem with the related post solution?
 
Link to comment
Share on other sites

One possible solution:

 

1.

type
  TXPopupMenu = class(TUniPopupMenu)

  end;

2. OnFormReady:

procedure TMainForm.UniFormReady(Sender: TObject);
begin
  with TXPopupMenu(UniPopupMenu1).MenuControl.JSInterface do
  begin
    JSConfig('alwaysOnTop', [True]);
  end;
end;
Link to comment
Share on other sites

Perfect.
Thank you very much.
 
 

 

One possible solution:

 

1.

type
  TXPopupMenu = class(TUniPopupMenu)

  end;

2. OnFormReady:

procedure TMainForm.UniFormReady(Sender: TObject);
begin
  with TXPopupMenu(UniPopupMenu1).MenuControl.JSInterface do
  begin
    JSConfig('alwaysOnTop', [True]);
  end;
end;
Link to comment
Share on other sites

JSConfig('alwaysOnTop', [True]);

Correct solution.

 

 

Hello Farshad and Delphi Developer.
 
I started using z-index following the indications in this post.
 
 
But I'd like to do it the right way so I'm trying to use "alwaysOnTop" but it has not worked as intended.
 
In the MainForm I have a TUniPanel with property "alwaysOnTop = True" but when opening a form this is on TUniPanel.
 
What better way for this panel to stay on any form that is open?
 
 
Since then, thank you very much for your attention.
 
Link to comment
Share on other sites

Although it is not correct, is there any way to set the z-index for TUniPopupMenu?

 

Because it would solve my problem.

 

If not, I'll try to create a PopUpMenu with a TPanel and a few buttons.

 

I am very happy to use uniGUI.

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