Category : Files from Magazines
Archive   : DDJ9405B.ZIP
Filename : LIST.ASC

 
Output of file : LIST.ASC contained in archive : DDJ9405B.ZIP
_A MULTICOLUMN LIST BOX CONTAINER FOR OS/2_
by Brian Proffit

Example 1:

/* Let user know this may take a second by changing cursor to an hourglass. */
SetPointer('SPTR_WAIT')
ProgrammerFile = 'prgrmrs.dat'

/* Initialize the record count in the first record */
ProgRecord.0 = 0

DO WHILE LINES(ProgrammerFile) /* As long as there's more, */
ProgData = LINEIN(ProgrammerFile) /* read a record */
/* Break the record into its component fields */
Parse Var ProgData ProgName ',' Project ',' SchedPercent
ProgRecord.0 = ProgRecord.0 + 1 /* increment counter */
n = ProgRecord.0 /* current record number */
/* Set appropriate icon */
SELECT
WHEN SchedPercent<= -10 THEN ProgRecord.n._Icon = 'FaceFrown'
WHEN SchedPercent>= 10 THEN ProgRecord.n._Icon = 'FaceSmile'
OTHERWISE ProgRecord.n._Icon = 'FaceOkay'
END /* SELECT */
/* Now load the data into the stem */
ProgRecord.n._Title = ProgName /* Show name in all views */
ProgRecord.n._Data = ProgData
ProgRecord.n._Area.0 = 3
ProgRecord.n._Area.1 = ProgName
ProgRecord.n._Area.2 = Project
ProgRecord.n._Area.3 = SchedPercent
END /* DO WHILE LINES(ProgrammerFile) */
rc = STREAM(ProgrammerFile,'C','CLOSE') /* close file */
/* Define the layout of the columns of the listbox */
Perform('DefineFields');
/* Define the initial view in the container (just like the */
/* DRIVES object on the desktop has Detail, Icon, Tree */
SetCnrView('ContProgrammers','DETAILS')
/* Finally, load the ProgRecord stem into the container */
Parent = InsertCnrRecordList('ContProgrammers','ProgRecord.')
/* Note that the pointer is automatically reset */


Example 2:

ProgField.0 = 3 /* Set field counter */
DO Field = 1 TO 3
ProgField.Field._Area = Field /* Match fields to list areas */
ProgField.Field._TitleStyle = "CENTER" /* Center titles */
END /* DO Field */
/* Set parameters for Programmer Name */
ProgField.1._Title = 'Programmer'
ProgField.1._DataStyle = 'SEPARATOR' /* Default left justify */
/* and specify vertical bar on right */
/* Set parameters for Project Title */
ProgField.2._Title = 'Project'
ProgField.2._DataStyle = 'SEPARATOR'

/* Set parameters for Schedule Percentage */
ProgField.3._Title = '% ahead of sched.'
ProgField.3._DataStyle = 'CENTER SEPARATOR' /* Center column */
SetCnrFieldInfo('ContProgrammers','ProgField.')




  3 Responses to “Category : Files from Magazines
Archive   : DDJ9405B.ZIP
Filename : LIST.ASC

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/