MARK (set multiple selection mode)

Top  Previous  Next

 

MARK(flag)

MARK

Enables multiple items selection.

flag

The label of a QUEUE field.

The MARK attribute (PROP:MARK, write-only) enables multiple item selections from a LIST or COMBO control. When an item in the LIST is selected, the appropriate flag field is set to true (1). Each marked entry is automatically highlighted in the LIST or COMBO. Changing the value of the flag field also changes the screen display for the related LIST or COMBO entry.

If the MARK attribute is specified on the LIST or COMBO, the IMM attribute may not be.

Example:

Que1    QUEUE

MarkFlag BYTE

F1       LONG

F2       STRING(8)

       END

 

WinOne WINDOW,AT(0,0,160,400),SYSTEM

       LIST,AT(120,0,20,20),USE(?L1),FROM(Que1.F1),MARK(Que1.MarkFlag)

       COMBO(@S8),AT(120,120,,),USE(?C1),FROM(Que1.F2),MARK(Que1.MarkFlag)

      END

 

CODE

DO LoadQue                   !Load Que1 with data

OPEN(WinOne)

ACCEPT

CASE EVENT()

 OF EVENT:CloseWindow

  BREAK

 END

END

LOOP X# = 1 to RECORDS(Que1) !Loop through queue entries

 GET(Que1,X#)

 IF Que1.MarkFlag            !If the user marked the entry

  DO ProcessMarked           ! then process it

 END

END

 

!*******Use of PROP:MARK

?List{Prop:Mark} = ''         ! clears marking

?List{Prop:Mark} = SFQ:Mark   ! set the field