掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
Fontを文字列化する時 (ID:30086)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
TypInfo使用なら。。面倒だから大体これw コンポーネントとか渡すとイベントとかも出力するから Kindとかも見る? procedure SetFontIniEx(o:TObject;Item:TStrings); var p:PPropList; i,l :integer; begin l := GetPropList(o,p); for i := 0 to l -1 do SetPropValue(o,p[i]^.Name,Item.Values[p[i]^.Name]); FreeMem(p); end; procedure GetFontIniEx(o:TObject;Item:TStrings); var p:PPropList; i,l :integer; begin l := GetPropList(o,p); for i := 0 to l -1 do Item.Values[p[i]^.Name] := GetPropValue(o,p[i]^.Name,True); FreeMem(p); end; procedure TForm1.Button1Click(Sender: TObject); begin GetFontIniEx(memo1.Font,memo1.Lines); end; procedure TForm1.Button2Click(Sender: TObject); begin SetFontIniEx(Memo1.Font,memo1.Lines); end;
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.