cxSpreadSheet 如何以编程方式改变选定的单元格的样式

2020-04-30



procedure TForm1.Button1Click(Sender: TObject); var I, J: Integer; begin with cxSpreadSheet1.Sheet do for I := SelectionRect.Left to SelectionRect.Right do for J := SelectionRect.Top to SelectionRect.Bottom do with GetCellObject(I, J) do try SetCellText(IntToStr(I) + ‘ ‘ + IntToStr(J)); Style.Font.Size := 12; Style.Font.Style := [fsItalic] finally Free; end; end;



阅读87