字体的style怎么保存到文本文件里?
解决方案 »
- Delphi怎样才能千千静听开着时发出声音
- 在delphi中怎么表达bit
- 关于Rave显示页数的问题
- 上海铁路局,有你这样忽悠人的么? -- 上海铁路局决定从2月3日起,在京沪线沪宁段再增3对动车组列车,具体车次为:上海至南京T702/T701、T7
- 关于 StringGrid 的底色问题 急急急。。。。。。
- 如何在一个DBGrid中显示两个表中的部分字段?
- 用Delphi可以做出好的登陆系统吗?
- qreport控件作动态报表的紧急问题!!!
- 我想做一局域网的dd,问两个问题
- 请问诸位大侠:如何取得serversocket的当前活动连接数?或者您能告诉我如何取得数组上限也可!多谢了,分数大大的
- IntraWeb弹出信息框让用户确认的问题。
- 可不可以在TDBGrid的某一单元格中绑定一个Recordset,就象vsflexgrid
myini.writinteger('set','fontstyle',fs...)
WriteInteger(SectionName, 'Font.Color', Color);
WriteInteger(SectionName, 'Font.Height', Height);
WriteString(SectionName, 'Font.Name', Name);
WriteInteger(SectionName, 'Font.Size', Size);
WriteBool(SectionName, 'Font.Style.Bold', fsBold in Style);
WriteBool(SectionName, 'Font.Style.Italic', fsItalic in Style);
WriteBool(SectionName, 'Font.Style.Underline', fsUnderline in Style);
WriteBool(SectionName, 'Font.Style.StrikeOut', fsStrikeOut in Style);
忘了
with font do
begin
... ...
end
WriteInteger(SectionName, 'Font.Color', Color);
WriteInteger(SectionName, 'Font.Height', Height);
WriteString(SectionName, 'Font.Name', Name);
WriteInteger(SectionName, 'Font.Size', Size);
WriteBool(SectionName, 'Font.Style.Bold', fsBold in Style);
WriteBool(SectionName, 'Font.Style.Italic', fsItalic in Style);
WriteBool(SectionName, 'Font.Style.Underline', fsUnderline in Style);
WriteBool(SectionName, 'Font.Style.StrikeOut', fsStrikeOut in Style);
begin
Charset := ReadInteger(SectionName, 'Font.Charset', Font.Charset);
Color := ReadInteger(SectionName, 'Font.Color', Font.Color);
Height := ReadInteger(SectionName, 'Font.Height', Font.Height);
Name := ReadString(SectionName, 'Font.Name', Font.Name);
Size := ReadInteger(SectionName, 'Font.Size', Font.Size);
if ReadBool(SectionName, 'Font.Style.Bold', False) then
Style := Style + [fsBold]
else if fsBold in Style then
Style := Style - [fsBold] ;
if ReadBool(SectionName, 'Font.Style.Italic', False) then
Style := Style + [fsItalic]
else if fsItalic in Style then
Style := Style - [fsItalic] ;
if ReadBool(SectionName, 'Font.Style.Underline', False) then
Style := Style + [fsUnderline]
else if fsUnderline in Style then
Style := Style - [fsUnderline] ;
if ReadBool(SectionName, 'Font.Style.StrikeOut', False) then
Style := Style + [fsStrikeOut]
else if fsStrikeOut in Style then
Style := Style - [fsStrikeOut] ;
end ; //of with
uses TypInfo;procedure TForm1.Button1Click(Sender: TObject);
begin
Edit1.Text := GetSetProp(Font, 'Style');
end;procedure TForm1.Button2Click(Sender: TObject);
begin
SetSetProp(Font, 'Style', Edit1.Text);
end;