Documentazione HotXLS

SetThemeColor method (Border)

Imposta il colore del bordo per singolo lato su uno dei 12 slot di colore del tema Office con una tinta facoltativa. Controparte a tema di Border.Color. Disponibile su ogni selettore di lato (superiore, inferiore, sinistro, destro, diagonale, più i selettori composti xlAround, xlInsideVertical, xlInsideHorizontal, xlInsideAll). Disponibile dalla v2.61.0; il percorso dei selettori composti è stato completato nella v2.63.0 (wave D phase 6)

Sintassi

procedure SetThemeColor(ThemeIdx: Word; Tint: Double);

Parametri

ThemeIdx — 0-based theme slot (0=lt1, 1=dk1, 2=lt2, 3=dk2, 4..9=accent1..6, 10=hlink, 11=foHlink)
Tint — spec-style lighter/darker adjustment in the range -1.0 .. +1.0 Encoded into the XFExt FullColorExt as a Q15 signed integer in nTintShade

Osservazioni

Same dual-wire emission as the Interior / Font setters:
I selettori composti registrano uno slot XFExt per lato fisico in un unico passaggio sul ciclo di celle tramite l'helper interno di impostazione degli slot. xlAround registers {rsTop, rsBottom, rsLeft, rsRight}; xlInsideVertical registers {rsLeft, rsRight}; xlInsideHorizontal registers {rsTop, rsBottom}; xlInsideAll registers all four. Read-back through Border.Color returns the resolved RGB
BIFF8 FullColorExt only carries a single diagonal color, so xlDiagonalDown e xlDiagonalUp share the same XFExt slot (rsDiag)

Esempio

Outlines a report band with accent4 (theme color) e adds an inner accent5 separator with a 25% lighter tint

var
  Report: IXLSRange;
begin
  Report := Workbook.Sheets[1].Range['A1', 'F20'];
  Report.Borders[xlAround].SetThemeColor(7, 0.0);
  Report.Borders[xlInsideHorizontal].SetThemeColor(8, 0.25);
  Workbook.SaveAs('ThemedBorders.xls', xlExcel97);
end;

Vedere also