My program behaves differently in GUI and in Character Mode
Color definitions
Character mode 4GL uses a a fixed palette of 8 colors, with a number of intensities. The Querix GUI interfaces are able to translate these color values into full 24-bit RGB color values.
By default, the 4GL application will be using a color mapping based in the file $QUERIXDIR/etc/fglprofile.std. This file defines foreground and background color pairs (or just the foreground, if the background is to be left as default).
The Querix Client scripting language is able to specify colors on an object basis (so two objects who are declared as, say, RED in the 4GL need not share the same RGB values).
The color attribute 'BLINK' is not inplemented in the Querix GUI clients.
Can't run interactive Unix tools in the graphical client
The 4GL GUI interface only understands how to render programs that are compiled from Querix tools. It cannot render interactive Unix/DOS shell tools such as 'more', etc.
You will need to address the usage of such tools as appropriate.
My windows are floating, how do I stop this?
The Querix GUI clients provide a menu of window behaviour. By default they operate in what is called 'mixed' mode. A normal OPEN WINDOW statement will result in a window which is embedded in the parent window. The user cannot move or resize this window (this style of window is called a 'flat' window).
A window opened with the 4GL attribute 'BORDER' is opened as a floating window; the user is able to resize and drag this window.
To change the mode of operation the client uses, the GUI script property 'windowStyle'. The windowStyle script property can take one of 3 values:
- flat
all windows are opened as embedded windows - windowed
all windows are opened as floating windows - mixed
windows are embedded unless they carry the 4GL attribute BORDER
How do I remove the default toolbar?
The toolbar used by the graphical clients by default, is controlled by the file $QUERIXDIR/etc/fglprofile.std. You can edit this file to remove the default toolbar. Simply change the line
gui.toolbar.visible = true
to
gui.toolbar.visible = false
My 'Bell' sound doesn't work in GUI
In text/character mode, you can use the '\b' bell meta-character. In GUI, meta-characters are implemented differently.
To create a bell sound, use the function fgl_bell()
MAIN
DEFINE
c SMALLINT
DISPLAY "Let's play a BELL sound" AT 5,5
FOR c = 1 TO 5
CALL fgl_bell()
SLEEP 1
END FOR
END MAIN
Normal Field is rendered as a Combo List Box
In text/character mode, a form INCLUDE clause will only force the program to validate the input.
In GUI, the modern clients will by default automatically use the INCLUDE values to populate a combo list box.
This behavour can be adjusted and disabled.
Disabling auto-generation of combo list boxes
In your script, add the line:
?.?.?.?.?.noCombo: TRUE
To disable a particular field from auto-generating a combo box use:
?.?.?.<table name>.<field name>.noCombo: TRUE
To extend the width of your combo box by a few pixels
Enables you to increase the width of characters in combo boxes to 1.5 times the size specified in the 4GL program. This can be particularly useful if you have a lot of combo boxes with single character choices. In your script, add the line
?.?.?.extraComboSpace: TRUE
To define the combo box auto-generation conditionally (value range)
There is also server configuration (fglprofile) option to disable auto-generation when the possible INCLUDE values are higher than a specified value.
There is a limit on the number if items allowed in any one field. As well as specifying the values directly in the INCLUDE statement; it is also possible to specify a range. This range of values could have been any size before GUI development, with values entered being checked to see whether they were within the range specified. With combo boxes however, all the values in the range are sent to the application when the combo box is drawn. If this range were too high, it would take a long time to draw the combo box and would be very inefficient.
The default setting is 100, which can be altered by using the fglprofile setting gui.combo.max_values and specifying as its argument the maximum number of permitted values in a combo box field. For example:
gui.combo.max_values = 25
would only allow 25 values to be entered into any one field.
Setting the Minimum Width of a Field
This setting will speficy minimum width, in terms of characters, that a field can be before it is considered for conversion to a combo box. This is because a combo box field has to have an arrow appear in the field as well as the values and with very small words or numbers, the appearance of the field can be obscurred. To change the mimimum width for a field to 5 before it becomes a combo box field, use the following code:
gui.combo.min_width = 5
The default value for the above width is 2.