Jump to content

Recommended Posts

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

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

  • 10 years later...
Posted
15 hours ago, Sherzod said:

image.png.ce3b7c946643fc2deafa0a7bb7bb8613.png

this works for the "MainForm"

but in the following example

Form2 -> Form3
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  ?

Posted
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 

Posted
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

Posted
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;

 

Posted
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

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

Posted
On 4/6/2023 at 3:41 PM, Luciano França said:

I didn't understand

how can I do this ?

On the one hand, a simple task, on the other hand, my solution does not work correctly, sorry.

I will try to analyze it again.

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