Majú iné farby a podfarbenie textu.Hlava mi to neberie. Mám na formulári dva TImage. Vykresľujem na ne text a čiary = tabuľky.
Farbu (+ iné veci) nastavujem vo funkcii DoCenterText. Je jedna jediná a pri oboch TImage používam totožný postup.
TImage sú v riadkoch. V prvom stĺpci je stav Disable a v druhom Enable.
Pri dobrom postavení hviezd (voľba farieb) je obrázok vpravo dole bez podfarbenia textu. To ty som chcel všade.
Nefunguje mi ani kód, ktorý je OK v starej verzii. Používam TMS zásadne komponenty TMS + ich motívy.
procedure TDepictHelpingTables.DoCenterText(AImage: TImage; FRect: TRect; FTexts: array of string;
isEnable: Boolean; TextParameters: TTextParameters);
begin
TheTSize := AImage.Canvas.TextExtent('X');
dy := ((FRect.Bottom - FRect.Top) - TheTSize.cy * (High(FTexts)+1)) div 2;
AImage.Canvas.Brush.Color := clBtnFace;
if isEnable then
begin
AImage.Canvas.Font.Color := clBlack;
end
else
begin
AImage.Canvas.Font.Color := frmFormMain.sbfFiSe.advedtFiSeName.DisabledTextColor;
end;
for i:= Low(FTexts) to High(FTexts) do
begin
// Len nastavovanie rozmerov
if isEnable then
begin
AImage.Canvas.Font.Color := clBlack;
AImage.Canvas.Brush.Color := clBtnFace;
end
else
begin
AImage.Canvas.Font.Color := frmFormMain.sbfFiSe.advedtFiSeName.DisabledTextColor;
AImage.Canvas.Brush.Color := frmFormMain.jstpnlTblBuildingBasic.Color;
end;
AImage.Canvas.TextOut(x, y, FTexts[i]);
end;
AImage.Canvas.Brush.Color := AImage.Canvas.Font.Color;
AImage.Canvas.FrameRect(FRect);
end;