if gdSelected in State then
begin
StringGrid1.Canvas.Brush.Color := clYellow;
StringGrid1.Canvas.FillRect(Rect);
StringGrid1DrawCell
で以下のように設定したのですが、
if gdSelected in State then
begin
StringGrid1.Canvas.Brush.Color := clYellow;
StringGrid1.Canvas.FillRect(Rect);
end;
これでは表示された文字が見えなくなってしまいます
どうのようにすれば表示された文字も見えるようになるのでしょうか?
自分でテキストも描くんだよ。
りおりおさん
ありがとうございます
いろいろ探して見つけました!
if gdSelected in State then
begin
with StringGrid1 do
begin
Canvas.Brush.Color := clYellow;
Canvas.FillRect(Rect);
Canvas.TextOut(rect.left + 2, rect.top + 2, (Cells[ACol,ARow]));
end;
end;
これでOKですよね?
ツイート | ![]() |