TFGet

Source: source/classes/fget.prg

Inherits from: TControl

TFGet is a custom-painted multi-line text editor for FiveWin. Unlike the standard Windows EDIT control, it provides per-character fonts, colors, and alignment. It supports copy/cut/paste, undo, block selection, word wrap, and scroll bars. It is the foundation of FiveWin's format-capable text editing.

Key DATA Members

DATATypeDescription
bSetGetBlockCode block to get/set the text value
lReadOnlyLogicalWhen .T., editing is disabled
nAlignNumericText alignment: ES_LEFT, ES_CENTER, ES_RIGHT
nClrText / nClrPaneNumericForeground and background colors (RGB)
oFont / aFontsObject/ArrayDefault font and per-character font array

Methods

MethodDescription
New( nRow, nCol, bSetGet, oWnd, nW, nH, oFont, lHScroll, nClrFore, nClrBack, lPixel, lReadOnly, ... )Create a new TFGet control
Redefine( nId, bSetGet, oWnd )Redefine from a dialog resource
Copy() / Cut() / Paste()Clipboard operations
Undo()Undo last edit operation
SelectAll()Select all text
SetFormat( oFont, nColor )Apply font and color formatting

Example: Custom GET with Picture

#include "FiveWin.ch"
function Main()
   local oWnd, oGet, cVar := "Hello World"
   DEFINE WINDOW oWnd TITLE "TFGet Demo" SIZE 400, 200
   @ 20, 20 GET oGet VAR cVar OF oWnd MEMO SIZE 300, 100
   ACTIVATE WINDOW oWnd CENTERED
return nil

Notes

See Also