Главная страница
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.011 c
14-62789
Mike B.
2002-12-30 13:41
2003.01.20
Новогоднее обращение :-)


1-62627
eugene_jin_t
2003-01-09 11:05
2003.01.20
Переменные


3-62371
A_Gura
2002-12-16 06:27
2003.01.20
TIBQuery и Out of Memory (help)


4-62928
Cobalt
2002-12-02 17:10
2003.01.20
Взаимная блокировка окон


14-62807
Ежик
2003-01-01 06:20
2003.01.20
Господа программеры из Эстонии, С новым Годом!