You've already forked lazarus-ccr
richmemo: workaround for SelStart not scrolling into the memo view. Activated with compiling the package with -dRMCARBONSELSTART option
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4584 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
@ -82,6 +82,10 @@ type
|
|||||||
class procedure InDelText(const AWinControl: TWinControl; const TextUTF8: String; DstStart, DstLen: Integer); override;
|
class procedure InDelText(const AWinControl: TWinControl; const TextUTF8: String; DstStart, DstLen: Integer); override;
|
||||||
class function LoadRichText(const AWinControl: TWinControl; Src: TStream): Boolean; override;
|
class function LoadRichText(const AWinControl: TWinControl; Src: TStream): Boolean; override;
|
||||||
class function SaveRichText(const AWinControl: TWinControl; Dst: TStream): Boolean; override;
|
class function SaveRichText(const AWinControl: TWinControl; Dst: TStream): Boolean; override;
|
||||||
|
|
||||||
|
{$ifdef RMCARBONSELSTART}
|
||||||
|
class procedure SetSelStart(const ACustomEdit: TCustomEdit; NewStart: integer); override;
|
||||||
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -442,6 +446,19 @@ begin
|
|||||||
CFRelease(data);
|
CFRelease(data);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
{$ifdef RMCARBONSELSTART}
|
||||||
|
class procedure TCarbonWSCustomRichMemo.SetSelStart(
|
||||||
|
const ACustomEdit: TCustomEdit; NewStart: integer);
|
||||||
|
var
|
||||||
|
edit : TCarbonRichEdit;
|
||||||
|
begin
|
||||||
|
edit := GetValidRichEdit(ACustomEdit);
|
||||||
|
if Assigned(edit) then begin
|
||||||
|
edit.SetSelStart(NewStart);
|
||||||
|
TXNShowSelection( HITextViewGetTXNObject( edit.Widget ), false);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
{$ENDIF}
|
||||||
|
|
||||||
{ TCarbonRichEdit }
|
{ TCarbonRichEdit }
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user