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

Вниз

Ищу компонент   Найти похожие ветки 

 
VJar   (2003-01-04 13:45) [0]

Кто знает компонент кнопки, на которую можно помещать рисунок
и когда свойство Enabled=false, этот рисунок не исчезает, а становится
серым?


 
mrcat ©   (2003-01-04 13:48) [1]

а чем стандартные дельфовые кнопки не угодили?


 
Verg ©   (2003-01-04 13:48) [2]

TBitBtn ?
TBitBtn is a push button control that can include a bitmap on its button face.
.....
Although the button can be associated with only one bitmap, the bitmap (glyph property) can be subdivided into four equally sized portions which are displayed based on the state of the button: up, down, and disabled.


 
VJar   (2003-01-04 14:13) [3]

Извините, забыл отметить. Нужно, что было свойство Flat.


 
KIR ©   (2003-01-04 14:33) [4]

Поищи компонент IAeverButton на www.torry.net
Для России он FW. Позволяет изгалятся с кнопкой как только душе угодно


 
Opuhshii ©   (2003-01-04 14:53) [5]

unit MySpeedButton;

interface

uses
Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
Buttons, ImgList;

type
TMySpeedButton = class(TSpeedButton)
private
FImageList:TCustomImageList;
FImageIndex:Integer;
{ Private declarations }
protected
procedure Paint; override;
{ Protected declarations }
public
procedure SetImageIndex(Value:Integer);
{ Public declarations }
published
property ImageList:TCustomImageList read FImageList write FImageList;
property ImageIndex:Integer read FImageIndex write SetImageIndex;
{ Published declarations }
end;

procedure Register;

implementation

procedure Register;
begin
RegisterComponents("Opuhshii", [TMySpeedButton]);
end;

{ TMySpeedButton }

procedure TMySpeedButton.Paint;
begin
inherited;
if Assigned(FImageList) then
if (FImageIndex in [0..Pred(FImageList.Count)]) then begin
if not Enabled then begin
FImageList.Draw(Canvas,Round(Width/2-FImageList.Width/2),Round(Height/2-FImageList.Height/2),FImageIndex,False)
end else
FImageList.Draw(Canvas,Round(Width/2-FImageList.Width/2),Round(Height/2-FImageList.Height/2),FImageIndex,True);
end;
end;

procedure TMySpeedButton.SetImageIndex(Value: Integer);
begin
if Assigned(FImageList) then
if (Value in [0..Pred(FImageList.Count)]) then begin
FImageIndex:=Value;
Paint;
end;
end;

end.

3 минуты и столько счастья,.. ;)) используй ImageList,.. и ImageIndex....



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

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

Наверх




Память: 0.48 MB
Время: 0.025 c
1-62491
Vladimir1
2003-01-10 13:09
2003.01.20
Программная задержка


1-62639
de
2003-01-08 17:42
2003.01.20
Порядок активицации кнопок на форме


14-62743
unnamed777
2003-01-04 14:48
2003.01.20
Установка компонентов в Delphi 7


7-62865
Senator
2002-11-08 14:41
2003.01.20
список файлов


1-62503
Neox
2003-01-10 11:35
2003.01.20
Выполнение других задач