Hallo allemaal,
Ik draai op de laptop een programma dat goed werkt. De tekst in de Cellen van StringGrid1 is goed leesbaar.
De StringGrid1 staat op een Panel en deze heeft als achtergrond kleur : clLime.
Vervolgens start ik het zelfde programma
op een Tablet (Microsoft) en dan is de tekst in StringGrid1 niet zichtbaar. Beide draaien op Windows 10
Als ik DrawCell niet gebruik blijft het probleem bestaan.
Wat kan hier de oorzaak van zijn en hoe los je dit op?
Met een vriendelijk groet, Frans.
Code:
procedure Tafasie_tegenstelling_uitvoering_frm.
StringGrid1DrawCell(Sender: TObject; aCol, aRow: integer; aRect: TRect;
aState: TGridDrawState);
begin
if (gdSelected in aState) then
begin
with TStringGrid(Sender), Canvas do
begin
Font.Name := 'SEGOE UI';
Brush.Color := $00E9AF7C;
Pen.Color := $00C08000;
Pen.Width := 3;
FillRect(ARect);
Font.Color := clRed;
Font.Size := 18;
Rectangle(ARect.Left + 2, ARect.Top + 1, ARect.Right - 2, ARect.Bottom - 2);
TextRect(ARect, ARect.Left + 10, ARect.Top + 2, Cells[aCol, aRow]);
end;
end
else
begin
StringGrid1.Canvas.Font.Name := 'SEGOE UI';
StringGrid1.Canvas.Font.Color := clBlack;
StringGrid1.Canvas.Pen.Style := psClear;
StringGrid1.Canvas.Rectangle(ARect.Left + 2, ARect.Top + 1,
ARect.Right - 2, ARect.Bottom - 2);
StringGrid1.Canvas.Font.Color := clGreen;
StringGrid1.Canvas.Font.Size := 18;
StringGrid1.Canvas.TextOut(ARect.Left + 10, ARect.Top + 2,
StringGrid1.Cells[aCol, aRow]);//HStr);
end;
end;
Bookmarks