Главная страница
Top.Mail.Ru    Яндекс.Метрика
Текущий архив: 2005.10.02;
Скачать: 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 вся ветка

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

Наверх




Память: 0.47 MB
Время: 0.037 c
3-1124255979
Zaero
2005-08-17 09:19
2005.10.02
Rave Report: Смена набора символов в шрифте элемента "Text".


6-1114678195
Sasha73
2005-04-28 12:49
2005.10.02
Как сделать CopyFile( n.ext , server res n.extt ) с Users, pass


14-1126286280
Shuric
2005-09-09 21:18
2005.10.02
Кто чем занимается факультативно...


1-1126107297
Виктор_В.С
2005-09-07 19:34
2005.10.02
Очистить String от символов конец строки


14-1126352524
Asprofi
2005-09-10 15:42
2005.10.02
Низнаю что встроить в свой видео плейер - подскажите..