掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
DBGridの背景色に一行置きに色をつけるには? (ID:28697)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
フォントの色も設定して下さい。 if DBGridEx1.SaveRow mod 2 = 0 then begin DBGridEx1.Canvas.Font.Color := clBlack; DBGridEx1.Canvas.Brush.Color := clWhite; end else begin DBGridEx1.Canvas.Font.Color := clWhite; DBGridEx1.Canvas.Brush.Color := clBlack; end; また DBGridEx.pas に TInplaceEdit2 = class(TInplaceEdit) private published property Font; end; を追加して if Row mod 2 = 0 then begin TInplaceEdit2(DBGridEx1.InplaceEditor).Font.Color := clBlack; DBGridEx1.InplaceEditor.Brush.Color := clWhite; end else begin TInplaceEdit2(DBGridEx1.InplaceEditor).Font.Color := clWhite; DBGridEx1.InplaceEditor.Brush.Color := clBlack; end; としてみて下さい
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.