Вниз
Скачать: CL | DM;

Как в ini-файл сохранить стиль шрифта.   Найти похожие ветки 

← →
Брат ©   (2002-09-12 15:33) [0]

Используя WriteString не получается. Кто-то знает как еще можно?


← →
gek ©   (2002-09-12 15:40) [1]

Font.Name и т.д.


← →
MBo ©   (2002-09-12 15:50) [2]

Приводи его к типу Byte


← →
Брат ©   (2002-09-12 16:06) [3]

Выдает ошибку на предпоследней строке:
...
// записываем шрифт в ини-файл:
cfPost:=TIniFile.Create(ExtractFilePath(Application.ExeName)+"Post.ini");
cfPost.WriteString("FONTS","font",FontDialog1.Font.Name);
cfPost.WriteInteger("FONTS","size",FontDialog1.Font.Size);
cfPost.WriteInteger("FONTS","color",FontDialog1.Font.Color);
cfPost.WriteString("FONTS","style",FontDialog1.Font.style);
cfPost.Free;
...
как это обойти


← →
cdaDmitriy ©   (2002-09-12 16:13) [4]

Ini.WriteString ("Reports","FontName",PickFont.Font.Name);
Ini.WriteInteger ("Reports","FontSize",PickFont.Font.Size);
Ind:=fsBold in PickFont.Font.Style; Ini.WriteBool("Reports","FontBold",Ind);
Ind:=fsItalic in PickFont.Font.Style; Ini.WriteBool("Reports","FontItalic",Ind);


← →
MBo ©   (2002-09-12 16:18) [5]

procedure TForm1.Button1Click(Sender: TObject);
var s:TFontStyles;
b:byte;
fi:Tinifile;
begin
s:=[fsBold]+[fsItalic];
b:=byte(s);
fi:=tinifile.create("e:\a.ini");
fi.writeinteger("Font","Style",b);
fi.free;
fi:=tinifile.create("e:\a.ini");
fi.readinteger("Font","Style",b);
label2.Font.style:=tfontstyles(b);
fi.free;
end;


← →
Брат ©   (2002-09-12 16:52) [6]

Списобо братья всем!!!
Все работает. :-))



Страницы: 1 вся ветка

Скачать: CL | DM;



Память: 0.46 MB
Время: 0.011 c
1-73704
Anar
2002-09-10 14:15
2002.09.23
Вопрос к вам, мастера!


1-73635
Демонов Е.В.
2002-09-10 17:07
2002.09.23
MethodAddress


3-73547
Shtukatur
2002-08-30 08:38
2002.09.23
Как тут быть?


14-73886
Lamer86
2002-08-29 19:54
2002.09.23
Форматирование WinXP (NTFS =>> FAT32)


1-73700
Чужой, но не свой
2002-09-08 23:42
2002.09.23
Прогресс.




   Наверх