Ask Reuben – August 18, 2025
Multiple Windows With GBC
Why has my window disappeared?
How can I render multiple windows?
What has been introduced for windows in GBC 5.01.05?
If you study the OPEN WINDOW syntax. … … it has sub-clauses When developers transformed to Genero GUI environments, the native front-end operating system would control the position and dimension of the window. You could influence the size with the contents of the form, and the size and position with presentation style attributes such as position, windowState, as well as having stored settings remember the position and size of the window and use it next time. This resulted in a User Interface that could comprise multiple native windows that overlapped, these could be resized, and moved around to view what was obscured. Hence when transforming to a Genero GUI application in the 2000’s, for overlapping windows this typically involved removing the AT …, and WITH … ROWS, … COLUMNS syntax from your code as it was ignored, as well as instances of CURRENT WINDOW, and making sure that for each dialog statement, the correct window was the last one opened. If your code made use of non overlapping windows, the transformation path typically involved refactoring these multiple windows into one window with each component window being inside a GROUP container which would draw the border. There was also a Presentation Style Attribute windowType that had two values, “normal” and “modal”. I am willing to be corrected but there was no rendering or behavioural difference with the Native User Interface with this Presentation Style Attribute, and there was no restriction on what window could be opened on top of another. From a normal window you could open a normal window or modal window, and from a modal window you could open a normal and modal window, there was no restriction on how many windows that could be opened on top of one another. windowType=”modal” was effectively informational to the developer, signalling that the intent was for this to be a window that the user went to, did one thing, and then returned to where they were in the application. When the first Genero Web Client User was introduced, instead of having a native windows front-end, we now had a browser tab. There was no longer a windows manager and so the decision was that we would render at most two windows in the browser tab. There would be the topmost normal window taking up the whole browser tab and the topmost modal window appearing as a popup window over the top. Informally this was known as the TopMost Normal Window strategy and I covered it in an Ask-Reuben article. This User Interface was common in Web Interfaces of the time and so those Four Js developers who used the Web interface as their front end of choice transformed their code to work within this paradigm. Typically this involved combining many forms of an application into one form by use of FOLDER. and reviewing and being more diligent about the use of the windowType=”modal” presentation style attribute. With the introduction of Universal Rendering, the decision was made to move forward using the TopMost Normal Window strategy. For those customers whose front-end was a web browser this was no disruption. For customers who up until then had a User Interface that was 100% native desktop based and had never adapted their application to a Genero Web Client or Universal Rendering interface, this made them reluctant to upgrade. To illustrate, in this Native Rendering screenshot, a normal window has been opened on top of another normal window, followed by two modal windows being opened on top of one another …OPEN WINDOW identifier
[ AT line, column ]
WITH { FORM form-file
| height ROWS, width COLUMNS
}
[ {ATTRIBUTE|ATTRIBUTES} ( window-attribute [,...] ) ]
AT line, column
and WITH height ROWS, width COLUMNS
. These date back to Informix-4gl and character interfaces where this would control the position and dimension of the window in character units. With Genero TUI these were respected. You could have multiple windows overlap, and if this occurred the top window would obscure parts of the window behind it. There was even syntax CURRENT WINDOW which allowed the developer to control what window was on top. Remember back then there was no mouse for the user to select a window. These windows did not have to overlap, you could make the windows be adjacent to each other.
Note: how you can see windows titled Normal 1, Normal 2, Modal 1, Modal 2. A real life scenario for that situation might be a transaction entry program e.g. Sales Order Entry, it allowed you to click a button to view an enquiry window (another normal window) that provided details about something in your transaction entry program e.g. a customer, a product etc. From this enquiry window a modal window is opened allowing you to for example filter your search and from this modal window another modal window is opened to render your own widget, in this case a ComboBox with 3 columns in the drop-down, one of which is an Image.
When rendering in Universal Rendering, with the TopMost Normal window strategy, only two windows are now visible. The topmost normal window, and the topmost modal window …
Note: you can only see the windows Normal 2 and Modal 2. For some customers this was undesirable. Other customers, typically those who have been exposed to the web client were prepared to adapt their code to fit within the TopMost Normal window strategy as it helped their application look good in the web browser environment.
With the GBC 5.01.05 release, there was a change to this TopMost Normal Window strategy. ALL modal windows are now rendered, only normal windows are subject to the TopMost Normal Window strategy.
Using GBC 5.01.05, this same example scenario renders as …
Note: how both modal windows Modal 1 and Modal 2 are now visible, but only the topmost normal window Normal 2 is visible.
The question that gets asked then, that is great for modal windows, why can’t the same be done for normal windows?
At this point I would point out the following… What if you made these normal windows modal?
If I go into my .4st and change all values of windowType that are “normal” to “modal” I now get the following …
… Note: how can see all the windows, both normal windows (Normal 1 and Normal 2) and both modal windows (Modal 1 and Modal 2), and in fact what you see is very close to what you had with Native Rendering. All windows are visible, and by dragging and resizing an active obscuring window you can see what is obscured.
There is room for further refinement, and if you like what you are now seeing I would encourage you to experiment making this simple change to your .4st and work with us to fine tune. I suspect that in your code you would now be more diligent about wether a window is opened as normal and modal, and your .4st might end up looking like the following …
<StyleList> <Style name="Window"> <StyleAttribute name="windowType" value="modal" /> </Style> <Style name="Window.main"> <StyleAttribute name="windowType" value="normal" /> <StyleAttribute name="windowState" value="forceMaximized" /> </Style> <Style name="Window.dialog"> <StyleAttribute name="windowType" value="modal" /> ...
… That is all windows modal except for perhaps a style used for windows that are normal (and is perhaps always full screen) that are the main base window of each Genero application.