Ignore:
Timestamp:
Nov 4, 2021, 2:59:11 PM (3 years ago)
Author:
chronos
Message:
  • Modified: Merged changes from trunk r411.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/highdpi/Packages/DpiControls/UDpiControls.pas

    r405 r412  
    981981    NativeMemo: TMemo;
    982982    function GetLines: TStrings;
     983    function GetReadOnly: Boolean;
     984    function GetScrollBars: TScrollStyle;
     985    function GetWordWrap: Boolean;
    983986    procedure SetLines(AValue: TStrings);
     987    procedure SetReadOnly(AValue: Boolean);
     988    procedure SetScrollBars(AValue: TScrollStyle);
     989    procedure SetWordWrap(AValue: Boolean);
     990  protected
     991    function GetNativeWinControl: TWinControl; override;
     992    function GetNativeMemo: TMemo; virtual;
    984993  public
    985994    procedure Clear;
    986     function GetNativeMemo: TMemo;
    987995    constructor Create(TheOwner: TComponent); override;
    988996    destructor Destroy; override;
     997  published
    989998    property Lines: TStrings read GetLines write SetLines;
     999    property WordWrap: Boolean read GetWordWrap write SetWordWrap default True;
     1000    property ReadOnly: Boolean read GetReadOnly write SetReadOnly default False;
     1001    property ScrollBars: TScrollStyle read GetScrollBars write SetScrollBars default ssNone;
    9901002  end;
    9911003
     
    16581670end;
    16591671
     1672function TDpiMemo.GetReadOnly: Boolean;
     1673begin
     1674  Result := GetNativeMemo.ReadOnly;
     1675end;
     1676
     1677function TDpiMemo.GetScrollBars: TScrollStyle;
     1678begin
     1679  Result := GetNativeMemo.ScrollBars;
     1680end;
     1681
     1682function TDpiMemo.GetWordWrap: Boolean;
     1683begin
     1684  Result := GetNativeMemo.WordWrap;
     1685end;
     1686
    16601687procedure TDpiMemo.SetLines(AValue: TStrings);
    16611688begin
    16621689  GetNativeMemo.Lines := AValue;
     1690end;
     1691
     1692procedure TDpiMemo.SetReadOnly(AValue: Boolean);
     1693begin
     1694  GetNativeMemo.ReadOnly := AValue;
     1695end;
     1696
     1697procedure TDpiMemo.SetScrollBars(AValue: TScrollStyle);
     1698begin
     1699  GetNativeMemo.ScrollBars := AValue;
     1700end;
     1701
     1702procedure TDpiMemo.SetWordWrap(AValue: Boolean);
     1703begin
     1704  GetNativeMemo.WordWrap := AValue;
     1705end;
     1706
     1707function TDpiMemo.GetNativeWinControl: TWinControl;
     1708begin
     1709  Result := GetNativeMemo;
    16631710end;
    16641711
Note: See TracChangeset for help on using the changeset viewer.