anchor.diff:  const
     FntCol: array [Boolean] of TColor4 = ($FF888888, $FFFFFFFF);
   var
  -  LineHeight, CheckSize: Integer;
  -  I: Integer;
  -begin
  -  inherited;
  -  if Count = 0 then Exit; //Avoid dividing by zero
  -
  -  LineHeight := Round(fHeight / Count);
  +  CheckSize: Integer;
  +  I, VisibleI: Integer;
  +begin
  +  inherited;
  +  if (Count = 0) or (VisibleCount = 0) then Exit; //Avoid dividing by zero
  +
     CheckSize := gRes.Fonts[fFont].GetTextSize('x').Y + 1;
   
  +  VisibleI := 0;
     for I := 0 to Count - 1 do
     begin
  -    TKMRenderUI.WriteBevel(AbsLeft, AbsTop + I * LineHeight, CheckSize-4, CheckSize-4, 1, 0.3);
  +    if not fItems[I].Visible then
  +      Continue;
  +
  +    TKMRenderUI.WriteBevel(AbsLeft, AbsTop + Round(VisibleI * LineHeight), CheckSize-4, CheckSize-4, 1, 0.3);
       if DrawChkboxOutline then
  -      TKMRenderUI.WriteOutline(AbsLeft, AbsTop + I * LineHeight, CheckSize-4, CheckSize-4, LineWidth, LineColor);
  +      TKMRenderUI.WriteOutline(AbsLeft, AbsTop + Round(VisibleI * LineHeight), CheckSize-4, CheckSize-4, LineWidth, LineColor);
   
       if fItemIndex = I then
  -      TKMRenderUI.WriteText(AbsLeft+(CheckSize-4)div 2, AbsTop + I * LineHeight - 1, 0, 'x', fFont, taCenter, FntCol[fEnabled and fItems[I].Enabled]);
  +      TKMRenderUI.WriteText(AbsLeft + (CheckSize - 4) div 2, AbsTop + Round(VisibleI * LineHeight) - 1, 0,
  +                            'x', fFont, taCenter, FntCol[fEnabled and fItems[I].Enabled]);
   
       // Caption
  -    TKMRenderUI.WriteText(AbsLeft+CheckSize, AbsTop + I * LineHeight, Width-LineHeight, fItems[I].Text, fFont, taLeft, FntCol[fEnabled and fItems[I].Enabled]);
  +    TKMRenderUI.WriteText(AbsLeft + CheckSize, AbsTop + Round(VisibleI * LineHeight), Width - Round(LineHeight),
  +                          fItems[I].Text, fFont, taLeft, FntCol[fEnabled and fItems[I].Enabled]);
  +    Inc(VisibleI);
     end;
   end;
   
  
positive.code: end;
  
  
  procedure TKMRadioGroup.SetItemEnabled(aIndex: Integer; aEnabled: Boolean);
  begin
    Assert(aIndex < fCount, 'Can''t SetItemEnabled for index ' + IntToStr(aIndex));
  
negative.code:     procedure UpdateMouseOverPositions(X,Y: Integer);
      function GetItem(aIndex: Integer): TKMRadioGroupItem;
      function GetVisibleCount: Integer;
      function GetLineHeight: Single;
    protected
      function GetHint: UnicodeString; override;
    public
  