(SAT) Demo Application - main

Source Code

newScreen {{"Hosts"} 67x26}
addMultiList {hosts 1,1 19 {Host,12 Serial_No,15 Company,16 Model,15} {displayhost hosts} outline yscroll}
addButtons {1,23 8 {Add addhost} {+Print printhosts} {32} {+Exit exit}}
Comments

This SAT/DL screen displays summary details for all the hosts in the demo database. This is the application "entry" point.

Called by: addhost displayhost


newScreen {{"Hosts"} 67x26}
Clear the screen/message line, set the application screen size to 67 characters by 26 rows, and set the window title to Hosts.
addMultiList {hosts 1,1 19 {Host,12 Serial_No,15 Company,16 Model,15} {displayhost hosts} outline yscroll}
Add a multi-column list box called hosts with its top left corner at column 1, row 1 which is 19 lines deep. The list box has four columns: "Host" (12 characters), "Serial No" (15 characters), "Company" (16 characters) and "Model" (15 characters). All of the columns are, by default, left justified. When a host is selected by double-click, the displayhosts process is run with the contents of the selected hosts line being passed as a parameter. The list box has an outline and a vertical scrollbar (yscroll).
addButtons {1,23 8 {Add addhost} {+Print printhosts} {32} {+Exit exit}}
Add a row of buttons with its top left corner at column 1, row 23. Each button is 8 characters wide. The row has three buttons: "Add" (runs addhost), "Print" (runs printhosts), a 32 character gap, and "Exit" (Terminates the application). The "Add" button will be disabled if the user has access 1 to this screen. The "Print" and "Exit" buttons (prefixed with "+") are always active.


Copyright © 2000 Adrian Davis.