estrify Posted June 15, 2012 Posted June 15, 2012 Hi, Is there a way to have an always on top window/form? Thanks in advance. Quote
zilav Posted June 15, 2012 Posted June 15, 2012 You can create a custom <div> element in DOM and style it to be always on top, but this won't be an unigui form. All unigui controls are just a bunch of <div> tags inside html, so look for tutorials about div positioning over other divs. Like this for example: http://stackoverflow.com/questions/2941189/how-to-overlay-one-div-over-another-div Quote
estrify Posted June 18, 2012 Author Posted June 18, 2012 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 Quote
Administrators Farshad Mohajeri Posted June 18, 2012 Administrators Posted June 18, 2012 Logged #1359 Quote
estrify Posted February 20, 2013 Author Posted February 20, 2013 Logged #1359 Hi Farshad, Please, take a look to http://www.eirik.net/Ext/ux/util/AlwaysOnTop.html ¿is there a way to use it with the actual version of UniGUI?... TIA Quote
estrify Posted February 26, 2013 Author Posted February 26, 2013 Logged #1359 Hi Farshad, Please, take a look to http://www.eirik.net/Ext/ux/util/AlwaysOnTop.html ¿is there a way to use it with the actual version of UniGUI?... TIA Is there any news about # 1359? Quote
estrify Posted March 7, 2013 Author Posted March 7, 2013 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 Quote
Luciano França Posted March 23, 2023 Posted March 23, 2023 I need this functionality has it been implemented ? if yes how ? Quote
Sherzod Posted March 24, 2023 Posted March 24, 2023 6 hours ago, Luciano França said: I need this functionality Quote
Luciano França Posted March 24, 2023 Posted March 24, 2023 15 hours ago, Sherzod said: 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 ? Quote
Sherzod Posted March 25, 2023 Posted March 25, 2023 Hello, I couldn't reproduce. Can you make a simple testcase to check? Quote
Luciano França Posted March 27, 2023 Posted March 27, 2023 On 3/24/2023 at 9:04 PM, Sherzod said: Hello, I couldn't reproduce. Can you make a simple testcase to check? Attached is a test project and a video where I show what I can change by placing Form1 on top of Form2 Project1.7z Quote
Sherzod Posted March 27, 2023 Posted March 27, 2023 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 Quote
Luciano França Posted March 27, 2023 Posted March 27, 2023 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 Quote
Sherzod Posted March 28, 2023 Posted March 28, 2023 @Luciano França Only one form can be AlwaysOnTop at the same time, and I will try to post a solution later today. But be aware that when you close the "last form", you need to pass this "config" to another form you need. Quote
Luciano França Posted April 4, 2023 Posted April 4, 2023 On 3/27/2023 at 11:37 PM, Sherzod said: @Luciano França Only one form can be AlwaysOnTop at the same time, and I will try to post a solution later today. But be aware that when you close the "last form", you need to pass this "config" to another form you need. ? Quote
Sherzod Posted April 5, 2023 Posted April 5, 2023 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; Quote
Luciano França Posted April 5, 2023 Posted April 5, 2023 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 Quote
Sherzod Posted April 6, 2023 Posted April 6, 2023 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... Quote
Luciano França Posted April 6, 2023 Posted April 6, 2023 Just now, Sherzod said: I have already mentioned... Okay. Then you can use the z-index CSS property... I didn't understand how can I do this ? 1 Quote
Sherzod Posted April 11, 2023 Posted April 11, 2023 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. Quote
Luciano França Posted May 13, 2023 Posted May 13, 2023 On 4/11/2023 at 11:56 AM, Sherzod said: 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. ? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.