Follow

How do Acu GUI apps look in Elastic COBOL

Elastic COBOL "samples" include a "Graphics" sample that when you select it from the "New COBOL Project " > "Project Type " > "Samples" > "Graphics gives you a sample that begins:

 

*
* GFXSAMPLE
*
* (C) Copyright Heirloom Computing 2011. All Rights Reserved.
*
* This file and associated files are copyrighted information
* of Heirloom Computing. Permission is granted for usage in
* conjunction with the Elastic COBOL product.
*
* This program demonstrates a variety of graphical components:
*
* bar A graphical horizontal or vertical bar.
* frame A frame around a group of components.
* label A text label.
* push-button A button the user can push.
* list-box A list of choices for the user.
* entry-field A textfield for user text entry.
* check-box A single checkable box, representing a boolean value.
* radio-button A mutually exclusive, selectable button, grouped.
* scroll-bar A scroll-bar directly controllable as a component.
* slider A slider with tick marks.
* bitmap A bitmap image to be displayed.
* menu A menu-bar at the top of the window/screen.
* status-bar A status-bar at the bottom of the screen.
* tree-view A hierarchical tree of information.
*
* This program is not meant to be aesthetic, but rather to demonstrate
* a variety of graphical components available for use in the graphical
* screen section.
*

Here are some screen captures from the GFX Sample applications:

Initial Screen

gfx-pic1.png

 

Here's the result of the "Push Me" button:

gfx-pic2.png

 

And here's the result of various widgets being adjusted on the window (radio, select, slider, auto-formatting of an input field, tree view):

gfx-pic3.png

 

Checkout the sample included with Elastic COBOL IDE to see how screen definitions are established in COBOL record structures.  Here's the first few lines:

 
screen section.
01 main-screen.
* A nice graphical border to the window; the title isn't used.
05 the-menu menu title "Menu Bar".
* Bottom
05 bar line 25 col 1 size 79.6 width = 5, color 4,
shading = (-1, 1, 0, 0, -2).
* Left
05 bar line 1 col 1 lines 24, width = 5, color 4,
shading = (-1, 1, 0, 0, -2)
trailing-shift = (3, 2, 1).
* Top
05 bar line 1 col 1 size 79.6 width = 5, color 4,
shading = (-1, 1, 0, 0, -2)
position-shift = -1
leading-shift = (0, 1, 2, 3, 4).
* Right
05 bar line 1 col 80 lines 24 width = 5, color 4,
shading = (-1, 1, 0, 0, -2)
leading-shift = (4, 3, 2, 1, 0)
trailing-shift = (0, 1, 2, 3, 4).
* Frame around Description Label
05 frame "Description" line 2 column 2 lines 6 size 22 cells
engraved.
* Description Label
05 label "This program demonstrates the various graphical handle components."
line 3 column 3 lines 4 size 20 cells
background-color 9 foreground-color 14.
* Push-Button to Exit (ok-button makes the termination value 13)
05 push-button line 23 column 70 ok-button title "E&xit".

* List-Box
05 the-list-box list-box using list-data
line 9 column 2 lines 5 size 22 cells
title "Fruit".

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.
Powered by Zendesk