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:
![](https://kb.4d.com:443/kbase/assets/images/77680-1.jpg)
The following code will programatically scroll the variable to the bottom:
UTIL_SCROLL_TO_BOTTOM (->vText) |
Below is the result:
![](https://kb.4d.com:443/kbase/assets/images/77680-2.jpg)