FB II Compiler

PG PRO

Debugging

Memory

System

Mathematics

Resources

Disk I/O

Windows

Controls

Menus

Mouse

Keyboard

Text

Fonts

Drawing

Sound

Clipboard

Printing

Communication

ASM

Made with FB

TEXT

Use multiple Edit Fields for the same text


Well I did this by copying the handle (using GET FIELD) from the currently
active window to the other windows during null events.

This is how I did it with two edit fields in two windows. I am sure with a
little work you could do 4. I might slow down typing a little but only if you
are entering a lot of information.

CASE _nullEvt
  LONG IF gCommentDirty% = 1 'Have you looped through here since last edit?
    LONG IF gDirtyRecFlag% = 1 'Is the current record dirty?
      LONG IF gCommentOpen% = 0 'Is the comment window in front?
        LONG IF WINDOW (-_commentWnd) 'Is comment window even open?
          wnd% = WINDOW(_outputWnd)
          WINDOW OUTPUT _roloWnd 'Get window with edits
          GET FIELD efComments&, _efComments 'Get edits
          WINDOW OUTPUT _commentWnd
          CALL TEDEACTIVATE(WINDOW(_efHandle))'Remove some Flash
          EDIT$(1) = &efComments& 'Put edits in other window
          CALL TEACTIVATE(WINDOW(_efHandle)) 'Remove some Flash
          SETSELECT 0,0
          KILL FIELD efComments& 'Must kill the field handle
          WINDOW OUTPUT wnd%
        END IF
      XELSE 'Get other window and do the same
        LONG IF WINDOW (-_commentWnd)
          wnd% = WINDOW(_outputWnd)
          WINDOW OUTPUT _commentWnd
          GET FIELD efComments&, 1
          WINDOW OUTPUT _roloWnd
          CALL TEDEACTIVATE(WINDOW(_efHandle))'Remove some Flash
          EDIT$(_efComments) = &efComments&
          CALL TEACTIVATE(WINDOW(_efHandle)) 'Remove some Flash
          SETSELECT 0,0
          KILL FIELD efComments&
          WINDOW OUTPUT wnd%
       END IF
      END IF
    END IF
    gCommentDirty% = 0
  END IF
END SELECT

You could probably use a select statement for each of the 4 windows (chose the current output window) and get the field and then copy it into each of the others. You must use a flag to only cycle through this once for each change to the edit field or you will get lots of flickering.

Mark