Главная страница
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.023 c
14-62729
Vaddya
2003-01-03 00:16
2003.01.20
Россияне уже не хозяева в России???


3-62428
Ahmad K
2002-12-26 22:16
2003.01.20
А можно исходник?


7-62867
AquaSun1
2002-10-31 07:39
2003.01.20
Основные характеристики


14-62784
RV
2002-12-31 10:55
2003.01.20
Задачка


1-62539
kofman
2003-01-09 16:03
2003.01.20
Как посчитать время работы потока?