Ignore:
Timestamp:
Dec 23, 2023, 1:50:31 PM (11 months ago)
Author:
chronos
Message:
  • Fixed: Non-DPI build.
  • Modified: Code cleanup.
File:
1 edited

Legend:

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

    r476 r502  
    171171  protected
    172172    function GetNativeControl: Controls.TControl; override;
     173    function GetNativeScrollBar: StdCtrls.TScrollBar; virtual;
    173174  public
    174175    NativeScrollBar: StdCtrls.TScrollBar;
     
    392393function TScrollBar.GetKind: TScrollBarKind;
    393394begin
    394   Result := NativeScrollBar.Kind;
     395  Result := GetNativeScrollBar.Kind;
    395396end;
    396397
    397398function TScrollBar.GetMax: Integer;
    398399begin
    399   Result := NativeScrollBar.Max;
     400  Result := GetNativeScrollBar.Max;
    400401end;
    401402
    402403function TScrollBar.GetMin: Integer;
    403404begin
    404   Result := NativeScrollBar.Min;
     405  Result := GetNativeScrollBar.Min;
    405406end;
    406407
    407408function TScrollBar.GetOnChange: TNotifyEvent;
    408409begin
    409   Result := NativeScrollBar.OnChange;
     410  Result := GetNativeScrollBar.OnChange;
    410411end;
    411412
    412413function TScrollBar.GetPageSize: Integer;
    413414begin
    414   Result := NativeScrollBar.PageSize;
     415  Result := GetNativeScrollBar.PageSize;
    415416end;
    416417
    417418function TScrollBar.GetPosition: Integer;
    418419begin
    419   Result := NativeScrollBar.Position;
     420  Result := GetNativeScrollBar.Position;
    420421end;
    421422
    422423procedure TScrollBar.SetKind(AValue: TScrollBarKind);
    423424begin
    424   NativeScrollBar.Kind := AValue;
     425  GetNativeScrollBar.Kind := AValue;
    425426end;
    426427
    427428procedure TScrollBar.SetMax(AValue: Integer);
    428429begin
    429   NativeScrollBar.Max := AValue;
     430  GetNativeScrollBar.Max := AValue;
    430431end;
    431432
    432433procedure TScrollBar.SetMin(AValue: Integer);
    433434begin
    434   NativeScrollBar.Min := Avalue;
     435  GetNativeScrollBar.Min := Avalue;
    435436end;
    436437
    437438procedure TScrollBar.SetOnChange(AValue: TNotifyEvent);
    438439begin
    439   NativeScrollBar.OnChange := AValue;
     440  GetNativeScrollBar.OnChange := AValue;
    440441end;
    441442
    442443procedure TScrollBar.SetPageSize(AValue: Integer);
    443444begin
    444   NativeScrollBar.PageSize := AValue;
     445  GetNativeScrollBar.PageSize := AValue;
    445446end;
    446447
    447448procedure TScrollBar.SetPosition(AValue: Integer);
    448449begin
    449   NativeScrollBar.Position := AValue;
     450  GetNativeScrollBar.Position := AValue;
    450451end;
    451452
    452453function TScrollBar.GetNativeControl: Controls.TControl;
     454begin
     455  Result := GetNativeScrollBar;
     456end;
     457
     458function TScrollBar.GetNativeScrollBar: StdCtrls.TScrollBar;
    453459begin
    454460  if not Assigned(NativeScrollBar) then NativeScrollBar := StdCtrls.TScrollBar.Create(nil);
Note: See TracChangeset for help on using the changeset viewer.