Fond de cellule

molly -  
 molly -
Bonjour,

J'ai un tableau, dont je voudrais changer la couleur de fond. Chaque colonne aura une couleur de fond différente.
j'ai ce code là:

$this->SetFillColor(25,143,202);
$this->Cell(25, 10, sprintf("%01.2f".' '.$this->currencie, $total), 1, 0, 'R');

je suis dans un document PDF, où $this représente l'objet PDF.

La fonction SetFillColor ne fonctionne pas.
En existe t-il une autre, pour colorer mon fond de cellule?

Merci

1 réponse

molly
 
Bon c'est bon enf ait il faut bien prendre SetFillColor (R,V,B) mais il faut rajouter un argument $fill dans cell:
$fill=1;
$this->setFillColor(25,143,202);
$this->SetTextColor(255, 255, 255);

$this->Cell(40, 8, $total, 1, 1, 'R',$fill);

Voila pour ceux que ça intéresse!!
0