anchor.diff:      Result:= IntToStr((C as TSpinEdit).Value);
   
     if C is TListView then
  -    Result:= IntToStr((C as TListView).ItemIndex);
  +    Result:= DoGetListviewState(C as TListView);
   end;
   
   
  
positive.code:     (C is TSpinEdit);
  end;
  
  
  function DoGetControlResult(C: TControl): string;
  var
    i: integer;
  begin
  
negative.code: end;
  
  
  procedure DoSetListviewState(C: TListView; SValue: string);
  var
    N: integer;
    SItem: string;
  begin
    if not C.Checkboxes then
    begin
      N:= StrToIntDef(SValue, 0);
      if (N>=0) and (N<C.Items.Count) then
        C.ItemFocused:= C.Items[N];
    end
    else
    begin
      N:= 0;
      repeat
        if N>=C.Items.Count then break;
        SItem:= SGetItem(SValue);
        if SItem='' then break;
        C.Items[N].Checked:= StrToBool(SItem);
        Inc(N);
      until false;
      C.ItemFocused:= C.Items[0];
    end;
  end;
  
  
  function DoGetListviewState(C: TListView): string;
  var
    i: integer;
  begin
    if not C.Checkboxes then
      Result:= IntToStr(C.ItemIndex)
    else
    begin
      Result:= '';
      for i:= 0 to C.Items.Count-1 do
        Result:= Result+IntToStr(Ord(C.Items[i].Checked))+',';
    end;
  
  end;
  
  
  procedure DoAddControl(AForm: TForm; ATextItems: string);
  var
    SNameValue, SName, SValue, SListItem: string;
  