Вниз
Скачать: 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.038 c
11-1107232055
Solik
2005-02-01 07:27
2005.10.02
Toolbar


6-1118118699
leonidus
2005-06-07 08:31
2005.10.02
idHTTP и потоки


3-1124724845
max_12345
2005-08-22 19:34
2005.10.02
Необходимо сравнить 2 dbf


1-1126074951
V-A-V
2005-09-07 10:35
2005.10.02
Как отловить запуск и завершение.


2-1124700076
ArtemESC
2005-08-22 12:41
2005.10.02
Тонкая форма...




   Наверх