Вниз
Скачать: 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.01 c
1-73722
Rule
2002-09-11 10:11
2002.09.23
Помогите


14-73825
Ketmar
2002-08-26 15:01
2002.09.23
господа, что делать, если ничего делать не хочется? :-))


1-73689
kronprince
2002-09-10 20:52
2002.09.23
TListView при ViewStyle=vsReport


1-73655
Martin
2002-09-12 17:50
2002.09.23
Как поместить НЕ ГЛАВНЫЕ окна программы в панель задач?


3-73483
Андрусь
2002-08-30 15:29
2002.09.23
как правильно организовать вставку




   Наверх