[futurebasic] Re: pg scroll bar and static edit field

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : April 1998 : Group Archive : Group : All Groups

From: ASBOYD <ASBOYD@...>
Date: Sun, 12 Apr 1998 14:56:09 EDT
In a message dated 4/11/98 8:46:10 PM, you wrote:

>How
>do I tell PG to activate the scroll bar and allow scrolling while keeping the
>field static?

Larry,
Don't know if this is the best way to do it, but this is how I got things to
work.

This list names in a static scrolling EF.

      windowActive% = WINDOW(_activeWnd)
      WINDOW OUTPUT _staticScrollEFWnd
      AUTOCLIP = _False
      EDIT FIELD -_staticScrollEF,,,_noFramed
      EDIT$(_staticScrollEF) = ""
      EDIT TEXT _monaco,9,0
      FOR x = 0 TO elemsToCk%
        d$ = nameToPutInEF$(x)
        CALL TEINSERT(@d$ + 1,LEN(d$),WINDOW(_efHandle))
      NEXT
      teH& = TEHANDLE(WINDOW(_staticScrollEF))
      CALL INVALRECT (teH&..viewRect%)
      AUTOCLIP = _True
      EDIT FIELD -_staticScrollEF,,,_statNoFramed
      EDIT FIELD 0
      WINDOW OUTPUT windowActive%

''''''''''''''''''''''
In this one, I'm inserting a name in a list in its proper alphabetical
position. The window has a staticScrollEF and some other non-static EFs.

    EDIT FIELD _staticScrollEF
    DO
      INC(elem)
      LONG IF sortThis$ < namesToAlpha$(elem) OR elem >= prevNumOfEntries%
        startPost% = lenTot%: endPost% = lenTot% + LEN(placeThis$)
        SETSELECT startPost%,startPost%
        CALL TEINSERT(@placeThis$ + 1,LEN(placeThis$),WINDOW(_efHandle))
        in$ = "yes"
      XELSE
        lenTot% = lenTot% + alphaStrLength%(elem)
      END IF
    UNTIL in$ = "yes" OR elem >= prevNumOfEntries%
  AUTOCLIP = _True
  EDIT FIELD _nonStaticEF
''''''''''''''''''''''''''''''
Here I'm appending a name in a static scroll EF window.

  nowActive% = WINDOW(_activeWnd)
  WINDOW OUTPUT _wndWithStaticScrollEF
  AUTOCLIP = _False
  EDIT FIELD _staticScrollEF
  EDIT TEXT _geneva,9,0
  CALL TEINSERT(@d$ + 1,LEN(d$),WINDOW(_efHandle))
  AUTOCLIP = _True
  EDIT FIELD 0
  WINDOW OUTPUT nowActive%

Hope this helps. If not I can send you the code to a program I'm working on
and you can dig thru the mess. It has four or five static scrolling EF in it.

Al Boyd