anchor.diff:      property Font: TKMFont read fFont write fFont;
       property MinValue: Word read fMinValue;
       property MaxValue: Word read fMaxValue;
  +    property ThumbText: UnicodeString read fThumbText write SetThumbText;
  +    property AutoThumbWidth: Boolean read fAutoThumbWidth write SetAutoThumbWidth;
       procedure ResetRange;
       property OnChange: TNotifyEvent read fOnChange write fOnChange;
       procedure MouseDown(X,Y: Integer; Shift: TShiftState; Button: TMouseButton); override;
  
positive.code: procedure TKMTrackBar.MouseMove(X,Y: Integer; Shift: TShiftState);
  var
    NewPos: Integer;
  begin
    inherited;
  
    NewPos := Position;
    if (ssLeft in Shift) and InRange(Y - AbsTop - fTrackTop, 0, fTrackHeight) then
      NewPos := EnsureRange(fMinValue + Round(((X-AbsLeft-ThumbWidth div 2) / (Width - ThumbWidth - 4))*(fMaxValue - fMinValue)/Step)*Step, fMinValue, fMaxValue);
  
    if NewPos <> Position then
    begin
  
negative.code: constructor TKMTrackBar.Create(aParent: TKMPanel; aLeft, aTop, aWidth: Integer; aMin, aMax: Word);
  begin
    inherited Create(aParent, aLeft,aTop,aWidth,0);
    Assert(aMax > aMin, 'TKMTrackBar''s minValue >= maxValue');
    fMinValue := aMin;
    fMaxValue := aMax;
    fTrackHeight := 20;
    fRange := KMRange(aMin, aMax); //set Range before position
    Position := (fMinValue + fMaxValue) div 2;
    Caption := '';
    Font := fntMetal;
    SliderFont := fntMetal;
    CaptionWidth := -1;
  
    Step := 1;
    AutoThumbWidth := False;
  
    UpdateThumbWidth;
  end;
  
  
  procedure TKMTrackBar.UpdateThumbWidth;
  begin
    if AutoThumbWidth then
      ThumbWidth := Max(gRes.Fonts[SliderFont].GetTextSize(IntToStr(MaxValue)).X,
                        gRes.Fonts[SliderFont].GetTextSize(ThumbText).X)
    else
      ThumbWidth := gRes.Fonts[SliderFont].GetTextSize(IntToStr(MaxValue)).X;
  
    ThumbWidth := ThumbWidth + 24;
  end;
  
  
  procedure TKMTrackBar.SetAutoThumbWidth(const aValue: Boolean);
  begin
    fAutoThumbWidth := aValue;
    UpdateThumbWidth;
  end;
  
  
  