home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sams Cobol 24 Hours
/
Sams_Cobol_24_Hours.iso
/
Cobol32
/
PowerCBL
/
powercbl.Z
/
combobox.prc
< prev
next >
Wrap
Text File
|
1997-03-09
|
1KB
|
42 lines
@POWER POWSHEET SHEET1 *
@POWER POWPSBTN PUSH10 CLICK
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 ADD-DATA.
02 PIC X(5) VALUE "DATA-".
02 ADD-COUNT PIC 999 VALUE ZERO.
PROCEDURE DIVISION.
* Create a data item.
ADD 1 TO ADD-COUNT.
* Add the data item to the combo box (COMBO1).
CALL ADDSTRING OF COMBO1 USING ADD-DATA.
MOVE RETURN-CODE TO POW-SELECT OF COMBO1.
@POWER POWPSBTN PUSH11 CLICK
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 SEL-NO PIC S9(4) COMP-5.
PROCEDURE DIVISION.
* Get the selected number in the combo box (COMBO1).
MOVE POW-SELECT OF COMBO1 TO SEL-NO.
* Delete the above number from the combo box (COMBO1).
CALL DELETESTRING OF COMBO1 USING SEL-NO.
MOVE RETURN-CODE TO POW-SELECT OF COMBO1.
@POWER POWCOMBO COMBO1 SELCHANGE
ENVIRONMENT DIVISION.
DATA DIVISION.
WORKING-STORAGE SECTION.
01 SEL-DATA PIC X(64).
PROCEDURE DIVISION.
* Get the selected character-string.
MOVE POW-SELSTRING OF COMBO1 TO SEL-DATA.
* Display the data in LABEL1.
MOVE SEL-DATA TO POW-TEXT OF LABEL1.
@POWER POWPSBTN PUSH12 CLICK
ENVIRONMENT DIVISION.
DATA DIVISION.
PROCEDURE DIVISION.
* Close the sample application
CALL CLOSESHEET OF SHEET1.