Вниз
Скачать: 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.024 c
1-1126367827
SergP
2005-09-10 19:57
2005.10.02
Проблемы с установкой глобального хука


6-1118184509
Макс Т.
2005-06-08 02:48
2005.10.02
Получение странички БЕЗ каких-либо VCL компонентов


1-1126423471
vasyaaaaaaa
2005-09-11 11:24
2005.10.02
Memo1.Lines.Add() - every line Color


14-1126694915
Александр Александрович
2005-09-14 14:48
2005.10.02
Узнать размер слов в поле?


11-1107724323
olegator
2005-02-07 00:12
2005.10.02
OnMessage не работает




   Наверх