掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
TextWidthの値を (ID:29399)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
すいません、慌てて書き込んだら タイトル途中だし、 RichEditで指定行を中央に表示するには https://www.petitmonte.com/bbs/answers?question_id=5339 こちらをみたら、 KHE00221さんのコードでこういう事が出来ることを知りました。 function GetTextWidth(Font: TFont; s: String): Integer; begin with TBitmap.Create do try Canvas.Font.Assign(Font); Result := Canvas.TextWidth(s); finally Free; end; end; function GetTextHeight(Font: TFont; s: String): Integer; begin with TBitmap.Create do try Canvas.Font.Assign(Font); Result := Canvas.TextHeight(s); finally Free; end; end; ということで、解決で.... お騒がせしました。
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.