Change the screen or menu layout dynamically

While a single optimized screen layout is often sufficient, dynamically varied layouts can be helpful in certain applications.
Implement the different layouts in their own include files. Using a GuiXT status variable whose content is part of the include name, you control which layout should be active.

Example 1: Dynamic screen layout
We design the simplified data entry of a new customer. As the required information differs for domestic, European and international customers, we offer the user a dropdown box to specify the customer's region and then design the screen to suit this type of customer: the right set of entry fields, appropriate maximum field length, default values and specific search help.

We use a status variable V[customertype] which can be set to "dom" for "domestic", "eur" for "european" or "gen" for "general" via a dropdown selection. To change the screen layout immediately when the user selects the customer type we use the "process=" option of the "dropdownlist" ommand:

Depending on the customer type we then use an "include" to display the appropriate layout.   

GuiXT Script

// Customer type selection
Box (1,5) (5,78) "1. Customer type"

Text (3,6) "Please select the customer type" size=32 -label

Set text[customertypes]_
  "dom=Domestic customer;eur=European customer;gen=General customer"

DropDownList (3,38.7) "customertypes" width=30 _
  refer="V[customertype2]" process=

// include appropriate screen layout for selected customer type
if V[customertype]
  include "create_customer_&V[customertype].txt"

Include  "create_customer_dom.txt"

Box (7,5) (18,78) "2. Address (domestic customer)"

InputField (9,7) "Name" (9,27) size=30 name="name1"
InputField (10,27) -nolabel size=30 name="name2"
InputField (11,27) -nolabel size=30 name="name3"
InputField (12,27) -nolabel size=30 name="name4"
InputField (13,7) "Street" (13,27) size=30 name="street"
InputField (14,7) "City" (14,27) size=30 name="city"

InputScript "return.txt"


Example 2: Dynamical menu
If you want your own graphical transaction menu to contain a large number of functions, it makes sense to use a hierarchical structure in which the user can navigate dynamically to the different parts.

The following example shows the possibilities (thanks to Adam Th. who shared the screenshots of his application with us):

The SAP menu has been moved slightly to the right to make room for new buttons that lead to the respective menu parts.


In this two-dimensional menu ithe user can either choose one of the transactions or navigate to further detailed menus:

Click on the image for a larger display

Implement the various menu parts in their own include files. Use a GuiXT status variable, e.g.
V[menustatus], which you change when the user clicks on one of the navigation buttons. Then include the right menu part using a dynamic include name, similar to Example 1:

include "easy_access_menu.&V[menustatus].txt"


InputAssistant + Controls