Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.09.18;
Скачать: CL | DM;

Вниз

Как записать в *.ini файл свойство шрифта Style?   Найти похожие ветки 

 
Dr. Andrew   (2005-08-24 10:27) [0]

Мастера, подскажите как записать в *.ini файл свойство шрифта Style?
Font.Style в INI?!
Спасибо!


 
Ega23 ©   (2005-08-24 10:31) [1]


function GetFontStyle(const Value: TFontStyles): Integer;
begin
Result:=0;
if (fsBold in Value) then Result:=Result or 1;
if (fsItalic in Value) then Result:=Result or 2;
if (fsUnderline in Value) then Result:=Result or 4;
if (fsStrikeout in Value) then Result:=Result or 8;
end;

//**********************************************************************

function SetFontStyle(const Value: integer): TFontStyles;
begin
Result:=[];
if ((Value shr 0) and 1)=1 then Result:=Result+[fsBold];
if ((Value shr 1) and 1)=1 then Result:=Result+[fsItalic];
if ((Value shr 2) and 1)=1 then Result:=Result+[fsUnderline];
if ((Value shr 3) and 1)=1 then Result:=Result+[fsStrikeout];
end;

//**********************************************************************


И пишешь обычный integer


 
Alexander Panov ©   (2005-08-24 11:04) [2]

Еще метод.

var
 v: TFontStyles;
 n: Byte absolute v;


И работаешь с n как с байтом;)


 
Leonid Troyanovsky ©   (2005-08-24 11:07) [3]


> Ega23 ©   (24.08.05 10:31) [1]

> И пишешь обычный integer


Byte(Style)

--
Regards, LVT


 
Leonid Troyanovsky ©   (2005-08-24 11:08) [4]


> Dr. Andrew   (24.08.05 10:27)  
> Мастера, подскажите как записать в *.ini файл свойство шрифта
> Style?
> Font.Style в INI?!


http://groups.google.com/group/fido7.ru.delphi/msg/eb29fb48626c9a5e

--
Regards, LVT.


 
Dr. Andrew   (2005-08-24 11:23) [5]

Всем спасибо!



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

Текущий архив: 2005.09.18;
Скачать: CL | DM;

Наверх




Память: 0.47 MB
Время: 0.034 c
9-1116696958
ivn
2005-05-21 21:35
2005.09.18
Где скачать DSound.pas?


2-1123806995
COder__
2005-08-12 04:36
2005.09.18
Помогите сделать алгоритм


9-1116772303
Cerberus
2005-05-22 18:31
2005.09.18
Помогите придумать алгоритм.


10-1102322020
Grant
2004-12-06 11:33
2005.09.18
Регистрация COM сервера


2-1123753919
Praktikant
2005-08-11 13:51
2005.09.18
Четвертая кнопка в правом верхнем углу