Class TSMemo (unit Tsmcode) |
Inherits from
TMemo
constructor Create(AOwner:TComponent);
destructor Destroy;
Scroll by X characters and Y lines
procedure GetMaxLines;
Get number of topmost visible line
procedure ScrollBy(X: integer; Y: integer);
methodsPut cursor in selected position
procedure DoOnHScroll (var Msg: TWMHScroll);
store for max number of visible lines
procedure DoOnVScroll (var Msg: TWMVScroll);
New event handler - HScroll
function GetCurrentLine: integer;
New event handler - VScroll
function GetCurrentPosition: integer;
Get line number containing cursor
function GetLinesVisible: integer;
recalculate new value
function GetMaxLinesVisible: integer;
memo too small for font - return 0
function GetTopLine: integer;
Get character position of cursor within line
procedure SetCurrentLine(Value: integer);
truncate value to actual numbver of lines visible if necessary
procedure SetCurrentPosition(Value: integer);
Put cursor on start of selected line
property CurrentLine : integer
properties
property CurrentPosition : integer
property LinesVisible : integer
property MaxLinesVisible : integer
property Topline : integer
event OnHScroll : TNotifyEvent
event OnVScroll : TNotifyEvent
curline : integer;
curposn : integer;
store for current cursor line
curtop : integer;
store for current cursor position
FCurrentLine : integer;
FCurrentPosition : integer;
FLinesVisible : integer;
FOnHScroll : TNotifyEvent;
FOnVScroll : TNotifyEvent;
FTopLine : integer;
maxlines : integer;
store for current top line number
constructor Create(AOwner:TComponent);
destructor Destroy;
Scroll by X characters and Y lines
procedure GetMaxLines;
Get number of topmost visible line
procedure ScrollBy(X: integer; Y: integer);
methods
Put cursor in selected position
procedure DoOnHScroll (var Msg: TWMHScroll);
store for max number of visible lines
procedure DoOnVScroll (var Msg: TWMVScroll);
New event handler - HScroll
function GetCurrentLine: integer;
New event handler - VScroll
function GetCurrentPosition: integer;
Get line number containing cursor
function GetLinesVisible: integer;
recalculate new value
function GetMaxLinesVisible: integer;
memo too small for font - return 0
function GetTopLine: integer;
Get character position of cursor within line
procedure SetCurrentLine(Value: integer);
truncate value to actual numbver of lines visible if necessary
procedure SetCurrentPosition(Value: integer);
Put cursor on start of selected line
property CurrentLine : integer
properties
property CurrentPosition : integer
property LinesVisible : integer
property MaxLinesVisible : integer
property Topline : integer
event OnHScroll : TNotifyEvent
event OnVScroll : TNotifyEvent
curline : integer;
curposn : integer;
store for current cursor line
curtop : integer;
store for current cursor position
FCurrentLine : integer;
FCurrentPosition : integer;
FLinesVisible : integer;
FOnHScroll : TNotifyEvent;
FOnVScroll : TNotifyEvent;
FTopLine : integer;
maxlines : integer;
store for current top line number