Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 679
  • Last Modified:

Foating Navigation Menu

Hi
I need to have a navigation menu that will appear in the fore ground  of the exsisting layout when a navigation button is activated on the current layout.
The Navigation Layout has all the buttons present to navigate to other layouts.
 The navigation screen which must be reduced in size..500 x 500 eg without the Staus Toolbar .Once the selection is made then the present layout window must close and open in the new layout as selcted on the menu.Of course the navigation menu must close altogether.
Thanks
0
Krisraychris
Asked:
Krisraychris
  • 3
  • 3
  • 2
1 Solution
 
Will LovingPresidentCommented:
This would be handled by creating a layout for the navigation menu that fits your size requirements. The "navigation button on the current layout" would activate a script that would open a new window, go to the navigation menu layout, resize and position the window as required, and the pause the script.

New Window [Name: "Nav Menu"; Height: 500; Width: 500]
Show/Hide Status Area [Hide]
Go to Layout ["Navigation Menu" (someTableName)]
Allow User Abort [Off]
Pause/Resume Script [Indefinitely]


Some of tips:
To prevent users from doing anything besides clicking a button on the Nav menu, you would need to include and "Allow User Abort [Off]" step prior to the "Pause" Step. A paused script with User Abort set to OFF,  puts the layout into a "modal" condition meaning that the user cannot get to any other window
To ensure that the user goes to the correct layout (or cancels) without continuing any other script, make sure that when you assign the script in the "Button Setup..." dialog for each Nav button, that you set it the behavior to either Exit or Halt. The difference being the Exit, stops the currently running script - the one with the pause in it - and Halt stops ALL other scripts but the one selected to be Performed by the button.
The "New Window" script step allows you to name, size and position the Window wherever you want. There are calculations you can use in the Window Top and Window Left fields in the New Window dialog to ensure that the Window always appears in the exact center of the screen using the Get( DesktopHeight ) and Get( DesktopWidth ) functions. Because I do this regularly, I actually have a separate "Master" script which I can apply to any Windows to center it after it's been sized.
0
 
KrisraychrisAuthor Commented:
Hi
Thanks for your reply.
I have made the changes you have suggested.
I would like the navigation menu window to close when the file to be opened has been selected, so it is only used for the purpose of navigation.
In other words the new window needs to be opened to show the layout in full size.
Would appreciate your comments.
0
 
TocacarCommented:
In order to achieve the final step of closing the navigation menu window, if you follow willmcn's excellent advice above and call the the navigation window "Nav Menu", at the end of your script, include a 'select window' that selects that window by it's name and then 'close window' (current window).  This will close the nav menu window and leave the 'navigated to' window open for your user.  

To make it more clean, you'll probably want to add another script step to re-select the 'navigated to' window, so that the user doesn't have to click on it to make it the active window.  You will need to give all 'navigated to' windows a name so that you are able to re-select them by name for this purpose.

Good luck!
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
KrisraychrisAuthor Commented:
Thanks
I am not clear about your comment " include a 'select window' that selects that window by it's name "
I have a window now called Nav Menu and that is open and when I slect a layout to go to from the navigation buttons set up in the Navigation Menu Layout I need the Nav Menu window to close and the open a new selected layout in a new Window.Thsi window shows the staus toolbar.
Thanks
0
 
TocacarCommented:
Insert the 'select window' script step into your script (at the point you would like the Nav Menu window to close).  Once you had added it to your script, click the 'Specify' button and enter the name of the window (i.e, Nav Menu).  This will 'select' the floating navigation window, making it the active window.  Your next script step should be 'close window'.  Here, you can just click 'Current Window' in the Specify options as you will have the navigation window selected.

Actually, forget using the 'select window' script step and just use the 'close window' script step instead.  Remember to click the 'Specify' button and enter the name of the window you want to close (i.e., the navigation window - Nav Menu).  

Once you've added that, run the script and check whether the 'navigated to' window is 'active' (i.e., do you need to click that window to make it active before you can start using it?).  If it isn't active, go back to your script and use the 'select window' script step, after the close window script step, to make the 'navigated to' active.

0
 
TocacarCommented:
Oops.

...to make the 'navigated to' window active.
0
 
Will LovingPresidentCommented:
There are a couple of ways of going about this depending on how thorough you want to be. If your database is unlikely to ever have another window open besides the main window and the "Nav Menu" window, then just putting a "Close Window" script step at the beginning of any script linked to a button in the Nav Menu should take you back to the original window and automatically select it since it's the only window left open. As Tocacar notes,  you can ensure that the Nav Menu window closes by explicitly naming it in the "Close Window" script step dialog.

 Close Windows expliciity by name
If you could potentially have multiple windows open and you want to make sure that the navigation action takes place in the window that began the process from, I would recommend the following additional step. In the script steps I specified in my original answer, add as the first step a Set Variable for a global variable ($$) that captures the name of the originating window which would look like this:

Set Variable [$$StartingWindow, Value: Get( WindowName) ]

 Setting Global variable for the Starting Window
The revised script now looks something like this:

 Revised script
Next, at the beginning of your actual navigation script or scripts - the ones that are linked to the buttons in the Nav Menu layout, add the Close Window step, followed by a Select Window step that specifies the $$StartingWindow global variable.

Close Window [Name: "Nav Menu" ; "Current file]
Select Window [Name: $$StartingWindow; Current file]

As one additional suggestion, you don't need to have multiple scripts leading from whatever buttons you have on your Nav Menu. All buttons can lead to a single Navigation script and the script can determine what action to take based on the Script Parameter that is attached to each button.

specify button
Specify script parameter
The following screen shots illustrates both the Select Window by variable and using the script parameter specified by the button to determine what action to take.

 Navigation script
0
 
KrisraychrisAuthor Commented:
Thank you ...It turned out well !
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

  • 3
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now