Einzelnen Beitrag anzeigen

Benutzerbild von himitsu
himitsu
Online

Registriert seit: 11. Okt 2003
Ort: Elbflorenz
43.183 Beiträge
 
Delphi 12 Athens
 
#2

AW: Scrollbar: Min, Max und Position

  Alt 8. Jan 2012, 11:18
Delphi-Referenz durchsuchenTScrollBar.SetParams ?


Ansonsten selbermachen.
Delphi-Quellcode:
type
  TScrollBarPosHelper = class helper for TScrollBar
    function SetMinMax(Min, Max: Integer);
  end;

function TScrollBarPosHelper.SetMinMax(Min, Max: Integer);
begin
  if Min >= Self.Max then Self.Max := Max;
  if Max <= Self.Min then Self.Min := Min;
  if Position > Max then Position := Max;
  if Position > Min then Position := Min;
  if Min <> Self.Min then Self.Min := Min;
  if Max <> Self.Max then Self.Max := Max;
end;
Läßt sich natürlich auch als einzelne Prozedur verwenden, also vor D2006/TDE.
Garbage Collector ... Delphianer erzeugen keinen Müll, also brauchen sie auch keinen Müllsucher.
my Delphi wish list : BugReports/FeatureRequests

Geändert von himitsu ( 8. Jan 2012 um 11:30 Uhr)
  Mit Zitat antworten Zitat