Jump to content

Always on top form


estrify

Recommended Posts

Thanks. I'll take a look at this, but hoped to find a way to use it in a UniGUI form.

 

If it helps, I found the following link specific to ExtJS: http://www.sencha.com/forum/showthread.php?47579-alwaysOnTop-config-option-for-Ext.Window

 

And here, an extension for ExtJS 4: http://www.sencha.com/forum/showthread.php?163870-Ext.ux.window.AlwaysOnTo

Link to comment
Share on other sites

  • 8 months later...
  • 2 weeks later...

Is there any news about # 1359?

We want to implement a floating form with errors and warning messages, always on top, to help the user to navigate across the application to revise and fix his data.

Is there any news about the possibility of the inclusion of this feature as a part of the framework?

TIA

Link to comment
Share on other sites

  • 10 years later...
On 3/25/2023 at 12:58 AM, Luciano França said:

the Form3 form will not be on top of the Form2 is there a way to keep the order always keeping the Form3 above the Form2  ?

1. Form1.FormStyle = fsNormal

2. Form2.FormStyle = fsStayOnTop 

Link to comment
Share on other sites

1 hour ago, Sherzod said:

1. Form1.FormStyle = fsNormal

2. Form2.FormStyle = fsStayOnTop 


but see if you create several forms
I will have problems

see the following:

Form2 -> Form3 -> Form4

In this situation I wanted Form3 to always be above Form2 and the same with Form4 always above Form3

Link to comment
Share on other sites

10 hours ago, Luciano França said:

?

Try to analyze and understand this approach.

1. MainForm.Script ->

window.setOnTop = function() {
    var wins = [];
    Ext.WindowManager.each(function(win) {
        win.setAlwaysOnTop(false);
        wins.push(win)
    });
    wins.sort(function(win1, win2) {
        if (win1.id < win2.id) {
            return -1;
        } else if (win1.id > win2.id) {
            return 1;
        } else {
            return 0;
        }
    });
    wins[wins.length - 1].setAlwaysOnTop(true);
};

2. For all child forms ->

//Show, for example:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
 UniForm1.Show;
 JSInterface.JSCallGlobalDefer('setOnTop', [], 500);
end;

//Close, for example, OnClose event:

procedure TUniForm1.UniFormClose(Sender: TObject; var Action: TCloseAction);
begin
  JSInterface.JSCallGlobalDefer('setOnTop', [], 500);
end;

 

Link to comment
Share on other sites

14 hours ago, Sherzod said:

Try to analyze and understand this approach.

1. MainForm.Script ->

window.setOnTop = function() {
    var wins = [];
    Ext.WindowManager.each(function(win) {
        win.setAlwaysOnTop(false);
        wins.push(win)
    });
    wins.sort(function(win1, win2) {
        if (win1.id < win2.id) {
            return -1;
        } else if (win1.id > win2.id) {
            return 1;
        } else {
            return 0;
        }
    });
    wins[wins.length - 1].setAlwaysOnTop(true);
};

2. For all child forms ->

//Show, for example:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
 UniForm1.Show;
 JSInterface.JSCallGlobalDefer('setOnTop', [], 500);
end;

//Close, for example, OnClose event:

procedure TUniForm1.UniFormClose(Sender: TObject; var Action: TCloseAction);
begin
  JSInterface.JSCallGlobalDefer('setOnTop', [], 500);
end;

 


Attached is a project with a Video where you can see that the forms are not maintained in z-order

I can switch between them

 

 

Unigui Form StayOnTop.7z

Link to comment
Share on other sites

7 hours ago, Luciano França said:

Unigui Form StayOnTop.7z 1.93 MB · 0 downloads

I have already mentioned...

On 3/28/2023 at 7:37 AM, Sherzod said:

Only one form can be AlwaysOnTop at the same time...

Okay. Then you can use the z-index CSS property...

Link to comment
Share on other sites

  • 1 month later...

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