I am trying to emulate an iSeries ERP Interface and I need my button items to not have outlines around them. I attempted to simply create the items as an image and text label set as a group, but the behavior of the grouped item only works once.

For example, I have an image/text label combo called “Purchase Orders” that loads a new page; however, it will only work when clicked the first time. The new page loads in front of the initial Master Page, but once the new page is closed the “Purchase Order” button is no longer functional.

I assumed that this was because the item was not a true button object, so I tried creating a loop, but it had the same effect.

6 answers

Hi Matthew,

According to your description, I guess you were using the “Window” element in a new page, which takes the initial page as master page, when clicking the button, your simulation jump to the new page, is that right?

If so I understand what actually happened. When you click the “X” button on the Window element, you set its state to “invisible”. So when you click the button again, although the new page still has the Window element, it can not render it since the Window is “invisible”. To fix this, you need to restore the window’s state when clicking the button, like this:

This will work but it is not the recommended approach. Imagine you have multiple buttons that could bring up this window, you will have to restore the window state in all event handlers for all buttons.

The better way, is to let the Window element to restore its state every time you try to close it, and switch back to initial page (so you don’t see the window).


Thanks so much ViVi.

That is exactly what I am attempting, but even after adding your code suggestion I am still having the same issue with the grouped item button losing its functionality.

Now that I understand the process a bit better, let me see if this helps:

I have a 3 page simulation with Page 1 being the Master Page, and pages 2 & 3 being windows overlay pages that populate over the Master.

I added the following code to my second page:

I am sure that I am missing something simple, but I am really just getting started with ForeUI so I am still quite the newb!

Thanks in advance for any additional suggestions you may have.

  1. Hi Matthew, it seems that you set the wrong window visible...

    The window you were trying to close is "Window_Purchase_Orders", while the one you were trying to restore state is "Window_Main". I believe that is the problem :-)
  2. Yeah...I am an idiot!! That was exactly what I did :)
  3. Thank you very much for the help :)
  4. No problem, you are welcome :-)
  5. Ok, so I have one final issue now. Both page windows are working properly with the initial open and close; however, when I utilize the button to reopen them I am getting the window frames themselves, without any of the contents of the window.

    Do I need to set the visibility of each individual element being utilized the same way I did the window frame?
  6. No you don't have to. Just embed those content elements into the Window element, then they will show/hide with the Window.

    PS: you can hold the right mouse button, or hold Ctrl key on keyboard while dragging the selected elements, this way you can embed them into container.

ViVi I really appreciate your quick responses and great answers.

I have everything embedded into my windows containers, and it’s all working great, but I came across a formatting situation with my menu bar when I embed it.

All other elements appear to work as expected, but the menu bar shifts noticeably within the containing object when it’s embedded. I have reduced padding on all objects to 0, but this is what I am still getting:

Have you ever seen this before?

  1. It seems to be a bug and it only happens in the simulation. The menu bar looks good in editing mode but offset right a few pixels in the simulation.

    We will check it and see what we can do. Meanwhile, I forgot to mention that, Window element is so special that it can manage the elements that floating within its area as well. Which means, even you don't embed the menu bar into Window, just make sure the menu bar is within the window's frame, it will be treated as a part of the window and will be shown/hidden with Window together.

    At lease for now, do not embedding the menu bar into Window can workaround this bug.

Good morning ViVi,

Thanks for the explanation on the bug and the suggestion for a workaround, but when I remove the menu bar as an embedded object it disappears once the window is closed and reopened.

Initial Window State on first click:

Window State on all subsequent clicks:

Any other suggestions?


Yes, although the Window element will hide the menu bar above it, and it could move it as well (if you set the Window as “draggable” in edit mode), but it does not restore the visibility of the menu bar. It seems to be a feature that is forgotten before being implemented yet…

But you can always set the menu bar visible, when the Window is about to display:


Thanks ViVi, that did it!

As a matter of fact, all I had to do was set the windows state to visible and check “Include elements within the area” and it worked perfectly.

  1. Exactly, I forgot that option :-)

This question is now closed