掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
スピード・ボタンへ動的描画するには? (ID:19577)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
参考までに・・・ 文字の描画も含めると以下のようにしてます。 var saCap: AnsiString; begin saCap := SpeedButton1.Caption; SpeedButton1.Caption := ''; SpeedButton1.Glyph.Height := SpeedButton1.Height; SpeedButton1.Glyph.Width := SpeedButton1.Width; with SpeedButton1.Glyph do begin Canvas.brush.color := clRed; Canvas.brush.style := bsSolid; Canvas.FillRect(Rect(0, 0, Width-3, Height-3)); Canvas.Brush.Style := bsClear; Canvas.Font := SpeedButton1.Font; Canvas.TextOut((Width - Canvas.TextWidth(saCap)) div 2, (Height - Canvas.TextHeight(saCap)) div 2, saCap); end; end;
←解決時は質問者本人がここをチェックしてください。
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.