Environmental Engineering Reference
In-Depth Information
On the left side bar of the window we find various elements which constitute
a GUI. Major elements that are used in the following demonstration are:
Push button
Edit text
Static text
Axes
Pop-up menu
Radio button
Panel
There are further elements we do not use in this example: slider, radio button,
check-box, list box, toggle button, panel, button group and ActiveX control. Click
at the 'static text' variable and move the cursor into the big GUI workbench on the
right. The workbench represents the GUI window, which finally will become the
interface to the user. The 'static text' appears and is fixed at a certain location. In order
to change and format the text element, double click on it (see right side of Fig. 20.3 ).
As a result another window appears in which all properties of the selected element
are shown and can be edited. This so-called 'Property Inspector' is shown on the left
side of Fig. 20.3 .
We want to change the text to 'Diffusivity'. The new text string is entered as
'String' property, where before the 'Static Text' was found (see Fig. 20.3 ). As further
exercise with the new tool the reader may change the 'Font Size' property to 12 and
the 'FontWeight' property to 'bold'. Select a color for the 'Foreground Color'
property. Clicking the color select box appears that is depicted in Fig. 20.4 .
Having entered the changes in the Property Inspector these become active in the
workbench.
Now let's examine the previous procedure for a different GUI element. Choose
the 'edit text' element and place it aside the static text element, which was already
entered. Double-click on the element to reach the Property Inspector with the
corresponding properties. Change the 'String' property to '1'; we want to use
this element for the input of the diffusivity and change the 'Tag' property to
'D_edit'.
In the very same way we add some further text and edit elements, as illustrated
in Fig. 20.5 . The reader may recognize that the elements are related to the
major input parameters of a transport model, as described in Chaps. 4, 5 and 6.
In fact, when finished the example GUI will allow 1D transport simulation and
visualization.
Search WWH ::




Custom Search