Delphi Firemonkey XE7 でアプリケーション用の Stringgrid を作成し、MySQL データベースからのデータを入力しました。フォントサイズを拡大するには、次のコードを使用しました。
procedure TFormSearchRecipient.sgRecipientDrawColumnCell(Sender: TObject;
const Canvas: TCanvas; const Column: TColumn; const Bounds: TRectF;
const Row: Integer; const Value: TValue; const State: TGridDrawStates);
var b : TRectF; border: integer;
begin
//following leaves in the end a border so that the marked item can be seen
b := bounds;
border:= 2;
b.Top := b.Top + border;
b.Left := b.Left - border;
b.Height := b.Height - 2 * border;
b.Width := b.Width - 2 * border;
//colors the background white so that the data cannot be seen anymore
Canvas.Fill.Color := TAlphaColorRec.White;
Canvas.FillRect(b, 0, 0, [], 1);
//change the canvas text options
Canvas.Fill.Color := TAlphaColorRec.Black;
Canvas.Font.Size := 25;
//write the content
Canvas.FillText(Bounds, Value.AsString , False, 1, [] , TTextAlign.Leading);
end;
このコードが何をするかを理解してくれる人がいるといいのですが... この画像は役に立ちます。
私の質問は次のとおりです:ヘッダーを設定するにはどうすればよいですか?ヘッダーのフォントサイズを大きくするにはどうすればよいですか?それができない場合は、ヘッダーを無効化、削除、または非表示にするにはどうすればよいですか?
前もって感謝します!
こんにちはリー