trichview.com

trichview.support




Re: items enumeration


Return to index


Author

Message

Sergey Tkachenko

Posted: 02/21/2002 17:48:23


This code converts all text (including cells) uppercase.


procedure AllUpperCase(RVData: TCustomFormattedRVData);

var i,r,c: Integer;

     table: TRVTableItemInfo;

begin

for i := 0 to RVData.Items.Count-1 do

  if RVData.GetItemStyle(i)>=0 then begin // this is a text item

    s := RVData.Items[i];

    s := AnsiUpperCase(s); // WARNING: will not work with Unicode

    RVData.Items[i] := s;

    end

  else if RVData.GetItemStyle(i)=rvsTable then begin

    table := TRVTableItemInfo(RVData.GetItem(i));

    for r := 0 to table.Rows.Count-1 do

      for c := 0 to table.Rows[r].Count-1 do

        if table.Cells[r,c]<>nil then

          AllUpperCase(table.Cells[r,c].GetRVData);

  end;

end;


call it as:


AllUpperCase(RichView.RVData);








Powered by ABC Amber Outlook Express Converter