Changeset 503 for trunk/Packages


Ignore:
Timestamp:
Dec 23, 2023, 8:59:07 PM (11 months ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/DpiControls/Dpi.StdCtrls.pas

    r502 r503  
    9393  { TButton }
    9494
    95   TButton = class(TControl)
     95  TButton = class(TWinControl)
    9696  private
    9797  protected
    98     function GetNativeControl: Controls.TControl; override;
     98    function GetNativeWinControl: Controls.TWinControl; override;
    9999  public
    100100    NativeButton: StdCtrls.TButton;
     
    155155  { TScrollBar }
    156156
    157   TScrollBar = class(TControl)
     157  TScrollBar = class(TWinControl)
    158158  private
    159159    function GetKind: TScrollBarKind;
     
    170170    procedure SetPosition(AValue: Integer);
    171171  protected
    172     function GetNativeControl: Controls.TControl; override;
     172    function GetNativeWinControl: Controls.TWinControl; override;
    173173    function GetNativeScrollBar: StdCtrls.TScrollBar; virtual;
    174174  public
     
    178178  published
    179179    property PageSize: Integer read GetPageSize write SetPageSize;
    180     property Min: Integer read GetMin write SetMin;
    181     property Max: Integer read GetMax write SetMax;
    182     property Position: Integer read GetPosition write SetPosition;
    183     property Kind: TScrollBarKind read GetKind write SetKind;
     180    property Min: Integer read GetMin write SetMin default 0;
     181    property Max: Integer read GetMax write SetMax default 100;
     182    property Position: Integer read GetPosition write SetPosition default 0;
     183    property Kind: TScrollBarKind read GetKind write SetKind default sbHorizontal;
    184184    property OnChange: TNotifyEvent read GetOnChange write SetOnChange;
    185185    property Visible;
     
    197197begin
    198198  RegisterComponents(DpiControlsComponentPaletteName, [TEdit, TButton,
    199     TScrollBar]);
     199    TScrollBar, TListBox, TCheckBox, TComboBox]);
    200200end;
    201201
     
    377377{ TButton }
    378378
    379 function TButton.GetNativeControl: Controls.TControl;
     379function TButton.GetNativeWinControl: Controls.TWinControl;
    380380begin
    381381  if not Assigned(NativeButton) then NativeButton := StdCtrls.TButton.Create(nil);
     
    451451end;
    452452
    453 function TScrollBar.GetNativeControl: Controls.TControl;
     453function TScrollBar.GetNativeWinControl: Controls.TWinControl;
    454454begin
    455455  Result := GetNativeScrollBar;
Note: See TracChangeset for help on using the changeset viewer.