richmemo: CharAtPos method

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4086 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
skalogryz
2015-04-19 03:25:43 +00:00
parent 1507632a55
commit 8d29dccb15
3 changed files with 33 additions and 0 deletions

View File

@@ -251,6 +251,8 @@ type
function Print(const params: TPrintParams): Integer;
function CharAtPos(x, y: Integer): Integer;
property HideSelection : Boolean read fHideSelection write SetHideSelection;
property OnSelectionChange: TNotifyEvent read fOnSelectionChange write fOnSelectionChange;
property ZoomFactor: Double read GetZoomFactor write SetZoomFactor;
@@ -1027,6 +1029,14 @@ begin
Result:=TWSCustomRichMemoClass(WidgetSetClass).Print(Self, Printer, params, true);
end;
function TCustomRichMemo.CharAtPos(x, y: Integer): Integer;
begin
if HandleAllocated then
Result:=TWSCustomRichMemoClass(WidgetSetClass).CharAtPos(Self, x, y)
else
Result:=-1;
end;
function TCustomRichMemo.PrintMeasure(const params: TPrintParams; var est: TPrintMeasure): Boolean;
begin
if not Assigned(Printer) then begin