User Tools

Site Tools


prop_nextfield.htm
Navigation:  Language Reference > App C - PROP: Runtime Properties > Complete Property List > ====== PROP:NextField ====== Previous pageReturn to chapter overviewNext page

An array property which returns the next control number in sequence of a window or report. (READ-ONLY) The control number returned is the control following the array element numbered control. The order in which PROP:NextField returns field numbers is undefined. PROP:NextField returns zero when the array element number is the last control in its list. This property easily allows you to loop through all the controls in a window or report, whether those controls have USE attributes or not. Controls without a USE attribute are assigned a control number starting at 32768.

Example:

WinView   WINDOW('View'),AT(0,0,320,200),MDI,MAX,HVSCROLL
       IMAGE(),AT(0,0,,),USE(?Image)
      BUTTON('Save Picture'),AT(80,180,60,20),USE(?SavePic)
      BUTTON('New Picture'),AT(160,180,60,20),USE(?NewPic)
      BUTTON('Last Picture'),AT(240,180,60,20),USE(?LastPic)
     END
ThisField LONG(0)
  CODE
  OPEN(WinView)
  LOOP
     ThisField = WinView{PROP:NextField,ThisField}  !Process every control
     IF ThisField
       ThisField{PROP:FontName} = 'Arial'       !Changing the font
       ThisField{PROP:FontSize} = 10
     ELSE
       BREAK                     !Break when done
  . .
  ACCEPT
  END

See Also:

FIRSTFIELD

LASTFIELD

Prop:Follows

prop_nextfield.htm.txt · Last modified: 2021/04/14 13:56 by carlbarnes