Relative Layout issue

OK, I’ve got a project I am converting from PMI to Ignition. I am trying to convert the screens over using Relative layout so they will display properly on any monitor size. I got the first screen converted, but have a small problem. In the Designer, the object are all lined up how I want them, everything looks fine. However, when I run the project, no matter what size the screen is, there is a gap between the top of the uppermost objects on the screen and the titlebar.

Designer:

Run Time:

I read through the layout section of the user manual, but nothing jumps out at me. Everything else is working exactly as it should (resizing objects, placement is staying relative to background etc.) just this gap showing up. Thanks.

Joe

Relative layout just maintains the aspect ratio you set up in the designer. It will make the contents of the window as big as possible, but centered and in that aspect ratio. So if the designer window is 400x300 and on the client it is 400x600, then you will have blank space on the top and bottom that fills in the remaining 300 pixels.

You should use anchored layout for anything that you want to be a certain distance from an edge of the window (and you can anchor to multiple edges to stretch out the components). You can also mix and match anchored layouts for headers with relative layouts for everything else on the screen. Just be sure that you test it with all the resolutions you plan on using.
:thumb_right:

Robert,

What I am seeing is this. I have a window designed for 1900x1200. I am running it on a 1900x1200 monitor, and have the gap at the top. I then run it on a 1024x768, and have the same relative gap at the top. Given your explanation, I would expect that on the lower res display, but shouldn’t it be a WYSIWYG on the same resolution monitor? Thanks.

Joe

Forgive me if you’re already aware of this but…

If you come from a traditional SCADA background (e.g., WW InTouch, RSView, iFIX) like me, the FPMI/Java layout approach is a little confusing at first. It took me a while to get used to the FPMI/Java approach but its a good one.

When you’re developing a window, don’t be concerned with monitor resolution. What you want to be concerned with is layout, both of your windows and the components/objects on them.

If you’re using a typical screen layout, you will basically want three or four windows on the screen at a time; one anchored on the left (typically your menu or navigation window), one on the top (typically your logo/status/title window), one at the bottom (optional), and lastly, a floating window (the core information/animation/system information window). This last window will consume any remaining screen territory not occupied by the anchored windows.

The left, top, and bottom anchor windows will typically have fixed dimensions and locations. The floating window will typically be swapped out by clicking on the menu/navigation buttons you’ve defined.

To define your window layout, you will set their “Dock Position” properties. For the window on the left, choose “West”, for the top window, choose “North”, for the bottom window, choose “South”, and for the main information window, choose “Floating”. You will also likely need to set the “Border Display Policy” and “Titlebar Display Policy” properties as well.

Regarding components/objects, you’ll need to use the “Layout Constraints” editor. Select a component/object and press . If you want the component to stay fixed with regard to an edge or center of the window, select the “Anchored” radio button. You will then need to select the “Anchoring Options”. Click an anchor option button to toggle it on or off. Typically, the top and left anchor options are selected by default.

For example, if you want a blue “ribbon” across the top of a floating window, you will place a blue rectangle across the top of the window, making sure that it touches the left, top, and right edges of the window. You would then enable the top, left, and right anchor options with the “Layout Constraints” editor. When the window is displayed, the window layout manager will use the layout options you selected to reposition/resize the ribbon. In this case, the layout manager adjusts the rectangle’s width to match the width of the window, regardless of the screen resolution.

Try experimenting with the different anchoring options and you’ll soon have it figured out.

MickeyBob is right on the money with his advice about layout.

[quote=“jgreenewv”]Robert,

What I am seeing is this. I have a window designed for 1900x1200. I am running it on a 1900x1200 monitor, and have the gap at the top. I then run it on a 1024x768, and have the same relative gap at the top. Given your explanation, I would expect that on the lower res display, but shouldn’t it be a WYSIWYG on the same resolution monitor? Thanks.

Joe[/quote]
When you design a window that is 1900x1200 and open it on a monitor that is 1900x1200, you won’t see the window exactly as you designed it. Other things like titlebars and docked windows take up some of the screen real-estate. For example: The windows titlebar/client menubar and borders amount to about 200 pixels off the height of the window and around 10 off the width, so you end up with a 1900x1200 window in a 1890x1000 space. This would make a maximized screen shorter and put blank space on the sides, but adding a docked screen to the left would cause your main window to leave space on the top and bottom.

Is this the only window you have open? Is it maximized? Can you provide a full screenshot?

Robert and MickeyBob,

Thanks for the tips. I’ll play around with it and see what I need to do. Right now, I have everything on one window (nav buttons, alarm info, and interface). I’ll try breaking it out like you suggested. I did a previous project in PMI, but it was a stand-alone system, so I just anchored everything and it worked fine. This new system will potentially be run on multiple systems, so I wanted to make sure everything was re-scaling like it should. Thanks for all the help!

:thumb_left:

Joe

Robert,

Another question for you. I am splitting my system up with a navigation bar at the top, a status bar on the right, and the changable windows in the rest of the display area. One think I am having trouble sorting out, though. I have forward and back buttons on my navigation bar to allow the user to move back and forth through the changeable windows. This works fine if I have the forward/back buttons on each window that is changing, but does not appear to be working properly since I moved them to the navigation bar. Any thoughts on what I might need to check on this? Thanks.

Joe

I guess the answer to you question depends on how you’re doing the navigation.

If you haven’t done so already, I would recommend downloading some extras/goodies for the IA web site, namely the “Navigation Script Module” and the “Skeleton Project”. You can get them here: http://www.inductiveautomation.com/downloads/extras

The “Navigation Script Module” has some helper methods for navigating windows. The “Skeleton Project”, if I remember correctly, has base window navigation configured. You can dissect it to get a good idea of how to implement screen navigation. You might want to check out the “Example Project” as well.

If you’ve done this already or this doesn’t address your issues, are you getting any error messages?

[Edit]

I just remembered that the tab component is a great way to implement navigation. It’s really simple to use. You just drop it on a window, populate a few properties, and it takes care of the rest. Check it out in the documentation.

MickeyBob,

I am trying to duplicate a project we did in another software package. Basically, we have the navigation bar at the top set up similar to a web browser, with a back button, forward button, and several buttons for status and configuration windows. In the various display windows that are brought up in the bulk of the screen, we have an overview window with clickable objects that will open up other status windows.

In the previous software package we used, you could click an object to change screens, then click the back button to change back to the previous screen. I downloaded the navigation script and added it to my project, then changed my buttons and objects to use the navigation scripts instead of the default system scripts. The problem still appears to be that, because of the three separate windows open at any given time, I don’t have a simple way to use the Back button on one window to change another. I played around with the tab strip, but it doesn’t give me the functionality I’m trying to duplicate.

Anyone have any suggestions on a direction I should look towards? Thanks.

Ok, let me try to clear some things up.

First of all, I wouldn’t use the navigation script module. That was a really old module used before we had the system.nav.* module, which basically does the same thing, but in built-in way.

The navigation scheme you’re describing is pretty much the most common scheme we see people do. In fact, it is so common it has its own section in the user manual: I’d review the entire Project Design > Windows & Components > Windows section of the user manual.

Download the Ignition “Example Project” - it has navigation much like you’re describing, except it has the nav docked to the west instead of the north.

The basic idea is that you’ll have one window docked north, and then the “main” screen maximized. You’ll then swap that main window out with your other screens. This will enable you to use the system.nav.goBack, goHome, and goForward functions.

Post back here if you get stuck.

Carl,

I was wondering about the nav script module. I’ve changed everything back to using the standard Swap, Back, and Forward functions. Here is a screenshot of what I am trying to do:

What I am seeing is, if I click on one of the status boxes, the Overview window (with the map background) swaps to the correct status window. But, when I click the Back button on my menu window, nothing happens. Also, if I have a site status window opened, and click on the Home button, the status window AND the menu window are replaced by my overview. I am assuming that this has something to do with the fact that I am swapping out one window, but trying to control navigation from another. I set my behavior settings (other than dock position) on my menu and notes windows to match what is in the Example project. Anything else you can think of that I should check? Thanks.

Please report the following window property settings for the overview, navigation menu, and status windows:

Start Maximized
Dock Position

Navigation menu: Dock Position North, Start Maximized False
Notes window: Dock Position East, Start Maximized False
Overview and status windows: Dock Position Floating, Start Maximized True

That all looks right. Perhaps you could send us the project or call in and we can look at it over GoToMeeting?

is this all old information? I am using 7.9 and not finding things like layout constraints

This post is from 2010, so it is 9 years old. Ignition has changed quite a bit in 9 years.

If you have a specific question, feel free to email our support or training departments, or make a new topic in the forum with your question and any relevant information.