KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Utility to scroll variable to the bottom
PRODUCT: 4D | VERSION: 15.x | PLATFORM: Mac & Win
Published On: November 15, 2016

Below is an utility method to programatically scroll a variable to the bottom.

// Method: UTIL_SCROLL_TO_BOTTOM
// $1 - Pointer to variable

C_POINTER($1;$text)
C_LONGINT($pos)

If(Count parameters>=1)
  $text:=$1
  If(Not(Undefined($text->)))
    $pos:=Length($text->)+1
    HIGHLIGHT TEXT($text->;$pos;$pos)
  End if
End if

Example:

Below is a text variable (vText) that contains several lines of text:


The following code will programatically scroll the variable to the bottom:
UTIL_SCROLL_TO_BOTTOM (->vText)

Below is the result: