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

bold button   Найти похожие ветки 

 
lauren   (2005-09-13 01:37) [0]

ну зделала bold button. нажымаю становится жырным,но не знаю как зделать так чтоб очередном шелчке произошло обраное. может кто нибуть поможет?


 
Цукор 5   (2005-09-13 01:45) [1]


begin
 if Button1.Font.Style = [fsBold]
 then
 Button1.Font.Style:=[]
 else
 Button1.Font.Style:=[fsBold];
end;


 
Джо ©   (2005-09-13 01:51) [2]


>  [1] Цукор 5   (13.09.05 01:45)

Все же, наверное, корректнее будет так:

procedure TForm1.Button1Click(Sender: TObject);
 function ReverseBoldStyle (FontStyle: TFontStyles): TFontStyles;
 begin
   Result := FontStyle;
   if fsBold in FontStyle then
     Exclude (Result,fsBold)
   else
     Include (Result,fsBold)
 end;
begin
 Button1.Font.Style := ReverseBoldStyle(Button1.Font.Style)
end;


 
Наиль ©   (2005-09-13 08:49) [3]

function ReverseBoldStyle (FontStyle: TFontStyles): TFontStyles;
begin
  Result := FontStyle+fsBold-fsBold*FontStyle;
end;



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

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



Память: 0.45 MB
Время: 0.022 c
1-1126018884
Дмитрий_05
2005-09-06 19:01
2005.10.02
Стандартные изображения к программам


14-1125733422
Adil
2005-09-03 11:43
2005.10.02
TV Tuner


14-1126291838
May3ep
2005-09-09 22:50
2005.10.02
Опрос. Пользуетесь ли вы импортом новостей в формате RSS?


2-1124703827
CrowD
2005-08-22 13:43
2005.10.02
Ссылки


5-1101107105
kerim
2004-11-22 10:05
2005.10.02
 Регистрация редактора св-в полей




   Наверх